user networking option added
This commit is contained in:
parent
d1dd2839b7
commit
a07833d37a
1 changed files with 4 additions and 2 deletions
|
@ -15,11 +15,13 @@ def network():
|
||||||
@click.option("--seed", envvar="OTP_SEED", required=True)
|
@click.option("--seed", envvar="OTP_SEED", required=True)
|
||||||
@click.option("--network-name", required=True)
|
@click.option("--network-name", required=True)
|
||||||
@click.option("--network-type", 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 = {
|
data = {
|
||||||
**OTPCredentials(name, realm, seed).get_json(),
|
**OTPCredentials(name, realm, seed).get_json(),
|
||||||
"network_name": network_name,
|
"network_name": network_name,
|
||||||
"type": network_type
|
"type": network_type,
|
||||||
|
"user": user
|
||||||
}
|
}
|
||||||
r = requests.post("{}/network/create".format(config('UCLOUD_API_SERVER')), json=data)
|
r = requests.post("{}/network/create".format(config('UCLOUD_API_SERVER')), json=data)
|
||||||
print(load_dump_pretty(r.content))
|
print(load_dump_pretty(r.content))
|
||||||
|
|
Loading…
Reference in a new issue