Commit 4387f2d7 authored by Pablo Armingol's avatar Pablo Armingol
Browse files

Refactor: Remove TAPI LSP references and add RuleEndpoint message structure in IPOWDM service

parent a0226a17
Loading
Loading
Loading
Loading
+0 −1
Original line number Diff line number Diff line
@@ -21,7 +21,6 @@ import "google/protobuf/any.proto";
import "acl.proto";
import "ipowdm.proto";
import "kpi_sample_types.proto";
import "tapi_lsp.proto";

service ContextService {
  rpc ListContextIds     (Empty         ) returns (       ContextIdList   ) {}
+13 −5
Original line number Diff line number Diff line
@@ -15,10 +15,18 @@
syntax = "proto3";
package ipowdm;

message RuleEndpoint {
    string uuid = 1;
    string ip_address = 2;
    string ip_mask = 3;
    int32 vlan_id = 4;
    float power = 5;
    float frequency = 6;
}

message IpowdmRuleSet {
  string  src  = 1;
  string  dst  = 2;
  string  uuid = 3;
  string  bw   = 4;
  string  unit = 5;
    repeated RuleEndpoint src = 1;
    repeated RuleEndpoint dst = 2;
    int32 bw = 3;
    string uuid = 4;
}
 No newline at end of file
+0 −10
Original line number Diff line number Diff line
@@ -93,13 +93,3 @@ def json_service_ipowdm_planned(
        service_uuid, ServiceTypeEnum.SERVICETYPE_IPOWDM, context_id=json_context_id(context_uuid),
        status=ServiceStatusEnum.SERVICESTATUS_PLANNED, endpoint_ids=endpoint_ids, constraints=constraints,
        config_rules=config_rules)

def json_service_tapi_lsp_planned(
        service_uuid : str, endpoint_ids : List[Dict] = [], constraints : List[Dict] = [],
        config_rules : List[Dict] = [], context_uuid : str = DEFAULT_CONTEXT_NAME
    ):

    return json_service(
        service_uuid, ServiceTypeEnum.SERVICETYPE_TAPI_LSP, context_id=json_context_id(context_uuid),
        status=ServiceStatusEnum.SERVICESTATUS_PLANNED, endpoint_ids=endpoint_ids, constraints=constraints,
        config_rules=config_rules)
+1 −0
Original line number Diff line number Diff line
@@ -115,6 +115,7 @@ class EmulatedDriver(_Driver):
    @metered_subclass_method(METRICS_POOL)
    def SetConfig(self, resources : List[Tuple[str, Any]]) -> List[Union[bool, Exception]]:
        chk_type('resources', resources, list)
        LOGGER.debug('SetConfig: resources=%s', resources)
        if len(resources) == 0: return []
        results = []
        resolver = anytree.Resolver(pathattr='name')
+0 −2
Original line number Diff line number Diff line
@@ -20,8 +20,6 @@ from common.type_checkers.Checkers import chk_string, chk_type
from device.service.driver_api._Driver import _Driver, RESOURCE_ENDPOINTS, RESOURCE_SERVICES
from device.service.driver_api.ImportTopologyEnum import ImportTopologyEnum, get_import_topology
from .TfsApiClient import TfsApiClient
from .templates.tools import create_request
#from .TfsOpticalClient import TfsOpticalClient

LOGGER = logging.getLogger(__name__)

Loading