diff --git a/gbpautomation/heat/engine/resources/grouppolicy.py b/gbpautomation/heat/engine/resources/grouppolicy.py index 8be393f..1cfbee9 100644 --- a/gbpautomation/heat/engine/resources/grouppolicy.py +++ b/gbpautomation/heat/engine/resources/grouppolicy.py @@ -378,10 +378,11 @@ class PolicyTargetGroup(gbpresource.GBPResource): class L2Policy(gbpresource.GBPResource): PROPERTIES = ( - TENANT_ID, NAME, DESCRIPTION, L3_POLICY_ID, SHARED, REUSE_BD + TENANT_ID, NAME, DESCRIPTION, L3_POLICY_ID, + SHARED, REUSE_BD, NETWORK_ID ) = ( 'tenant_id', 'name', 'description', 'l3_policy_id', 'shared', - 'reuse_bd' + 'reuse_bd', 'network_id' ) properties_schema = { @@ -414,6 +415,11 @@ class L2Policy(gbpresource.GBPResource): properties.Schema.STRING, _('Existing L2P ID in same L3P.'), default=None, update_allowed=False + ), + NETWORK_ID: properties.Schema( + properties.Schema.STRING, + _('Network ID of the L2 policy.'), + update_allowed=False ) } diff --git a/gbpautomation/heat/tests/test_grouppolicy.py b/gbpautomation/heat/tests/test_grouppolicy.py index e8bf062..0c10307 100644 --- a/gbpautomation/heat/tests/test_grouppolicy.py +++ b/gbpautomation/heat/tests/test_grouppolicy.py @@ -164,7 +164,8 @@ l2_policy_template = ''' "description": "test L2 policy resource", "l3_policy_id": "l3-policy-id", "shared": True, - "reuse_bd": "other-l2p" + "reuse_bd": "other-l2p", + "network_id": "network-id" } } } @@ -993,6 +994,7 @@ class L2PolicyTest(HeatTestCase): "l3_policy_id": "l3-policy-id", "shared": True, "reuse_bd": "other-l2p", + "network_id": "network-id", } } tdict = {'l2_policy': {'id': '5678'}} @@ -1023,6 +1025,7 @@ class L2PolicyTest(HeatTestCase): "l3_policy_id": "l3-policy-id", "shared": True, "reuse_bd": "other-l2p", + "network_id": "network-id", } } exc = grouppolicy.NeutronClientException()