Commit 8fbe539d authored by Lluis Gifre Renom's avatar Lluis Gifre Renom
Browse files

Merge branch 'develop' of https://labs.etsi.org/rep/tfs/controller into feat/tutorial

parents e48499f1 568149a1
Loading
Loading
Loading
Loading
+2 −2
Original line number Diff line number Diff line
@@ -22,7 +22,7 @@ import "policy.proto";
service ContextPolicyService {
  rpc ListPolicyRuleIds(context.Empty         ) returns (policy.PolicyRuleIdList) {}
  rpc ListPolicyRules  (context.Empty         ) returns (policy.PolicyRuleList  ) {}
  rpc GetPolicyRule    (policy.PolicyRuleId   ) returns (policy.PolicyRuleBasic ) {}
  rpc SetPolicyRule    (policy.PolicyRuleBasic) returns (policy.PolicyRuleId    ) {}
  rpc GetPolicyRule    (policy.PolicyRuleId   ) returns (policy.PolicyRule      ) {}
  rpc SetPolicyRule    (policy.PolicyRule     ) returns (policy.PolicyRuleId    ) {}
  rpc RemovePolicyRule (policy.PolicyRuleId   ) returns (context.Empty          ) {}
}
+11 −2
Original line number Diff line number Diff line
@@ -30,7 +30,7 @@ service PolicyService {
  rpc GetPolicyByServiceId (context.ServiceId) returns (PolicyRuleServiceList) {}
}

enum RuleState {
enum PolicyRuleStateEnum {
  POLICY_UNDEFINED = 0;     // Undefined rule state
  POLICY_FAILED = 1;        // Rule failed
  POLICY_INSERTED = 2;      // Rule is just inserted
@@ -49,7 +49,8 @@ message PolicyRuleId {
}

message PolicyRuleState {
  RuleState policyRuleState = 1;
  PolicyRuleStateEnum policyRuleState = 1;
  string policyRuleStateMessage = 2;
}

// Basic policy rule attributes
@@ -83,6 +84,14 @@ message PolicyRuleDevice {
  repeated context.DeviceId deviceList = 2;
}

// Wrapper policy rule object
message PolicyRule {
  oneof policy_rule {
    PolicyRuleService service = 1;
    PolicyRuleDevice device = 2;
  }
}

// A list of policy rule IDs
message PolicyRuleIdList {
  repeated PolicyRuleId policyRuleIdList = 1;
+12 −1
Original line number Diff line number Diff line
@@ -18,7 +18,7 @@ package policy;
// Action
message PolicyRuleAction {
  PolicyRuleActionEnum action = 1;
  repeated string parameters = 2;
  repeated PolicyRuleActionConfig action_config = 2;
}

enum PolicyRuleActionEnum {
@@ -27,3 +27,14 @@ enum PolicyRuleActionEnum {
  POLICYRULE_ACTION_ADD_SERVICE_CONFIGRULE = 2;
  POLICYRULE_ACTION_ADD_SERVICE_CONSTRAINT = 3;
}

// Action configuration
message PolicyRuleActionConfig {
  string action_key = 1;
  string action_value = 2;
}

// message PolicyRuleAction {
//   PolicyRuleActionEnum action = 1;
//   repeated string parameters = 2;
// }
 No newline at end of file
+1 −0
Original line number Diff line number Diff line
@@ -44,6 +44,7 @@ def parse(xml_data : ET.Element) -> List[Tuple[str, Dict[str, Any]]]:
        component_type = xml_component.find(
            'ocpp:port/ocpp:breakout-mode/ocpp:state/ocpp:channel-speed', namespaces=NAMESPACES)
        add_value_from_tag(endpoint, 'type', component_type)
        if 'type' not in endpoint: endpoint['type'] = '-'

        sample_types = {
            ORM_KpiSampleTypeEnum.BYTES_RECEIVED.value     : XPATH_IFACE_COUNTER.format(endpoint['uuid'], 'in-octets' ),
+13 −13
Original line number Diff line number Diff line
@@ -5,29 +5,30 @@
        <config>
            <name>{{name}}</name>
            <type xmlns:oc-ni-types="http://openconfig.net/yang/network-instance-types">oc-ni-types:{{type}}</type>
            {% if type=='L3VRF' %}
            {% if description is defined %}<description>{{description}}</description>{% endif %}
            <enabled>true</enabled>
            {% if type=='L3VRF' %}
            {% if router_id is defined %}<router-id>{{router_id}}</router-id>{% endif %}
            <route-distinguisher>{{route_distinguisher}}</route-distinguisher>
            <enabled>true</enabled>
            {% endif %}
            {% if type=='L2VSI' %}
            <mtu>1500</mtu>
            {% endif %}
        </config>
        {% if type=='L3VRF' or type=='L2VSI' %}
        <encapsulation>
            <config>
                {% if type=='L3VRF' %}
                <encapsulation-type xmlns:oc-ni-types="http://openconfig.net/yang/network-instance-types">oc-ni-types:MPLS</encapsulation-type>
                <label-allocation-mode xmlns:oc-ni-types="http://openconfig.net/yang/network-instance-types">oc-ni-types:INSTANCE_LABEL</label-allocation-mode>
            </config>
        </encapsulation>
                {% endif %}
                {% if type=='L2VSI' %}
            {% if description is defined %}<description>{{description}}</description>{% endif %}
            <enabled>true</enabled>
            <mtu>1500</mtu>
        </config>
        <encapsulation>
            <config>
                <encapsulation-type xmlns:oc-ni-types="http://openconfig.net/yang/network-instance-types">oc-ni-types:MPLS</encapsulation-type>
                {% endif %}
            </config>
        </encapsulation>
        {% endif %}
        {% if type=='L2VSI' %}
        <fdb>
            <config>
                <mac-learning>true</mac-learning>
@@ -36,7 +37,6 @@
            </config>
        </fdb>
        {% endif %}

        {% endif %}
    </network-instance>
</network-instances>
Loading