-
Notifications
You must be signed in to change notification settings - Fork 193
issue#1210 file block storage - adding new feature to list, assign, a… #1214
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
…nd remove subnets from/to ACL host record.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks for the pull request. Over all the code looks fine, just a few style changes needed I think.
- Are these feature not relevant to File storage? If so, would be a good idea to add the corresponding File commands as well.
- use the
string.format()
style for adding variables into strings in yourclick.echo
statements. - Need a bit of information on how to get
access_id
, either in the docblock comment or maybe another command that will print those out? - in the manager make sure to either check or cast
subnets_id
to a list so anyone using the manager directly wont have their API call fail.
Made changes requested. See new help display: |
assigned_subnets = block_manager.assign_subnets_to_acl(access_id, subnet_ids) | ||
|
||
for subnet in assigned_subnets: | ||
message = "{0}".format("Successfully assigned subnet id: " + str(subnet) + |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
should be this:
click.echo("Successfully assigned subnet id: {} to allowed host id: {}.".format(subnet, access_id))
.format() will substitute in order, so for simple strings like this you don't really need to number/name the substitution brackets. But its certainly fine if you want to be verbose.
https://sldn.softlayer.com/reference/datatypes/SoftLayer_Account/#iscsiisolationdisabled needs to be False(ISCSI Isolation enabled for the account) for the new commands to work. |
…led for new commands to work.
Fixes #1210 |
New Feature - support subnet ACL management through cli