user networking option added

This commit is contained in:
ahmadbilalkhalid 2019-11-15 21:12:17 +05:00
parent d1dd2839b7
commit a07833d37a

View file

@ -15,11 +15,13 @@ def network():
@click.option("--seed", envvar="OTP_SEED", required=True)
@click.option("--network-name", required=True)
@click.option("--network-type", required=True)
def create(name, realm, seed, network_name, network_type):
@click.option("--user", required=True, type=bool, default=False)
def create(name, realm, seed, network_name, network_type, user):
data = {
**OTPCredentials(name, realm, seed).get_json(),
"network_name": network_name,
"type": network_type
"type": network_type,
"user": user
}
r = requests.post("{}/network/create".format(config('UCLOUD_API_SERVER')), json=data)
print(load_dump_pretty(r.content))