Cloudstack Cloudmonkey API BASH Scripts

Mindwatering Incorporated

Author: Tripp W Black

Created: 12/29 at 02:00 PM

 

Category:
Linux
KVM

Sample Cloudmonkey utility scripts for CloudStack for preforming various API functions.

1. Login Bash Script:
login.shlogin.sh

Instructions:
- Run the script once per login session. Afterwards, it is cached to a JSESSIONID cookie, and will persist until logout/expiration.
- We have found that the JSESSIONID cookie does NOT need to be subsequently passed in local BASH scripts, but does need to be included in HTTP REST calls as it is stateless/session-less.
- Run the logout API if you do not wish the session login to persist.
- If you do not include a domain, the login will be in the ROOT one.


2. Add Physical Networks:
addnets.shaddnets.sh

About this script:
- Creates a range of physical networks in a zone
- New networks share same Name prefix and the same or different Tag prefix

Instructions:
- Before running this script:
- - Run the login.sh script
- - Copy the zone ID from the UI and overwrite the zone ID in this file
- - Update the Name prefix and the Tag prefix
- - Disable the zone in the UI












previous page

×