-
Notifications
You must be signed in to change notification settings - Fork 194
Implementation for volume-counting #819
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
Implemented replica-locations and replica-partners for improved Experience when replicating or looking up information on replicants.
The CLI doc still had some old commands in it, so those have been removed. There have also been new commands added to slcli that weren't reflected in the doc.
…eed to be resolved now
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.
basically undo your changes to the block/file managers. and just send in the objectMask you need in the CLI command.
Try to get the code coverage up a bit as well if possible.
'activeTransactionCount' | ||
'activeTransactionCount', | ||
'replicationPartnerCount', | ||
',replicationPartners[id,username,' |
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.
"," at the start and end of the lines are not needed, as they are added by the join at the botton
] | ||
kwargs['mask'] = ','.join(items) | ||
|
||
# Retrieve relevant replicant information to be displayed. |
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.
These items are already in the mask above. Remove this section.
'serviceResourceBackendIpAddress', | ||
'activeTransactionCount', | ||
'fileNetworkMountAddress' | ||
'fileNetworkMountAddress', |
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.
Same comments as the block section
|
||
file_manager = SoftLayer.FileStorageManager(env.client) | ||
file_volumes = file_manager.list_file_volumes(datacenter=datacenter, | ||
mask=columns.mask()) |
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.
instead of modifying the mask in the manager, just do something like this. fix the line width so tox doesn't complain about it too.
mask = "mask[serviceResource[datacenter[name]],replicationPartners[serviceResource[datacenter[name]]]]"
block_volumes = block_manager.list_block_volumes(datacenter=datacenter,
mask=mask)
def cli(env, sortby, columns, datacenter): | ||
"""List number of block storage volumes per datacenter.""" | ||
block_manager = SoftLayer.BlockStorageManager(env.client) | ||
block_volumes = block_manager.list_block_volumes(datacenter=datacenter, |
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.
same comment as in the file volume-count CLI command
Work from this pull request is continued in #856. |
2 new commands:
slcli block volume-count
slcli file volume-count
improved display of information in block and file volume-list