Commit 73257ed0 authored by Pablo Armingol's avatar Pablo Armingol
Browse files

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

parents 1ac2f7e3 2b800e74
Loading
Loading
Loading
Loading
+2 −0
Original line number Diff line number Diff line
@@ -42,6 +42,8 @@ spec:
          value: "0.5"
        - name: MONITORED_KPIS_TIME_INTERVAL_AGG
          value: "60"
        - name: TEST_ML_MODEL
          value: "0"
        readinessProbe:
          exec:
            command: ["/bin/grpc_health_probe", "-addr=:10001"]
+3 −4
Original line number Diff line number Diff line
@@ -13,15 +13,14 @@
// limitations under the License.

syntax = "proto3";
package l3_attackmitigator;

import "context.proto";
import "l3_centralizedattackdetector.proto";

service L3Attackmitigator{
  // Perform Mitigation
  rpc PerformMitigation (L3AttackmitigatorOutput) returns (context.Empty) {}
  // Get Mitigation
  rpc PerformMitigation (L3AttackmitigatorOutput) returns (l3_centralizedattackdetector.StatusMessage) {}
  rpc GetMitigation (context.Empty) returns (context.Empty) {}
  // Get Configured ACL Rules
  rpc GetConfiguredACLRules (context.Empty) returns (ACLRules) {}
}

+9 −0
Original line number Diff line number Diff line
@@ -13,6 +13,7 @@
// limitations under the License.

syntax = "proto3";
package l3_centralizedattackdetector;

import "context.proto";

@@ -25,6 +26,10 @@ service L3Centralizedattackdetector {

  // Get the list of features used by the ML model in the CAD component
  rpc GetFeaturesIds (context.Empty) returns (AutoFeatures) {}

  // Sets the list of attack IPs in order to be used to compute the prediction accuracy of the
  // ML model in the CAD component in case of testing the ML model.
  rpc SetAttackIPs (AttackIPs) returns (context.Empty) {}
}

message Feature {
@@ -66,3 +71,7 @@ message L3CentralizedattackdetectorBatchInput {
message StatusMessage {
	string message = 1;
}

message AttackIPs {
	repeated string attack_ips = 1;
}
 No newline at end of file
+1 −1
Original line number Diff line number Diff line
@@ -111,7 +111,7 @@ def process_site_network_access(context_client : ContextClient, site_id : str, s
            str_location_id = grpc_message_to_json_string(constraint.endpoint_location.location)
            location_endpoints.setdefault(str_location_id, set()).add(str_endpoint_id)
        num_endpoints_per_location = {len(endpoints) for endpoints in location_endpoints.values()}
        num_disjoint_paths = min(num_endpoints_per_location)
        num_disjoint_paths = max(num_endpoints_per_location)
        update_constraint_sla_availability(constraints, num_disjoint_paths, all_active, 0.0)

    return target
+2 −2
Original line number Diff line number Diff line
@@ -288,7 +288,7 @@ def compute_rules_to_add_delete(
            acl_ruleset_name = config_rule.acl.rule_set.name                     # get the acl name
            ACL_KEY_TEMPLATE = '/device[{:s}]/endpoint[{:s}]/acl_ruleset[{:s}]'
            key_or_path = ACL_KEY_TEMPLATE.format(device_uuid, endpoint_uuid, acl_ruleset_name)            
            context_config_rules[key_or_path] = config_rule.acl                  # get the resource value of the acl
            context_config_rules[key_or_path] = grpc_message_to_json(config_rule.acl)    # get the resource value of the acl
 
    request_config_rules = []
    for config_rule in request.device_config.config_rules:
@@ -304,7 +304,7 @@ def compute_rules_to_add_delete(
            ACL_KEY_TEMPLATE = '/device[{:s}]/endpoint[{:s}]/acl_ruleset[{:s}]'
            key_or_path = ACL_KEY_TEMPLATE.format(device_uuid, endpoint_uuid, acl_ruleset_name) 
            request_config_rules.append((
                config_rule.action, key_or_path, config_rule.acl
                config_rule.action, key_or_path, grpc_message_to_json(config_rule.acl)
            ))

    resources_to_set    : List[Tuple[str, Any]] = [] # key, value
Loading