To do the initial configuration, you can use 'curl' to
call REST APIs.
About this task
To do the initial configuration by using 'curl' to call REST APIs, and you need to use your own
setup variables to replace the following italic text. For more information on the
descriptions and available values of each field, refer to the REST API specification at the
following
URL:
https://<your-tools-server-host-name>:9443/openapi/ui/
Procedure
- Configure the connection to the target environments if you want to deploy images to Linux
machines.
curl -k -u zdtadmin:password -X POST --header 'Content-Type: application/json' --header 'Accept: application/json' -d '{ "hostname": "your_target_system_host_name", "sshPort": 22, "label":"zdtForTesting", "installOSPackages": true, "concurrentVolumeTransferNumber": 3, "configNetwork": true, "configUser": true, "syntax": "sudo ${command}", "syntaxForValidation": "sudo -n -l", "networkInterface": "eth1", "tcpPortRules": "0:21 \n 23:2021 \n 2022>22 \n 2023:3269 \n 3271:9449 \n 9452:65535", "udpPortRules": "111 \n 514 \n 1023 \n 1044:1049 \n 2049", "zdtManaged": "true", "hasRootAccess": "true"}' 'https://your_tools_server_host_name:9443/ZDTREST/zdtrs/targetEnvServices/targetSystem'
- Configure connection to the cloud platform if you want
to deploy images to an OpenStack cloud.
curl -k -u zdtadmin:password -X POST --header 'Content-Type: application/json' --header 'Accept: application/json' -d '{ "endpoint": "mytarget.domain.com:5000", "domain": "ibm", "project": "myProject", "floatingip": true, "snapshot": true, "type": "OpenStack", "network": "your-network-uuid-in-cloud", "flavor": "your-flavor-id-in-cloud", "serverImage": "your-serverimage-uuid-in-cloud", "label": "My Cloud", "installOSPackages": true, "cloudUser": "your-cloud-user-name", "concurrentVolumeTransferNumber": 3, "configNetwork": true, "configUser": true, "syntax": "sudo ${command}", "syntaxForValidation": "sudo -n -l", "networkInterface": "eth1", "availabilityZone": "nova", "floatingIpPoolUuid": "your-cloud-floating-ip-pool-uuid"}}' 'https://your_tools_server_host_name:9443/ZDTREST/zdtrs/targetEnvServices/cloudPlatform'