Skip to content

Commit 926e24b

Browse files
Merge pull request #1951 from BrianSantivanez/issue1942
New Command: `slcli security`
2 parents 7bfe9a3 + ceee75f commit 926e24b

18 files changed

+274
-12
lines changed

SoftLayer/CLI/environment.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -138,7 +138,8 @@ def list_commands(self, *path):
138138

139139
# offset is used to exclude the path that the caller requested.
140140
offset = len(path_str) + 1 if path_str else 0
141-
commands.append(command[offset:])
141+
if ':' not in command[offset:]:
142+
commands.append(command[offset:])
142143

143144
return sorted(commands)
144145

SoftLayer/CLI/routes.py

Lines changed: 22 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -332,18 +332,30 @@
332332
('securitygroup:event-log', 'SoftLayer.CLI.securitygroup.event_log:get_by_request_id'),
333333

334334
('sshkey', 'SoftLayer.CLI.sshkey'),
335-
('sshkey:add', 'SoftLayer.CLI.sshkey.add:cli'),
336-
('sshkey:remove', 'SoftLayer.CLI.sshkey.remove:cli'),
337-
('sshkey:edit', 'SoftLayer.CLI.sshkey.edit:cli'),
338-
('sshkey:list', 'SoftLayer.CLI.sshkey.list:cli'),
339-
('sshkey:print', 'SoftLayer.CLI.sshkey.print:cli'),
335+
('sshkey:add', 'SoftLayer.CLI.security.sshkey_add:cli'),
336+
('sshkey:remove', 'SoftLayer.CLI.security.sshkey_remove:cli'),
337+
('sshkey:edit', 'SoftLayer.CLI.security.sshkey_edit:cli'),
338+
('sshkey:list', 'SoftLayer.CLI.security.sshkey_list:cli'),
339+
('sshkey:print', 'SoftLayer.CLI.security.sshkey_print:cli'),
340340

341341
('ssl', 'SoftLayer.CLI.ssl'),
342-
('ssl:add', 'SoftLayer.CLI.ssl.add:cli'),
343-
('ssl:download', 'SoftLayer.CLI.ssl.download:cli'),
344-
('ssl:edit', 'SoftLayer.CLI.ssl.edit:cli'),
345-
('ssl:list', 'SoftLayer.CLI.ssl.list:cli'),
346-
('ssl:remove', 'SoftLayer.CLI.ssl.remove:cli'),
342+
('ssl:add', 'SoftLayer.CLI.security.cert_add:cli'),
343+
('ssl:download', 'SoftLayer.CLI.security.cert_download:cli'),
344+
('ssl:edit', 'SoftLayer.CLI.security.cert_edit:cli'),
345+
('ssl:list', 'SoftLayer.CLI.security.cert_list:cli'),
346+
('ssl:remove', 'SoftLayer.CLI.security.cert_remove:cli'),
347+
348+
('security', 'SoftLayer.CLI.security'),
349+
('security:sshkey-add', 'SoftLayer.CLI.security.sshkey_add:cli'),
350+
('security:sshkey-remove', 'SoftLayer.CLI.security.sshkey_remove:cli'),
351+
('security:sshkey-edit', 'SoftLayer.CLI.security.sshkey_edit:cli'),
352+
('security:sshkey-list', 'SoftLayer.CLI.security.sshkey_list:cli'),
353+
('security:sshkey-print', 'SoftLayer.CLI.security.sshkey_print:cli'),
354+
('security:cert-add', 'SoftLayer.CLI.security.cert_add:cli'),
355+
('security:cert-download', 'SoftLayer.CLI.security.cert_download:cli'),
356+
('security:cert-edit', 'SoftLayer.CLI.security.cert_edit:cli'),
357+
('security:cert-list', 'SoftLayer.CLI.security.cert_list:cli'),
358+
('security:cert-remove', 'SoftLayer.CLI.security.cert_remove:cli'),
347359

348360
('subnet', 'SoftLayer.CLI.subnet'),
349361
('subnet:cancel', 'SoftLayer.CLI.subnet.cancel:cli'),

SoftLayer/CLI/security/__init__.py

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
"""SSH Keys and SSL Certificates."""
2+
# :license: MIT, see LICENSE for more details.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.

0 commit comments

Comments
 (0)