Skip to content

Commit d4a72b3

Browse files
committed
Address comments and add appropriate code
1 parent a0da453 commit d4a72b3

File tree

3 files changed

+18
-12
lines changed

3 files changed

+18
-12
lines changed

SoftLayer/CLI/image/export.py

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,9 @@
1515
@click.option('--ibm-api-key',
1616
default="",
1717
help="The IBM Cloud API Key with access to IBM Cloud Object "
18-
"Storage instance.")
18+
"Storage instance. For help creating this key see "
19+
"https://console.bluemix.net/docs/services/cloud-object-"
20+
"storage/iam/users-serviceids.html#serviceidapikeys")
1921
@environment.pass_env
2022
def cli(env, identifier, uri, ibm_api_key):
2123
"""Export an image to object storage.

SoftLayer/CLI/image/import.py

Lines changed: 10 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -22,24 +22,28 @@
2222
@click.option('--ibm-api-key',
2323
default="",
2424
help="The IBM Cloud API Key with access to IBM Cloud Object "
25-
"Storage instance.")
25+
"Storage instance. For help creating this key see "
26+
"https://console.bluemix.net/docs/services/cloud-object-"
27+
"storage/iam/users-serviceids.html#serviceidapikeys")
2628
@click.option('--root-key-id',
2729
default="",
2830
help="ID of the root key in Key Protect")
2931
@click.option('--wrapped-dek',
3032
default="",
31-
help="Wrapped Decryption Key provided by IBM KeyProtect")
33+
help="Wrapped Data Encryption Key provided by IBM KeyProtect. "
34+
"For more info see https://console.bluemix.net/docs/"
35+
"services/key-protect/wrap-keys.html#wrap-keys")
3236
@click.option('--kp-id',
3337
default="",
3438
help="ID of the IBM Key Protect Instance")
3539
@click.option('--cloud-init',
36-
default="",
37-
help="Specifies if image is cloud init")
40+
is_flag=True,
41+
help="Specifies if image is cloud-init")
3842
@click.option('--byol',
39-
default="",
43+
is_flag=True,
4044
help="Specifies if image is bring your own license")
4145
@click.option('--is-encrypted',
42-
default="",
46+
is_flag=True,
4347
help="Specifies if image is encrypted")
4448
@environment.pass_env
4549
def cli(env, name, note, os_code, uri, ibm_api_key, root_key_id, wrapped_dek,

SoftLayer/managers/image.py

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -122,8 +122,8 @@ def edit(self, image_id, name=None, note=None, tag=None):
122122

123123
def import_image_from_uri(self, name, uri, os_code=None, note=None,
124124
ibm_api_key=None, root_key_id=None,
125-
wrapped_dek=None, kp_id=None, cloud_init=None,
126-
byol=None, is_encrypted=None):
125+
wrapped_dek=None, kp_id=None, cloud_init=False,
126+
byol=False, is_encrypted=False):
127127
"""Import a new image from object storage.
128128
129129
:param string name: Name of the new image
@@ -138,10 +138,10 @@ def import_image_from_uri(self, name, uri, os_code=None, note=None,
138138
:param string ibm_api_key: Ibm Api Key needed to communicate with ICOS
139139
and Key Protect
140140
:param string root_key_id: ID of the root key in Key Protect
141-
:param string wrapped_dek: Wrapped Decryption Key provided by IBM
142-
KeyProtect
141+
:param string wrapped_dek: Wrapped Data Encryption Key provided by
142+
IBM KeyProtect
143143
:param string kp_id: ID of the IBM Key Protect Instance
144-
:param boolean cloud_init: Specifies if image is cloud init
144+
:param boolean cloud_init: Specifies if image is cloud-init
145145
:param boolean byol: Specifies if image is bring your own license
146146
:param boolean is_encrypted: Specifies if image is encrypted
147147
"""

0 commit comments

Comments
 (0)