contractorcli¶
contractorcli is a client for working with Contractor. It is a single command line program (similar to docker/kubectl) that you can run on the Contractor VM, or on your own machine, to talk to a Contractor instance.
Installing contractorcli¶
Pre-built binary¶
Each release on GitHub has a pre-built binary named contractorcli, built on Linux. The latest release is at https://github.com/T3kton/contractorcli/releases/latest. Download the contractorcli file from the Assets section of the release, either with your browser or with curl. Replace < version > with the release you want (ie: 0.20.0):
curl -L -o contractorcli https://github.com/T3kton/contractorcli/releases/download/< version >/contractorcli
or the latest:
curl -L -o contractorcli https://github.com/T3kton/contractorcli/releases/latest/download/contractorcli
Make it executable and put it somewhere on your path:
chmod +x contractorcli
sudo install -m 755 contractorcli /usr/local/bin/contractorcli
and check it runs:
contractorcli version
The release has the one binary, if you are on another platform build it from source.
From Source¶
You will need make and go (see the README for the minimum version). Clone the repo, and build:
git clone https://github.com/T3kton/contractorcli.git
cd contractorcli
make
sudo make install
The repo also has a debian directory so it can be built into a deb with make dpkg.
Bash Completion¶
To load completions for the current shell:
. <(contractorcli bash_completion)
To load it for every session, add that line to your ~/.bashrc, or to make it global put it in /etc/bash_completion.d/contractorcli.
Configuration¶
contractorcli’s config file is stored at ~/.contractorcli.ini. Here is an example file:
[contractor]
host: http://192.168.200.10
username: root
password: root
You can use another config file with –config <file>. Other global flags: –json and –toml change the output format, –show-secrets shows passwords in the table output (they are always included in the JSON/TOML output), and –debug shows the requests (this will interfere with JSON output).
Usage¶
For most options you can use the flag -j or –json to output the results as JSON:
$ ./contractorcli site config site1
ntp_servers: [contractor]
dns_search: [site1.test test]
dns_servers: [10.0.0.10]
domain_name: site1.test
mirror_proxy: http://10.0.0.10:3128/
$ ./contractorcli -j site config site1
{
"dns_search": [
"site1.test",
"test"
],
"dns_servers": [
"10.0.0.10"
],
"domain_name": "site1.test",
"mirror_proxy": "http://10.0.0.10:3128/",
"ntp_servers": [
"contractor"
]
}
Most commands can also be used in the interactive mode, for example:
$ ./contractorcli structure list
Id Site Hostname Foundation Blueprint Created Updated
1 site1 contractor contractor manual-structure-base 2020-01-07 00:42:58.932884 +0000 +0000 2020-01-07 00:42:59.111802 +0000 +0000
2 site1 esx01 esx01 vmware-esx-base 2020-01-07 00:46:55.566979 +0000 +0000 2020-02-26 16:22:26.463778 +0000 +0000
$ ./contractorcli shell
contractor> structure list
Id Site Hostname Foundation Blueprint Created Updated
1 site1 contractor contractor manual-structure-base 2020-01-07 00:42:58.932884 +0000 +0000 2020-01-07 00:42:59.111802 +0000 +0000
2 site1 esx01 esx01 vmware-esx-base 2020-01-07 00:46:55.566979 +0000 +0000 2020-02-26 16:22:26.463778 +0000 +0000
contractor>
Version¶
$ ./contractorcli version
contractorcli
Version: 0.2
Commit: df562afc8f68dba32689c4981ad4973b7a57783c
Sites¶
For Sites, the name is also the id
List available sites:
$ ./contractorcli site list
Id Name Description Created Updated
site1 site1 Initial Site "site1" 2020-01-07 00:42:58.664308 +0000 +0000 2020-02-25 05:53:39.14986 +0000 +0000
Get a Site:
$ ./contractorcli site get site1
Site: site1
Description: Initial Site "site1"
Parent:
Zone: site1
Config Values: map[dns_search:[site1.test test] dns_servers:[10.0.0.10] domain_name:site1.test mirror_proxy:http://10.0.0.10:3128/ ntp_servers:[contractor]]
Created: 2020-01-07 00:42:58.664308 +0000 +0000
Updated: 2020-02-25 05:53:39.14986 +0000 +0000
Create a new Site:
$ ./contractorcli site create -d "New Site" -n nsite
Update an Existing site:
$ ./contractorcli site update nsite -d "New Description"
Delete a site:
$ ./contractorcli site delete nsite
Get Effective/Full/Compiled configuration for a site:
$ ./contractorcli site config site1 -f
__pxe_location: http://static/pxe/
dns_search: [site1.test test]
dns_servers: [10.0.0.10]
domain_name: site1.test
ntp_servers: [contractor]
_site: site1
__timestamp: 2020-03-07T04:46:04.873917+00:00
__pxe_template_location: http://contractor/config/pxe_template/
mirror_proxy: http://10.0.0.10:3128/
__last_modified: 2020-02-25T05:53:39.149860+00:00
__contractor_host: http://contractor
Get the Configuration values for a site:
$ ./contractorcli site config site1
dns_servers: [10.0.0.10]
domain_name: site1.test
mirror_proxy: http://10.0.0.10:3128/
new: value
ntp_servers: [contractor]
dns_search: [site1.test test]
Set/Add a new configuration value:
$ ./contractorcli site config site1 -n new -v value
dns_search: [site1.test test]
dns_servers: [10.0.0.10]
domain_name: site1.test
mirror_proxy: http://10.0.0.10:3128/
ntp_servers: [contractor]
new: value
Delete/Remove configuration value:
$ ./contractorcli site config site1 -d new
dns_search: [site1.test test]
dns_servers: [10.0.0.10]
domain_name: site1.test
mirror_proxy: http://10.0.0.10:3128/
ntp_servers: [contractor]
Structure¶
For Structures the id is a number
NOTE: List, Get, Update, Create, Configuration sections are similar to Site
View Existing Job information (this is for structure 2):
$ ./contractorcli structure job 2 -i
Site /api/v1/Site/Site:site1:
Structure /api/v1/Building/Structure:2:
State: waiting
Status: []
Progress: 0.0
Message:
Script Name: destroy
Can Start: True
Updated: 2020-03-01 06:29:21.829421 +0000 +0000
Created: 2020-03-01 06:29:21.829439 +0000 +0000
Create a new Create(-c)/Destroy(-d) Job (this is for structure 1):
./contractorcli structure job 1 -d
job: 12
Show Job Status (this is for structure 1):
$ ./contractorcli structure job 1 -s
Variables: map[config.__contractor_host:http://contractor config.__last_modified:2020-03-07 04:47:44.194113+00:00 config.__pxe_location:http://static/pxe/ config.__pxe_template_location:http://contractor/config/pxe_template/c/1005b8d0-cefa-4c3f-b221-02d5b5332212 config.__timestamp:2020-03-07 04:52:48.310913+00:00 config._blueprint:manual-structure-base config._domain_name:site1.test config._foundation_class_list:['Metal', 'VM', 'Container', 'Switch', 'Manual'] config._foundation_id:contractor config._foundation_id_map:None config._foundation_interface_list:[{'name': 'enp0s8', 'network': 'main', 'address_list': [{'address': '10.0.0.10', 'netmask': '255.255.255.0', 'prefix': 24, 'subnet': '10.0.0.0', 'gateway': None, 'auto': True, 'mtu': 1500, 'sub_interface': None, 'primary': True, 'vlan': 0, 'tagged': False}], 'mac': None, 'physical_location': 'enp0s8'}] config._foundation_locator:contractor config._foundation_state:built config._foundation_type:Manual config._fqdn:contractor.site1.test config._hostname:contractor config._interface_map:{'enp0s8': {'name': 'enp0s8', 'network': 'main', 'address_list': [{'address': '10.0.0.10', 'netmask': '255.255.255.0', 'prefix': 24, 'subnet': '10.0.0.0', 'gateway': None, 'auto': True, 'mtu': 1500, 'sub_interface': None, 'primary': True, 'vlan': 0, 'tagged': False}], 'mac': None, 'physical_location': 'enp0s8'}} config._primary_address:{'address': '10.0.0.10', 'netmask': '255.255.255.0', 'prefix': 24, 'subnet': '10.0.0.0', 'gateway': None, 'auto': True, 'mtu': 1500, 'sub_interface': None, 'primary': True} config._primary_interface:enp0s8 config._primary_interface_mac:None config._provisioning_address:{'address': '10.0.0.10', 'netmask': '255.255.255.0', 'prefix': 24, 'subnet': '10.0.0.0', 'gateway': None, 'auto': True, 'mtu': 1500, 'sub_interface': None, 'primary': True} config._provisioning_interface:enp0s8 config._provisioning_interface_mac:None config._site:site1 config._structure_config_uuid:1005b8d0-cefa-4c3f-b221-02d5b5332212 config._structure_id:1 config._structure_state:built config.dns_search:['site1.test', 'test'] config.dns_servers:['10.0.0.10'] config.domain_name:site1.test config.mirror_proxy:http://10.0.0.10:3128/ config.ntp_servers:['contractor'] foundation.blueprint:manual-foundation-base foundation.class:<class 'contractor.plugins.Manual.models.ManualFoundation'> foundation.foundation:ManualFoundation contractor foundation.id:contractor foundation.interface_list:[<RealNetworkInterface: RealNetworkInterface "enp0s8" mac "None">] foundation.locator:contractor foundation.provisioning_interface:RealNetworkInterface "enp0s8" mac "None" foundation.site:site1 foundation.type:Manual structure.hostname:contractor structure.id:1 structure.primary_interface:RealNetworkInterface "enp0s8" mac "None" structure.primary_ip:10.0.0.10 structure.provisioning_interface:RealNetworkInterface "enp0s8" mac "None" structure.provisioning_ip:10.0.0.10]
Script State: []
Script Line No: 0
-- Script --
# Uninstall Manual OS
pause( msg='Resume When OS is Uninstalled' )
Foundation¶
For Foundations the Locator is also the id
NOTE: List, Get sections are similar to Site NOTE2: Job section is similar to Structure
List the foundation types that are supported by contractorcli and the contractor instance it is configured to talk to:
$ ./contractorcli foundation types
type: [docker manual virtualbox]
Get any type of foundation:
$ ./contractorcli foundation get esx01
Locator: esx01
Type: AMT
Site: site1
Blueprint: amt-base
Structure: 2
Id Map: {'hardware': {'dmi': {'BIOS Info': [{'Vendor': 'Intel Corporation', 'Version': 'MYBDWi5v.86A.0039.2017.1016.1545', 'Release Date': '10/16/2017', 'BIOS Revision': '5.6'}], 'System Info': [{'Manufacturer': '', 'Product Name': '', 'Version': '', 'Serial Number': '', 'UUID': '4917D980-B0E4-11E5-BF2D-94C69110F1DC', 'SKU Number': '', 'Family': ''}], 'Base Board Information': [{'Manufacturer': 'Intel Corporation', 'Product Name': 'NUC5i5MYBE', 'Version': 'H47797-208', 'Serial Number': 'GEMY72300148', 'Asset Tag': '', 'Type': 'Motherboard'}], 'Chassis Information': [{'Manufacturer': '', 'Type': 'Desktop', 'Version': '', 'Serial Number': '', 'Asset Tag': '', 'Boot-up State': 'Safe', 'Power Supply State': 'Safe', 'Thermal State': 'Safe', 'Height': '0', 'Number Of Power Cords': '1', 'SKU Number': 'To be filled by O.E.M.'}], 'OEM Strings': [{'String 1': 'To Be Filled By O.E.M.'}], 'System Configuration Options': [{'Option 1': 'To Be Filled By O.E.M.'}], 'Processor Information': [{'Socket Designation': 'SOCKET 0', 'Family': 'Core i5', 'Manufacturer': 'Intel(R) Corporation', 'ID': '0xbfebfbff000306d4', 'Version': 'Intel(R) Core(TM) i5-5300U CPU @ 2.30GHz', 'Status': 'Enabled', 'Serial Number': 'NULL', 'Asset Tag': 'To Be Filled By O.E.M', 'Part Number': 'To Be Filled By O.E.M', 'Core Count': '2', 'Core Enabled': '2', 'Thread Count': '4'}], 'Memory Device': [{'Size': 'No Module Installed', 'Set': 'None', 'Locator': 'SODIMM0', 'Bank Locator': 'CHANNEL A DIMM0', 'Type': 'Unknown', 'Speed': 'Unknown', 'Manufacturer': 'Not Specified', 'Serial Number': 'Not Specified', 'Asset Tag': 'Not Specified', 'Part Number': 'Not Specified'}, {'Size': '16384 MB', 'Set': 'None', 'Locator': 'SODIMM1', 'Bank Locator': 'CHANNEL B DIMM0', 'Type': 'DDR3', 'Speed': '1600 MHz', 'Manufacturer': '1315', 'Serial Number': 'E06E80B7', 'Asset Tag': '9876543210', 'Part Number': 'CT204864BF160B.M16'}]}, 'pci': {'0000:00:00.00': {'vendor': 32902, 'device': 5636}, '0000:00:02.00': {'vendor': 32902, 'device': 5654}, '0000:00:03.00': {'vendor': 32902, 'device': 5644}, '0000:00:16.00': {'vendor': 32902, 'device': 40122}, '0000:00:16.03': {'vendor': 32902, 'device': 40125}, '0000:00:19.00': {'vendor': 32902, 'device': 5538}, '0000:00:1b.00': {'vendor': 32902, 'device': 40096}, '0000:00:1d.00': {'vendor': 32902, 'device': 40102}, '0000:00:1f.00': {'vendor': 32902, 'device': 40131}, '0000:00:1f.02': {'vendor': 32902, 'device': 40067}, '0000:00:1f.03': {'vendor': 32902, 'device': 40098}}, 'total_ram': 15910.9609375, 'total_cpu_count': 4, 'total_cpu_sockets': 1}, 'network': {'eth0': {'mac': '94:c6:91:10:f1:dc', 'lldp': {'mac': 'f0:9f:c2:19:56:05', 'name': 'DevSwitch', 'slot': 0, 'port': 7, 'subport': 0}, 'primary': True}}, 'disks': [{'protocol': 'ATA', 'serial': 'JR1000D33LS4YE', 'model': 'HGST HTS721010A9E630', 'name': 'sda', 'location': 'ATA 0', 'firmware': 'JB0OA3U0', 'capacity': 931.5133895874023, 'devpath': '/devices/pci0000:00/0000:00:1f.2/ata1/host0/target0:0:0/0:0:0:0/scsi_disk/0:0:0:0', 'pcipath': '/pci0000:00/0000:00:1f.2/ata1/host0/target0:0:0/0:0:0:0', 'isSSD': False, 'isVirtualDisk': False}, {'protocol': 'ATA', 'serial': '1710161C6AF5', 'model': 'Crucial_CT1050MX300S', 'name': 'sdb', 'location': 'ATA 3', 'firmware': 'M0CR040', 'capacity': 978.0885543823242, 'devpath': '/devices/pci0000:00/0000:00:1f.2/ata4/host3/target3:0:0/3:0:0:0/scsi_disk/3:0:0:0', 'pcipath': '/pci0000:00/0000:00:1f.2/ata4/host3/target3:0:0/3:0:0:0', 'isSSD': False, 'isVirtualDisk': False}]}
Class List: []
State: built
Located At: 2020-01-07 04:06:31.336942 +0000 +0000
Built At: 2020-01-07 04:10:14.123422 +0000 +0000
Created: 2020-01-07 00:46:42.322098 +0000 +0000
Updated: 2020-01-07 04:10:14.12944 +0000 +0000
Get specific type of foundation (Note the addition of AMT specific values):
$ ./contractorcli foundation amt get esx01
Locator: esx01
AMT Username: admin
AMT Password: asdQWE1@3
AMT Ip Address: 192.168.200.95
Plot: test
Type: AMT
Site: site1
Blueprint: amt-base
Id Map: {'hardware': {'dmi': {'BIOS Info': [{'Vendor': 'Intel Corporation', 'Version': 'MYBDWi5v.86A.0039.2017.1016.1545', 'Release Date': '10/16/2017', 'BIOS Revision': '5.6'}], 'System Info': [{'Manufacturer': '', 'Product Name': '', 'Version': '', 'Serial Number': '', 'UUID': '4917D980-B0E4-11E5-BF2D-94C69110F1DC', 'SKU Number': '', 'Family': ''}], 'Base Board Information': [{'Manufacturer': 'Intel Corporation', 'Product Name': 'NUC5i5MYBE', 'Version': 'H47797-208', 'Serial Number': 'GEMY72300148', 'Asset Tag': '', 'Type': 'Motherboard'}], 'Chassis Information': [{'Manufacturer': '', 'Type': 'Desktop', 'Version': '', 'Serial Number': '', 'Asset Tag': '', 'Boot-up State': 'Safe', 'Power Supply State': 'Safe', 'Thermal State': 'Safe', 'Height': '0', 'Number Of Power Cords': '1', 'SKU Number': 'To be filled by O.E.M.'}], 'OEM Strings': [{'String 1': 'To Be Filled By O.E.M.'}], 'System Configuration Options': [{'Option 1': 'To Be Filled By O.E.M.'}], 'Processor Information': [{'Socket Designation': 'SOCKET 0', 'Family': 'Core i5', 'Manufacturer': 'Intel(R) Corporation', 'ID': '0xbfebfbff000306d4', 'Version': 'Intel(R) Core(TM) i5-5300U CPU @ 2.30GHz', 'Status': 'Enabled', 'Serial Number': 'NULL', 'Asset Tag': 'To Be Filled By O.E.M', 'Part Number': 'To Be Filled By O.E.M', 'Core Count': '2', 'Core Enabled': '2', 'Thread Count': '4'}], 'Memory Device': [{'Size': 'No Module Installed', 'Set': 'None', 'Locator': 'SODIMM0', 'Bank Locator': 'CHANNEL A DIMM0', 'Type': 'Unknown', 'Speed': 'Unknown', 'Manufacturer': 'Not Specified', 'Serial Number': 'Not Specified', 'Asset Tag': 'Not Specified', 'Part Number': 'Not Specified'}, {'Size': '16384 MB', 'Set': 'None', 'Locator': 'SODIMM1', 'Bank Locator': 'CHANNEL B DIMM0', 'Type': 'DDR3', 'Speed': '1600 MHz', 'Manufacturer': '1315', 'Serial Number': 'E06E80B7', 'Asset Tag': '9876543210', 'Part Number': 'CT204864BF160B.M16'}]}, 'pci': {'0000:00:00.00': {'vendor': 32902, 'device': 5636}, '0000:00:02.00': {'vendor': 32902, 'device': 5654}, '0000:00:03.00': {'vendor': 32902, 'device': 5644}, '0000:00:16.00': {'vendor': 32902, 'device': 40122}, '0000:00:16.03': {'vendor': 32902, 'device': 40125}, '0000:00:19.00': {'vendor': 32902, 'device': 5538}, '0000:00:1b.00': {'vendor': 32902, 'device': 40096}, '0000:00:1d.00': {'vendor': 32902, 'device': 40102}, '0000:00:1f.00': {'vendor': 32902, 'device': 40131}, '0000:00:1f.02': {'vendor': 32902, 'device': 40067}, '0000:00:1f.03': {'vendor': 32902, 'device': 40098}}, 'total_ram': 15910.9609375, 'total_cpu_count': 4, 'total_cpu_sockets': 1}, 'network': {'eth0': {'mac': '94:c6:91:10:f1:dc', 'lldp': {'mac': 'f0:9f:c2:19:56:05', 'name': 'DevSwitch', 'slot': 0, 'port': 7, 'subport': 0}, 'primary': True}}, 'disks': [{'protocol': 'ATA', 'serial': 'JR1000D33LS4YE', 'model': 'HGST HTS721010A9E630', 'name': 'sda', 'location': 'ATA 0', 'firmware': 'JB0OA3U0', 'capacity': 931.5133895874023, 'devpath': '/devices/pci0000:00/0000:00:1f.2/ata1/host0/target0:0:0/0:0:0:0/scsi_disk/0:0:0:0', 'pcipath': '/pci0000:00/0000:00:1f.2/ata1/host0/target0:0:0/0:0:0:0', 'isSSD': False, 'isVirtualDisk': False}, {'protocol': 'ATA', 'serial': '1710161C6AF5', 'model': 'Crucial_CT1050MX300S', 'name': 'sdb', 'location': 'ATA 3', 'firmware': 'M0CR040', 'capacity': 978.0885543823242, 'devpath': '/devices/pci0000:00/0000:00:1f.2/ata4/host3/target3:0:0/3:0:0:0/scsi_disk/3:0:0:0', 'pcipath': '/pci0000:00/0000:00:1f.2/ata4/host3/target3:0:0/3:0:0:0', 'isSSD': False, 'isVirtualDisk': False}]}
Class List: ['Physical', 'AMT']
State: built
Located At: 2020-01-07 04:06:31.336942 +0000 +0000
Built At: 2020-01-07 04:10:14.123422 +0000 +0000
Created: 2020-01-07 00:46:42.322098 +0000 +0000
Updated: 2020-01-07 04:10:14.12944 +0000 +0000
Update and Create are similar to Site except that you must specify the type of foundation:
$ ./contractorcli foundation amt update rtest -b amt-base
For a LibVirt Foundation the console can go to either a spice or a serial console (the default is serial):
$ ./contractorcli foundation libvirt update vm01 --libvirt-console spice
Make an existing Interface the provisioning interface of its Foundation (the old provisioning interface is cleared):
$ ./contractorcli foundation interface set-provisioning < interface id >
Change which Address is the primary for a Structure (the old primary is cleared, the result is the updated Address list):
$ ./contractorcli structure address set-primary < address id >
Complex¶
For Complexes the Name is also the id
NOTE: works much like the foundations except there is no Job control
Blueprint¶
For Blueprints the name is also the id
NOTE: List, Get, Update, Create, Configuration sections are similar to Site
Networks and Address Blocks¶
For Networks and AddressBlocks the id is a number. Create a Network and link an AddressBlock to it (the vlan is optional):
$ ./contractorcli network create -s site1 -n internal
$ ./contractorcli network link create < network id > -a < addressblock id >
Create an AddressBlock:
$ ./contractorcli addressblock create -s site1 -n internal -u 10.0.0.0 -p 24 -g 1
Show how an AddressBlock is being used:
$ ./contractorcli addressblock usage < addressblock id >
$ ./contractorcli addressblock allocation < addressblock id >
Reserve an offset so it is not handed out, or make an offset a dynamic address that PXE boots to a PXE (ie: bootstrap):
$ ./contractorcli addressblock reserve < addressblock id > -o 2 -r "Network Reserved"
$ ./contractorcli addressblock dynamic < addressblock id > -o 21 -p bootstrap
The dereserve and dedynamic commands undo those.
Structure Addresses and Interfaces¶
Have Contractor pick the next free address in an AddressBlock for a Structure, on the interface eth0, as the primary address:
$ ./contractorcli structure address next < structure id > -a < addressblock id > -n eth0 -p
or pick the offset:
$ ./contractorcli structure address add < structure id > -a < addressblock id > -n eth0 -o 30 -p
Move the primary flag to another address, the old primary is cleared:
$ ./contractorcli structure address set-primary < address id >
Foundation Interfaces¶
Create an Interface on a Foundation (this is the provisioning interface), by locator:
$ ./contractorcli foundation interface create testvm01 -n eth0 -y eth0 -t < network id > -p
Use -m for the MAC address, and -l for the link name (ie: the LLDP name, see Setup Bare-metal). Change which Interface is the provisioning interface (the old one is cleared), or set the PXE for it:
$ ./contractorcli foundation interface set-provisioning < interface id >
$ ./contractorcli foundation interface pxe < interface id > -n normal-boot
Jobs¶
Start create/destroy jobs and follow them:
$ ./contractorcli foundation job do-create testvm01
$ ./contractorcli structure job do-create < structure id >
$ ./contractorcli foundation joblog testvm01
Work with the running jobs (foundation or structure):
$ ./contractorcli job structure list
$ ./contractorcli job structure state < job id >
$ ./contractorcli job structure pause < job id >
$ ./contractorcli job structure resume < job id >
$ ./contractorcli job structure reset < job id >
$ ./contractorcli job structure rollback < job id >
Plots and Cartographers¶
Plots are the physical locations, and are used by the IPMI and AMT Foundations:
$ ./contractorcli plot create -n test
$ ./contractorcli plot list
Cartographers are machines that have checked in from the bootstrap image. Assign one to a Foundation:
$ ./contractorcli cartographer list
$ ./contractorcli cartographer assign < cartographer id > -f < locator >
Directory¶
Work with the DNS Zones and Entries:
$ ./contractorcli directory list
$ ./contractorcli directory entry --help
Complexes¶
Each type of Complex has its own commands, for example for VirtualBox and VCenter:
$ ./contractorcli complex virtualbox create -s site1 -l demovbox -d "Demo" -u < username > -p < password > -m < structure id >
$ ./contractorcli complex vcenter create -s site1 -l demovcenter -d "Demo" -a < datacenter > -c < cluster > -o < host structure id > -m < structure id > -u < username > -p < password >
See Setting up VM Host for more. ./contractorcli complex types lists the types available.
Interactive Shell¶
./contractorcli shell starts the shell shown above, you don’t need to type contractorcli in front of each command.
For all of the commands, add –help to see the sub commands and flags.