Skip to content

Commit a8651eb

Browse files
committed
Add support_status to policy type and profile type
This patch adds the 'support_status' field to profile type and policy type for the cluster service. Depends-On: I2f84d5292e7625affe060e8e4e20d821cde7e417 Change-Id: I4d4626d0f01852e5eafa90d63ab2ea56113a1989
1 parent 0f83add commit a8651eb

File tree

4 files changed

+18
-0
lines changed

4 files changed

+18
-0
lines changed

openstack/cluster/v1/policy_type.py

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -29,3 +29,5 @@ class PolicyType(resource.Resource):
2929
name = resource.Body('name', alternate_id=True)
3030
#: The schema of the policy type.
3131
schema = resource.Body('schema')
32+
#: The support status of the policy type
33+
support_status = resource.Body('support_status')

openstack/cluster/v1/profile_type.py

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -29,3 +29,5 @@ class ProfileType(resource.Resource):
2929
name = resource.Body('name', alternate_id=True)
3030
#: The schema of the profile type.
3131
schema = resource.Body('schema')
32+
#: The support status of the profile type
33+
support_status = resource.Body('support_status')

openstack/tests/unit/cluster/v1/test_policy_type.py

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,12 @@
1919
'name': 'FAKE_POLICY_TYPE',
2020
'schema': {
2121
'foo': 'bar'
22+
},
23+
'support_status': {
24+
'1.0': [{
25+
'status': 'supported',
26+
'since': '2016.10'
27+
}]
2228
}
2329
}
2430

@@ -39,3 +45,4 @@ def test_instantiate(self):
3945
self.assertEqual(FAKE['name'], sot._get_id(sot))
4046
self.assertEqual(FAKE['name'], sot.name)
4147
self.assertEqual(FAKE['schema'], sot.schema)
48+
self.assertEqual(FAKE['support_status'], sot.support_status)

openstack/tests/unit/cluster/v1/test_profile_type.py

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,12 @@
1919
'name': 'FAKE_PROFILE_TYPE',
2020
'schema': {
2121
'foo': 'bar'
22+
},
23+
'support_status': {
24+
'1.0': [{
25+
'status': 'supported',
26+
'since': '2016.10',
27+
}]
2228
}
2329
}
2430

@@ -39,3 +45,4 @@ def test_instantiate(self):
3945
self.assertEqual(FAKE['name'], sot._get_id(sot))
4046
self.assertEqual(FAKE['name'], sot.name)
4147
self.assertEqual(FAKE['schema'], sot.schema)
48+
self.assertEqual(FAKE['support_status'], sot.support_status)

0 commit comments

Comments
 (0)