Skip to content

Commit 54943d3

Browse files
committed
issue#1210 - Adding doc notes describing ISCSI Isolation must be enabled for new commands to work.
1 parent ee1d940 commit 54943d3

File tree

3 files changed

+11
-12
lines changed

3 files changed

+11
-12
lines changed

SoftLayer/CLI/block/subnets/assign.py

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -15,23 +15,23 @@ def cli(env, access_id, subnet_id):
1515
"""Assign block storage subnets to the given host id.
1616
1717
access_id is the host_id obtained by: slcli block access-list <volume_id>
18+
19+
SoftLayer_Account::iscsiisolationdisabled must be False to use this command
1820
"""
1921
try:
2022
subnet_ids = list(subnet_id)
2123
block_manager = SoftLayer.BlockStorageManager(env.client)
2224
assigned_subnets = block_manager.assign_subnets_to_acl(access_id, subnet_ids)
2325

2426
for subnet in assigned_subnets:
25-
message = "{0}".format("Successfully assigned subnet id: " + str(subnet) +
26-
' to allowed host id: ' + str(access_id) + '.')
27+
message = "Successfully assigned subnet id: {} to allowed host id: {}".format(subnet, access_id)
2728
click.echo(message)
2829

2930
failed_to_assign_subnets = list(set(subnet_ids) - set(assigned_subnets))
3031
for subnet in failed_to_assign_subnets:
31-
message = "{0}".format("Failed to assign subnet id: " + str(subnet) +
32-
' to allowed host id: ' + str(access_id) + '.')
32+
message = "Failed to assign subnet id: {} to allowed host id: {}".format(subnet, access_id)
3333
click.echo(message)
3434

3535
except SoftLayer.SoftLayerAPIError as ex:
36-
message = "{0}".format("Unable to assign subnets.\nReason: " + ex.faultString)
36+
message = "Unable to assign subnets.\nReason: {}".format(ex.faultString)
3737
click.echo(message)

SoftLayer/CLI/block/subnets/list.py

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -39,6 +39,5 @@ def cli(env, access_id):
3939
env.fout(table)
4040

4141
except SoftLayer.SoftLayerAPIError as ex:
42-
message = "{0}".format("Unable to list assigned subnets for access-id: " +
43-
str(access_id) + ".\nReason: " + ex.faultString)
42+
message = "Unable to list assigned subnets for access-id: {}.\nReason: {}".format(access_id, ex.faultString)
4443
click.echo(message)

SoftLayer/CLI/block/subnets/remove.py

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -15,23 +15,23 @@ def cli(env, access_id, subnet_id):
1515
"""Remove block storage subnets for the given host id.
1616
1717
access_id is the host_id obtained by: slcli block access-list <volume_id>
18+
19+
SoftLayer_Account::iscsiisolationdisabled must be False to use this command
1820
"""
1921
try:
2022
subnet_ids = list(subnet_id)
2123
block_manager = SoftLayer.BlockStorageManager(env.client)
2224
removed_subnets = block_manager.remove_subnets_from_acl(access_id, subnet_ids)
2325

2426
for subnet in removed_subnets:
25-
message = "{0}".format("Successfully removed subnet id: " + str(subnet) +
26-
' for allowed host id: ' + str(access_id) + '.')
27+
message = "Successfully removed subnet id: {} for allowed host id: {}".format(subnet, access_id)
2728
click.echo(message)
2829

2930
failed_to_remove_subnets = list(set(subnet_ids) - set(removed_subnets))
3031
for subnet in failed_to_remove_subnets:
31-
message = "{0}".format("Failed to remove subnet id: " + str(subnet) +
32-
' for allowed host id: ' + str(access_id) + '.')
32+
message = "Failed to remove subnet id: {} for allowed host id: {}".format(subnet, access_id)
3333
click.echo(message)
3434

3535
except SoftLayer.SoftLayerAPIError as ex:
36-
message = "{0}".format("Unable to remove subnets.\nReason: " + ex.faultString)
36+
message = "Unable to remove subnets.\nReason: {}".format(ex.faultString)
3737
click.echo(message)

0 commit comments

Comments
 (0)