From f8b596d1191ac500abd83813e7881a65600f4e19 Mon Sep 17 00:00:00 2001 From: Ramkishor Chaladi Date: Tue, 18 Jul 2023 20:13:13 +0530 Subject: [PATCH 1/3] Example was fixed --- SoftLayer/CLI/block/snapshot/set_notify_status.py | 5 ++--- SoftLayer/CLI/block/subnets/assign.py | 8 +++++++- SoftLayer/CLI/block/subnets/list.py | 7 ++++++- SoftLayer/CLI/block/subnets/remove.py | 9 ++++++++- 4 files changed, 23 insertions(+), 6 deletions(-) diff --git a/SoftLayer/CLI/block/snapshot/set_notify_status.py b/SoftLayer/CLI/block/snapshot/set_notify_status.py index a9d051ee2..053a959ee 100644 --- a/SoftLayer/CLI/block/snapshot/set_notify_status.py +++ b/SoftLayer/CLI/block/snapshot/set_notify_status.py @@ -20,9 +20,8 @@ def cli(env, volume_id, enable): """Enables/Disables snapshot space usage threshold warning for a given volume.""" block_manager = SoftLayer.BlockStorageManager(env.client) - status = block_manager.set_volume_snapshot_notification(volume_id, enable) + block_manager.set_volume_snapshot_notification(volume_id, enable) - if status: - click.echo( + click.echo( 'Snapshots space usage threshold warning notification has bee set to %s for volume %s' % (enable, volume_id)) diff --git a/SoftLayer/CLI/block/subnets/assign.py b/SoftLayer/CLI/block/subnets/assign.py index daf554dfa..e07797bb3 100644 --- a/SoftLayer/CLI/block/subnets/assign.py +++ b/SoftLayer/CLI/block/subnets/assign.py @@ -12,7 +12,13 @@ help="ID of the subnets to assign; e.g.: --subnet-id 1234") @environment.pass_env def cli(env, access_id, subnet_id): - """Assign block storage subnets to the given host id. + """EXAMPLE: + + slcli block subnets-assign 111111 --subnet-id 222222 + slcli block subnets-assign 111111 --subnet-id 222222 --subnet-id 333333 + ACCESS_ID is the host_id obtained by: softlayer slcli block access-list + + Assign block storage subnets to the given host id. access_id is the host_id obtained by: slcli block access-list diff --git a/SoftLayer/CLI/block/subnets/list.py b/SoftLayer/CLI/block/subnets/list.py index a60142f7c..f98d95413 100644 --- a/SoftLayer/CLI/block/subnets/list.py +++ b/SoftLayer/CLI/block/subnets/list.py @@ -19,7 +19,12 @@ @click.argument('access_id', type=int) @environment.pass_env def cli(env, access_id): - """List block storage assigned subnets for the given host id. + """Example: + + slcli block subnets-list 12345678 + ACCESS_ID is the host_id obtained by: softlayer slcli block access-list + + List block storage assigned subnets for the given host id. access_id is the host_id obtained by: slcli block access-list """ diff --git a/SoftLayer/CLI/block/subnets/remove.py b/SoftLayer/CLI/block/subnets/remove.py index 92d825af6..c2e6b0bd2 100644 --- a/SoftLayer/CLI/block/subnets/remove.py +++ b/SoftLayer/CLI/block/subnets/remove.py @@ -12,7 +12,14 @@ help="ID of the subnets to remove; e.g.: --subnet-id 1234") @environment.pass_env def cli(env, access_id, subnet_id): - """Remove block storage subnets for the given host id. + """Example: + + slcli block subnets-remove 111111 --subnet-id 222222 + slcli block subnets-remove 111111 --subnet-id 222222 --subnet-id 333333 + ACCESS_ID is the host_id obtained by: slcli block access-list + + + Remove block storage subnets for the given host id. access_id is the host_id obtained by: slcli block access-list From 22d6092f994bf79e04d8b7997e41cde02ac85750 Mon Sep 17 00:00:00 2001 From: Ramkishor Chaladi Date: Tue, 18 Jul 2023 20:26:52 +0530 Subject: [PATCH 2/3] updated --- SoftLayer/CLI/block/subnets/list.py | 4 ++-- SoftLayer/CLI/block/subnets/remove.py | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/SoftLayer/CLI/block/subnets/list.py b/SoftLayer/CLI/block/subnets/list.py index f98d95413..08c512a83 100644 --- a/SoftLayer/CLI/block/subnets/list.py +++ b/SoftLayer/CLI/block/subnets/list.py @@ -21,9 +21,9 @@ def cli(env, access_id): """Example: - slcli block subnets-list 12345678 + slcli block subnets-list 12345678 ACCESS_ID is the host_id obtained by: softlayer slcli block access-list - + List block storage assigned subnets for the given host id. access_id is the host_id obtained by: slcli block access-list diff --git a/SoftLayer/CLI/block/subnets/remove.py b/SoftLayer/CLI/block/subnets/remove.py index c2e6b0bd2..a3faec099 100644 --- a/SoftLayer/CLI/block/subnets/remove.py +++ b/SoftLayer/CLI/block/subnets/remove.py @@ -17,7 +17,7 @@ def cli(env, access_id, subnet_id): slcli block subnets-remove 111111 --subnet-id 222222 slcli block subnets-remove 111111 --subnet-id 222222 --subnet-id 333333 ACCESS_ID is the host_id obtained by: slcli block access-list - + Remove block storage subnets for the given host id. From f1e18392f86d7e3e0ae5595adae4218703ba93e5 Mon Sep 17 00:00:00 2001 From: Ramkishor Chaladi Date: Wed, 19 Jul 2023 13:56:35 +0530 Subject: [PATCH 3/3] updated the description --- SoftLayer/CLI/block/subnets/assign.py | 6 +++--- SoftLayer/CLI/block/subnets/list.py | 6 +++--- SoftLayer/CLI/block/subnets/remove.py | 7 +++---- 3 files changed, 9 insertions(+), 10 deletions(-) diff --git a/SoftLayer/CLI/block/subnets/assign.py b/SoftLayer/CLI/block/subnets/assign.py index e07797bb3..d80e5aff4 100644 --- a/SoftLayer/CLI/block/subnets/assign.py +++ b/SoftLayer/CLI/block/subnets/assign.py @@ -12,14 +12,14 @@ help="ID of the subnets to assign; e.g.: --subnet-id 1234") @environment.pass_env def cli(env, access_id, subnet_id): - """EXAMPLE: + """Assign block storage subnets to the given host id. + + EXAMPLE:: slcli block subnets-assign 111111 --subnet-id 222222 slcli block subnets-assign 111111 --subnet-id 222222 --subnet-id 333333 ACCESS_ID is the host_id obtained by: softlayer slcli block access-list - Assign block storage subnets to the given host id. - access_id is the host_id obtained by: slcli block access-list SoftLayer_Account::iscsiisolationdisabled must be False to use this command diff --git a/SoftLayer/CLI/block/subnets/list.py b/SoftLayer/CLI/block/subnets/list.py index 08c512a83..297846abd 100644 --- a/SoftLayer/CLI/block/subnets/list.py +++ b/SoftLayer/CLI/block/subnets/list.py @@ -19,13 +19,13 @@ @click.argument('access_id', type=int) @environment.pass_env def cli(env, access_id): - """Example: + """List block storage assigned subnets for the given host id. + + Example:: slcli block subnets-list 12345678 ACCESS_ID is the host_id obtained by: softlayer slcli block access-list - List block storage assigned subnets for the given host id. - access_id is the host_id obtained by: slcli block access-list """ diff --git a/SoftLayer/CLI/block/subnets/remove.py b/SoftLayer/CLI/block/subnets/remove.py index a3faec099..98d52ad11 100644 --- a/SoftLayer/CLI/block/subnets/remove.py +++ b/SoftLayer/CLI/block/subnets/remove.py @@ -12,15 +12,14 @@ help="ID of the subnets to remove; e.g.: --subnet-id 1234") @environment.pass_env def cli(env, access_id, subnet_id): - """Example: + """Remove block storage subnets for the given host id. + + Example:: slcli block subnets-remove 111111 --subnet-id 222222 slcli block subnets-remove 111111 --subnet-id 222222 --subnet-id 333333 ACCESS_ID is the host_id obtained by: slcli block access-list - - Remove block storage subnets for the given host id. - access_id is the host_id obtained by: slcli block access-list SoftLayer_Account::iscsiisolationdisabled must be False to use this command