-
Notifications
You must be signed in to change notification settings - Fork 194
Issue1234 #1245
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
Issue1234 #1245
Conversation
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.
A few minor style changes, otherwise looks good. Thanks.
SoftLayer/managers/image.py
Outdated
output_error.format(location_name, image_id) | ||
) | ||
|
||
locations_ids.append(matching_location.get('id')) |
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.
I'd change this to locations_ids.append(matching_location)
so that you can just pass that list directly to the API and you can remove the locations_ids = [{'id': location_id} for location_id in locations]
lines in your other two functions.
SoftLayer/managers/image.py
Outdated
:param int image_id: The ID of the image. | ||
:param list location_names: A list of location names strings. | ||
:returns: A list of locations IDs associated with the given location | ||
keynames in the image id. |
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.
make this 1 line
SoftLayer/managers/image.py
Outdated
break | ||
if matching_location.get('id') is None: | ||
raise exceptions.SoftLayerError( | ||
output_error.format(location_name, image_id) |
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.
make this 1 line
SoftLayer/CLI/image/datacenter.py
Outdated
@click.command() | ||
@click.argument('identifier') | ||
@click.option('--add/--remove', | ||
default=False, |
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.
default to True, so the default behavior will be to add dcs, and put this on the same line as --add/--remove
, help can be on its own line though.
Ability to set which DC an image has a copy in.