Last active
August 1, 2018 11:46
-
-
Save 0xIslamTaha/c029e52d3a335ba5b1981e61802e0133 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import random | |
client_id = '' | |
client_secret = '' | |
account_name = '' | |
cs_name = '' | |
farmer_id = '' | |
zerotier_nw= '' | |
zeroOS = 'v.1.4.1' | |
ipxe = 'ipxe: https://bootstrap.gig.tech/ipxe/{}/{}/farmer_id={}%20development'.format(zeroOS, zerotier_nw, farmer_id) | |
get_jwt = requests.post('https://itsyou.online/v1/oauth/access_token?grant_type=client_credentials&client_id=%s&client_secret=%s&response_type=id_token' % (client_id, client_secret)) | |
jwt = get_jwt.text | |
ovc_data={"account": "xtremx", | |
"address": "be-g8-3.demo.greenitglobe.com", | |
"jwt_": jwt, | |
"location": "be-g8-3", | |
"port": 443, | |
"space":""} | |
ovccl = j.clients.openvcloud.get(data=ovc_data) | |
account = ovccl.account_get(account_name) | |
cs = account.space_get(cs_name) | |
zeroos_name = 'zeroos%d' % random.randint(1, 10000) | |
vm_zos = cs.machine_create(name=zeroos_name, memsize=8, disksize=10, datadisks=[50], image='ipxe boot', | |
authorize_ssh=False, userdata=ipxe) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment