Skip to content

Commit 389591b

Browse files
ralonsohstephenfin
authored andcommitted
tests: Drop testing for address scope shared attribute
Neutron has removed the 'shared' attribute from address scopes [1]. We may wish to drop this feature entirely, but for now drop the test that no longer functions. [1] https://review.opendev.org/c/openstack/neutron/+/887965 Change-Id: I58b74e15791e1079a84696f23fdf66e324fbdb08 Signed-off-by: Rodolfo Alonso Hernandez <ralonsoh@redhat.com> Assisted-By: Composer 2.5 Related-Bug: #2026547
1 parent 8481e0c commit 389591b

1 file changed

Lines changed: 4 additions & 31 deletions

File tree

‎openstackclient/tests/functional/network/v2/test_address_scope.py‎

Lines changed: 4 additions & 31 deletions
Original file line numberDiff line numberDiff line change
@@ -34,8 +34,6 @@ def test_address_scope_delete(self):
3434
name1,
3535
cmd_output['name'],
3636
)
37-
# Check the default values
38-
self.assertFalse(cmd_output['shared'])
3937

4038
name2 = uuid.uuid4().hex
4139
cmd_output = self.openstack(
@@ -56,7 +54,7 @@ def test_address_scope_list(self):
5654
"""Test create defaults, list filters, delete"""
5755
name1 = uuid.uuid4().hex
5856
cmd_output = self.openstack(
59-
'address scope create ' + '--ip-version 4 ' + '--share ' + name1,
57+
'address scope create ' + '--ip-version 4 ' + name1,
6058
parse_output=True,
6159
)
6260
self.addCleanup(self.openstack, 'address scope delete ' + name1)
@@ -68,14 +66,10 @@ def test_address_scope_list(self):
6866
4,
6967
cmd_output['ip_version'],
7068
)
71-
self.assertTrue(cmd_output['shared'])
7269

7370
name2 = uuid.uuid4().hex
7471
cmd_output = self.openstack(
75-
'address scope create '
76-
+ '--ip-version 6 '
77-
+ '--no-share '
78-
+ name2,
72+
'address scope create ' + '--ip-version 6 ' + name2,
7973
parse_output=True,
8074
)
8175
self.addCleanup(self.openstack, 'address scope delete ' + name2)
@@ -87,7 +81,6 @@ def test_address_scope_list(self):
8781
6,
8882
cmd_output['ip_version'],
8983
)
90-
self.assertFalse(cmd_output['shared'])
9184

9285
# Test list
9386
cmd_output = self.openstack(
@@ -98,30 +91,12 @@ def test_address_scope_list(self):
9891
self.assertIn(4, col_data)
9992
self.assertIn(6, col_data)
10093

101-
# Test list --share
102-
cmd_output = self.openstack(
103-
'address scope list --share',
104-
parse_output=True,
105-
)
106-
col_data = [x["Shared"] for x in cmd_output]
107-
self.assertIn(True, col_data)
108-
self.assertNotIn(False, col_data)
109-
110-
# Test list --no-share
111-
cmd_output = self.openstack(
112-
'address scope list --no-share',
113-
parse_output=True,
114-
)
115-
col_data = [x["Shared"] for x in cmd_output]
116-
self.assertIn(False, col_data)
117-
self.assertNotIn(True, col_data)
118-
11994
def test_address_scope_set(self):
12095
"""Tests create options, set, show, delete"""
12196
name = uuid.uuid4().hex
12297
newname = name + "_"
12398
cmd_output = self.openstack(
124-
'address scope create ' + '--ip-version 4 ' + '--no-share ' + name,
99+
'address scope create ' + '--ip-version 4 ' + name,
125100
parse_output=True,
126101
)
127102
self.addCleanup(self.openstack, 'address scope delete ' + newname)
@@ -133,10 +108,9 @@ def test_address_scope_set(self):
133108
4,
134109
cmd_output['ip_version'],
135110
)
136-
self.assertFalse(cmd_output['shared'])
137111

138112
raw_output = self.openstack(
139-
'address scope set ' + '--name ' + newname + ' --share ' + name,
113+
'address scope set ' + '--name ' + newname + ' ' + name,
140114
)
141115
self.assertOutput('', raw_output)
142116

@@ -152,4 +126,3 @@ def test_address_scope_set(self):
152126
4,
153127
cmd_output['ip_version'],
154128
)
155-
self.assertTrue(cmd_output['shared'])

0 commit comments

Comments
 (0)