-
Notifications
You must be signed in to change notification settings - Fork 194
Icos image support #1053
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
Icos image support #1053
Conversation
Change image manager to include IBM Cloud Object Storage support and add unit tests for it.
allmightyspiff
left a comment
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.
Overall good change, just use the click flags on the import command and this should be good to go.
| @click.option('--kp-id', | ||
| default="", | ||
| help="ID of the IBM Key Protect Instance") | ||
| @click.option('--cloud-init', |
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.
Click has an option is_flag=True, which should be used here. This way you don't need the default="" bit
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.
Will change in the next commit.
| help="The referenceCode of the operating system software" | ||
| " description for the imported VHD") | ||
| " description for the imported VHD, ISO, or RAW image") | ||
| @click.option('--ibm-api-key', |
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'm not terribly familiar with IBM COS, but are these values obvious to someone who has used IBM COS? If not could you add some sort of info on where to get the various keys?
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 will add some links to our documentation on the ibm-api-key and the wrapped-dek.
fode-ibm
left a comment
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.
Requested changes to various option default values and types.
SoftLayer/CLI/image/import.py
Outdated
| help="ID of the root key in Key Protect") | ||
| @click.option('--wrapped-dek', | ||
| default="", | ||
| help="Wrapped Decryption Key provided by IBM KeyProtect") |
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.
Change to, "Wrapped Data Encryption Key provided by IBM KeyProtect".
SoftLayer/CLI/image/import.py
Outdated
| default="", | ||
| help="ID of the IBM Key Protect Instance") | ||
| @click.option('--cloud-init', | ||
| default="", |
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 value should be Boolean, which should change this option type to Boolean as well
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.
The default values for these flags are going to be removed in the next patch. is_flag=True, removes the need to have a default value.
SoftLayer/CLI/image/import.py
Outdated
| default="", | ||
| help="Specifies if image is cloud init") | ||
| @click.option('--byol', | ||
| default="", |
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 value should be Boolean, which should change this option type to Boolean as well.
SoftLayer/CLI/image/import.py
Outdated
| default="", | ||
| help="Specifies if image is bring your own license") | ||
| @click.option('--is-encrypted', | ||
| default="", |
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 value should be Boolean
SoftLayer/CLI/image/import.py
Outdated
| help="ID of the IBM Key Protect Instance") | ||
| @click.option('--cloud-init', | ||
| default="", | ||
| help="Specifies if image is cloud init") |
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.
The term, "cloud-init" should have hyphen, as it is the name of a specification. Change to, "Specifies whether image is enabled for cloud initialization using cloud-init".
SoftLayer/CLI/image/export.py
Outdated
| @click.argument('identifier') | ||
| @click.argument('uri') | ||
| @click.option('--ibm-api-key', | ||
| default="", |
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.
Consider changing default to None, rather than empty string.
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.
Will add on next commit.
SoftLayer/CLI/image/import.py
Outdated
| " description for the imported VHD") | ||
| " description for the imported VHD, ISO, or RAW image") | ||
| @click.option('--ibm-api-key', | ||
| default="", |
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.
Consider changing default to None, rather than empty string.
SoftLayer/CLI/image/import.py
Outdated
| help="The IBM Cloud API Key with access to IBM Cloud Object " | ||
| "Storage instance.") | ||
| @click.option('--root-key-id', | ||
| default="", |
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.
Consider changing default to None, rather than empty string.
SoftLayer/CLI/image/import.py
Outdated
| default="", | ||
| help="Wrapped Decryption Key provided by IBM KeyProtect") | ||
| @click.option('--kp-id', | ||
| default="", |
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.
Consider changing default to None, rather than empty string.
SoftLayer/CLI/image/import.py
Outdated
| default="", | ||
| help="ID of the root key in Key Protect") | ||
| @click.option('--wrapped-dek', | ||
| default="", |
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.
Consider changing default to None, rather than empty string.
Add export/import capabilities to/from IBM Cloud Object Storage to the image manager as well as the slcli. Unit tests updated to include tests for COS path.