Thanks to visit codestin.com
Credit goes to github.com

Skip to content

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

Merged
merged 3 commits into from
Jan 28, 2020

Conversation

oarosale
Copy link
Contributor

New Feature - support subnet ACL management through cli

@coveralls
Copy link

coveralls commented Jan 23, 2020

Coverage Status

Coverage decreased (-0.08%) to 93.822% when pulling 54943d3 on oarosale:issue#1210 into 867a04b on softlayer:master.

@oarosale
Copy link
Contributor Author

Testing new changes.txt

Copy link
Member

@allmightyspiff allmightyspiff left a 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.

  1. Are these feature not relevant to File storage? If so, would be a good idea to add the corresponding File commands as well.
  2. use the string.format() style for adding variables into strings in your click.echo statements.
  3. 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?
  4. 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.

@oarosale
Copy link
Contributor Author

Made changes requested. See new help display:
help display for new commands.txt

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) +
Copy link
Member

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.

@oarosale
Copy link
Contributor Author

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.

@allmightyspiff
Copy link
Member

Fixes #1210

@allmightyspiff allmightyspiff merged commit 568ffea into softlayer:master Jan 28, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants