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

Fixed CI/CD pipeline:

- Proto and Assertions for NBI tests
- PolicyClient for Automation component
parent c95b253c
No related branches found
No related tags found
2 merge requests!294Release TeraFlowSDN 4.0,!284Resolve: "(CNIT) Multi-Granular Optical Nodes and Optical Transpoders management"
This commit is part of merge request !284. Comments created here will be created in the context of that merge request.
......@@ -154,8 +154,7 @@ message Topology {
string name = 2;
repeated DeviceId device_ids = 3;
repeated LinkId link_ids = 4;
repeated LinkId optical_link_ids=5;
repeated LinkId optical_link_ids = 5;
}
message TopologyDetails {
......@@ -163,8 +162,7 @@ message TopologyDetails {
string name = 2;
repeated Device devices = 3;
repeated Link links = 4;
repeated OpticalLink optical_links =5 ;
repeated OpticalLink optical_links = 5;
}
message TopologyIdList {
......
......@@ -19,7 +19,7 @@ from common.proto.policy_pb2 import PolicyRuleService, PolicyRuleState
from common.proto.policy_pb2_grpc import PolicyServiceStub
from common.tools.client.RetryDecorator import retry, delay_exponential
from common.tools.grpc.Tools import grpc_message_to_json_string
from common.proto.openconfig_device_pb2_grpc import OpenConfigServiceStub
LOGGER = logging.getLogger(__name__)
MAX_RETRIES = 15
DELAY_FUNCTION = delay_exponential(initial=0.01, increment=2.0, maximum=5.0)
......@@ -40,7 +40,6 @@ class PolicyClient:
def connect(self):
self.channel = grpc.insecure_channel(self.endpoint)
self.stub = PolicyServiceStub(self.channel)
self.openconfig_stub=OpenConfigServiceStub(self.channel)
def close(self):
if self.channel is not None: self.channel.close()
......
......@@ -451,7 +451,7 @@ def validate_slice(message):
def validate_topology(message, num_devices=None, num_links=None):
assert isinstance(message, dict)
assert len(message.keys()) == 4
assert len(message.keys()) == 5
assert 'topology_id' in message
validate_topology_id(message['topology_id'])
assert 'name' in message
......@@ -464,6 +464,10 @@ def validate_topology(message, num_devices=None, num_links=None):
assert isinstance(message['link_ids'], list)
if num_links is not None: assert len(message['link_ids']) == num_links
for link_id in message['link_ids']: validate_link_id(link_id)
assert 'optical_link_ids' in message
assert isinstance(message['optical_link_ids'], list)
if num_links is not None: assert len(message['optical_link_ids']) == num_links
for link_id in message['optical_link_ids']: validate_link_id(link_id)
def validate_endpoint(message):
assert isinstance(message, dict)
......
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