Skip to content

Commit

Permalink
Merge pull request #1071 from Anjana-Rajagopal/feature/NETWORK-8987
Browse files Browse the repository at this point in the history
NETWORK-8987 - added createDate and modifyDate parameters to sg rule-list
  • Loading branch information
allmightyspiff committed Nov 9, 2018
2 parents d2e81fe + 543c06b commit d6821f3
Show file tree
Hide file tree
Showing 3 changed files with 10 additions and 4 deletions.
8 changes: 6 additions & 2 deletions SoftLayer/CLI/securitygroup/rule.py
Expand Up @@ -15,7 +15,9 @@
'ethertype',
'portRangeMin',
'portRangeMax',
'protocol']
'protocol',
'createDate',
'modifyDate']


@click.command()
Expand Down Expand Up @@ -49,7 +51,9 @@ def rule_list(env, securitygroup_id, sortby):
rule.get('ethertype') or formatting.blank(),
port_min,
port_max,
rule.get('protocol') or formatting.blank()
rule.get('protocol') or formatting.blank(),
rule.get('createDate') or formatting.blank(),
rule.get('modifyDate') or formatting.blank()
])

env.fout(table)
Expand Down
2 changes: 1 addition & 1 deletion SoftLayer/managers/network.py
Expand Up @@ -372,7 +372,7 @@ def get_securitygroup(self, group_id, **kwargs):
'description,'
'''rules[id, remoteIp, remoteGroupId,
direction, ethertype, portRangeMin,
portRangeMax, protocol],'''
portRangeMax, protocol, createDate, modifyDate],'''
'''networkComponentBindings[
networkComponent[
id,
Expand Down
4 changes: 3 additions & 1 deletion tests/CLI/modules/securitygroup_tests.py
Expand Up @@ -118,7 +118,9 @@ def test_securitygroup_rule_list(self):
'remoteGroupId': None,
'protocol': None,
'portRangeMin': None,
'portRangeMax': None}],
'portRangeMax': None,
'createDate': None,
'modifyDate': None}],
json.loads(result.output))

def test_securitygroup_rule_add(self):
Expand Down

0 comments on commit d6821f3

Please sign in to comment.