|
19 | 19 | @environment.pass_env |
20 | 20 | def cli(env, identifier, username_storage, portable_id): |
21 | 21 | """Authorize File, Block and Portable Storage to a Virtual Server.""" |
22 | | - vs = SoftLayer.VSManager(env.client) |
23 | | - vs_id = helpers.resolve_id(vs.resolve_ids, identifier, 'vs') |
| 22 | + virtual = SoftLayer.VSManager(env.client) |
| 23 | + virtual_id = helpers.resolve_id(virtual.resolve_ids, identifier, 'virtual') |
24 | 24 | table = formatting.KeyValueTable(['name', 'value'], title="Portable Storage Detail") |
25 | 25 | table.align['name'] = 'r' |
26 | 26 | table.align['value'] = 'l' |
27 | 27 |
|
28 | 28 | if username_storage: |
29 | | - if not vs.authorize_storage(vs_id, username_storage): |
| 29 | + if not virtual.authorize_storage(virtual_id, username_storage): |
30 | 30 | raise exceptions.CLIAbort('Authorize Volume Failed') |
31 | 31 | env.fout('Successfully Volume: %s was Added.' % username_storage) |
32 | 32 | if portable_id: |
33 | | - portable_id = helpers.resolve_id(vs.resolve_ids, portable_id, 'storage') |
34 | | - portable_result = vs.attach_portable_storage(vs_id, portable_id) |
| 33 | + portable_id = helpers.resolve_id(virtual.resolve_ids, portable_id, 'storage') |
| 34 | + portable_result = virtual.attach_portable_storage(virtual_id, portable_id) |
35 | 35 |
|
36 | 36 | env.fout('Successfully Portable Storage: %i was Added.' % portable_id) |
37 | 37 |
|
|
0 commit comments