Skip to content

Commit d6821f3

Browse files
Merge pull request #1071 from Anjana-Rajagopal/feature/NETWORK-8987
NETWORK-8987 - added createDate and modifyDate parameters to sg rule-list
2 parents d2e81fe + 543c06b commit d6821f3

File tree

3 files changed

+10
-4
lines changed

3 files changed

+10
-4
lines changed

SoftLayer/CLI/securitygroup/rule.py

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,9 @@
1515
'ethertype',
1616
'portRangeMin',
1717
'portRangeMax',
18-
'protocol']
18+
'protocol',
19+
'createDate',
20+
'modifyDate']
1921

2022

2123
@click.command()
@@ -49,7 +51,9 @@ def rule_list(env, securitygroup_id, sortby):
4951
rule.get('ethertype') or formatting.blank(),
5052
port_min,
5153
port_max,
52-
rule.get('protocol') or formatting.blank()
54+
rule.get('protocol') or formatting.blank(),
55+
rule.get('createDate') or formatting.blank(),
56+
rule.get('modifyDate') or formatting.blank()
5357
])
5458

5559
env.fout(table)

SoftLayer/managers/network.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -372,7 +372,7 @@ def get_securitygroup(self, group_id, **kwargs):
372372
'description,'
373373
'''rules[id, remoteIp, remoteGroupId,
374374
direction, ethertype, portRangeMin,
375-
portRangeMax, protocol],'''
375+
portRangeMax, protocol, createDate, modifyDate],'''
376376
'''networkComponentBindings[
377377
networkComponent[
378378
id,

tests/CLI/modules/securitygroup_tests.py

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -118,7 +118,9 @@ def test_securitygroup_rule_list(self):
118118
'remoteGroupId': None,
119119
'protocol': None,
120120
'portRangeMin': None,
121-
'portRangeMax': None}],
121+
'portRangeMax': None,
122+
'createDate': None,
123+
'modifyDate': None}],
122124
json.loads(result.output))
123125

124126
def test_securitygroup_rule_add(self):

0 commit comments

Comments
 (0)