Skip to content
Snippets Groups Projects
Commit b102e196 authored by Lluis Gifre Renom's avatar Lluis Gifre Renom
Browse files

Adaptation of Slice:

- Corrected usage of ConfigRules to use new custom ConfigRules
parent 4728d07c
No related branches found
No related tags found
1 merge request!54Release 2.0.0
......@@ -62,8 +62,8 @@ class SliceServiceServicerImpl(SliceServiceServicer):
config_rule = service_request.service_config.config_rules.add()
config_rule.action = ConfigActionEnum.CONFIGACTION_SET
config_rule.resource_key = '/settings'
config_rule.resource_value = json.dumps(
config_rule.custom.resource_key = '/settings'
config_rule.custom.resource_value = json.dumps(
{'mtu': 1512, 'address_families': ['IPV4'], 'bgp_as': 65000, 'bgp_route_target': '65000:333'},
sort_keys=True)
......@@ -77,8 +77,9 @@ class SliceServiceServicerImpl(SliceServiceServicer):
config_rule = service_request.service_config.config_rules.add()
config_rule.action = ConfigActionEnum.CONFIGACTION_SET
config_rule.resource_key = '/device[{:s}]/endpoint[{:s}]/settings'.format(device_uuid, endpoint_uuid)
config_rule.resource_value = json.dumps(
config_rule.custom.resource_key = '/device[{:s}]/endpoint[{:s}]/settings'.format(
device_uuid, endpoint_uuid)
config_rule.custom.resource_value = json.dumps(
{'router_id': '0.0.0.0', 'route_distinguisher': '0:0', 'sub_interface_index': 0, 'vlan_id': 0,
'address_ip': '0.0.0.0', 'address_prefix': 0},
sort_keys=True)
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment