Loading proto/policy_action.proto +3 −1 Original line number Diff line number Diff line Loading @@ -26,6 +26,8 @@ enum PolicyRuleActionEnum { POLICYRULE_ACTION_SET_DEVICE_STATUS = 1; POLICYRULE_ACTION_ADD_SERVICE_CONFIGRULE = 2; POLICYRULE_ACTION_ADD_SERVICE_CONSTRAINT = 3; POLICY_RULE_ACTION_CALL_SERVICE_RPC = 4; POLICY_RULE_ACTION_RECALCULATE_PATH = 5; } // Action configuration Loading src/policy/mvnw 100644 → 100755 +0 −0 File mode changed from 100644 to 100755. View file src/policy/src/main/java/eu/teraflow/policy/PolicyGateway.java +1 −1 Original line number Diff line number Diff line /* * Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) * Copyright 2021-2023 H2020 TeraFlow (https://www.teraflow-h2020.eu/) * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. Loading src/policy/src/main/java/eu/teraflow/policy/PolicyGatewayImpl.java +1 −20 Original line number Diff line number Diff line /* * Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) * Copyright 2021-2023 H2020 TeraFlow (https://www.teraflow-h2020.eu/) * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. Loading @@ -20,9 +20,6 @@ import context.ContextOuterClass.ServiceId; import io.quarkus.grpc.GrpcService; import io.smallrye.mutiny.Uni; import javax.inject.Inject; import org.eclipse.microprofile.metrics.MetricUnits; import org.eclipse.microprofile.metrics.annotation.Counted; import org.eclipse.microprofile.metrics.annotation.Timed; import policy.Policy; import policy.Policy.PolicyRuleBasic; import policy.Policy.PolicyRuleDevice; Loading @@ -44,8 +41,6 @@ public class PolicyGatewayImpl implements PolicyGateway { } @Override @Counted(name = "policy_policyAddService_counter") @Timed(name = "policy_policyAddService_histogram", unit = MetricUnits.MILLISECONDS) public Uni<PolicyRuleState> policyAddService(PolicyRuleService request) { final var policyRuleService = serializer.deserialize(request); Loading @@ -56,8 +51,6 @@ public class PolicyGatewayImpl implements PolicyGateway { } @Override @Counted(name = "policy_policyUpdateService_counter") @Timed(name = "policy_policyUpdateService_histogram", unit = MetricUnits.MILLISECONDS) public Uni<PolicyRuleState> policyUpdateService(PolicyRuleService request) { final var policyRuleService = serializer.deserialize(request); Loading @@ -68,8 +61,6 @@ public class PolicyGatewayImpl implements PolicyGateway { } @Override @Counted(name = "policy_policyAddDevice_counter") @Timed(name = "policy_policyAddDevice_histogram", unit = MetricUnits.MILLISECONDS) public Uni<PolicyRuleState> policyAddDevice(PolicyRuleDevice request) { final var policyRuleDevice = serializer.deserialize(request); Loading @@ -80,8 +71,6 @@ public class PolicyGatewayImpl implements PolicyGateway { } @Override @Counted(name = "policy_policyUpdateDevice_counter") @Timed(name = "policy_policyUpdateDevice_histogram", unit = MetricUnits.MILLISECONDS) public Uni<PolicyRuleState> policyUpdateDevice(PolicyRuleDevice request) { final var policyRuleDevice = serializer.deserialize(request); Loading @@ -92,8 +81,6 @@ public class PolicyGatewayImpl implements PolicyGateway { } @Override @Counted(name = "policy_policyDelete_counter") @Timed(name = "policy_policyDelete_histogram", unit = MetricUnits.MILLISECONDS) public Uni<PolicyRuleState> policyDelete(PolicyRuleId request) { final var policyRuleId = serializer.deserialize(request); Loading @@ -101,8 +88,6 @@ public class PolicyGatewayImpl implements PolicyGateway { } @Override @Counted(name = "policy_getPolicyService_counter") @Timed(name = "policy_getPolicyService_histogram", unit = MetricUnits.MILLISECONDS) public Uni<PolicyRuleService> getPolicyService(PolicyRuleId request) { final var policyRuleBasic = PolicyRuleBasic.newBuilder().setPolicyRuleId(request).build(); Loading @@ -111,8 +96,6 @@ public class PolicyGatewayImpl implements PolicyGateway { } @Override @Counted(name = "policy_getPolicyDevice_counter") @Timed(name = "policy_getPolicyDevice_histogram", unit = MetricUnits.MILLISECONDS) public Uni<PolicyRuleDevice> getPolicyDevice(PolicyRuleId request) { final var policyRuleBasic = PolicyRuleBasic.newBuilder().setPolicyRuleId(request).build(); Loading @@ -121,8 +104,6 @@ public class PolicyGatewayImpl implements PolicyGateway { } @Override @Counted(name = "policy_getPolicyByServiceId_counter") @Timed(name = "policy_getPolicyByServiceId_histogram", unit = MetricUnits.MILLISECONDS) public Uni<PolicyRuleServiceList> getPolicyByServiceId(ServiceId request) { return Uni.createFrom().item(() -> Policy.PolicyRuleServiceList.newBuilder().build()); } Loading src/policy/src/main/java/eu/teraflow/policy/PolicyRuleConditionFieldsGetter.java +1 −1 Original line number Diff line number Diff line /* * Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) * Copyright 2021-2023 H2020 TeraFlow (https://www.teraflow-h2020.eu/) * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. Loading Loading
proto/policy_action.proto +3 −1 Original line number Diff line number Diff line Loading @@ -26,6 +26,8 @@ enum PolicyRuleActionEnum { POLICYRULE_ACTION_SET_DEVICE_STATUS = 1; POLICYRULE_ACTION_ADD_SERVICE_CONFIGRULE = 2; POLICYRULE_ACTION_ADD_SERVICE_CONSTRAINT = 3; POLICY_RULE_ACTION_CALL_SERVICE_RPC = 4; POLICY_RULE_ACTION_RECALCULATE_PATH = 5; } // Action configuration Loading
src/policy/src/main/java/eu/teraflow/policy/PolicyGateway.java +1 −1 Original line number Diff line number Diff line /* * Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) * Copyright 2021-2023 H2020 TeraFlow (https://www.teraflow-h2020.eu/) * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. Loading
src/policy/src/main/java/eu/teraflow/policy/PolicyGatewayImpl.java +1 −20 Original line number Diff line number Diff line /* * Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) * Copyright 2021-2023 H2020 TeraFlow (https://www.teraflow-h2020.eu/) * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. Loading @@ -20,9 +20,6 @@ import context.ContextOuterClass.ServiceId; import io.quarkus.grpc.GrpcService; import io.smallrye.mutiny.Uni; import javax.inject.Inject; import org.eclipse.microprofile.metrics.MetricUnits; import org.eclipse.microprofile.metrics.annotation.Counted; import org.eclipse.microprofile.metrics.annotation.Timed; import policy.Policy; import policy.Policy.PolicyRuleBasic; import policy.Policy.PolicyRuleDevice; Loading @@ -44,8 +41,6 @@ public class PolicyGatewayImpl implements PolicyGateway { } @Override @Counted(name = "policy_policyAddService_counter") @Timed(name = "policy_policyAddService_histogram", unit = MetricUnits.MILLISECONDS) public Uni<PolicyRuleState> policyAddService(PolicyRuleService request) { final var policyRuleService = serializer.deserialize(request); Loading @@ -56,8 +51,6 @@ public class PolicyGatewayImpl implements PolicyGateway { } @Override @Counted(name = "policy_policyUpdateService_counter") @Timed(name = "policy_policyUpdateService_histogram", unit = MetricUnits.MILLISECONDS) public Uni<PolicyRuleState> policyUpdateService(PolicyRuleService request) { final var policyRuleService = serializer.deserialize(request); Loading @@ -68,8 +61,6 @@ public class PolicyGatewayImpl implements PolicyGateway { } @Override @Counted(name = "policy_policyAddDevice_counter") @Timed(name = "policy_policyAddDevice_histogram", unit = MetricUnits.MILLISECONDS) public Uni<PolicyRuleState> policyAddDevice(PolicyRuleDevice request) { final var policyRuleDevice = serializer.deserialize(request); Loading @@ -80,8 +71,6 @@ public class PolicyGatewayImpl implements PolicyGateway { } @Override @Counted(name = "policy_policyUpdateDevice_counter") @Timed(name = "policy_policyUpdateDevice_histogram", unit = MetricUnits.MILLISECONDS) public Uni<PolicyRuleState> policyUpdateDevice(PolicyRuleDevice request) { final var policyRuleDevice = serializer.deserialize(request); Loading @@ -92,8 +81,6 @@ public class PolicyGatewayImpl implements PolicyGateway { } @Override @Counted(name = "policy_policyDelete_counter") @Timed(name = "policy_policyDelete_histogram", unit = MetricUnits.MILLISECONDS) public Uni<PolicyRuleState> policyDelete(PolicyRuleId request) { final var policyRuleId = serializer.deserialize(request); Loading @@ -101,8 +88,6 @@ public class PolicyGatewayImpl implements PolicyGateway { } @Override @Counted(name = "policy_getPolicyService_counter") @Timed(name = "policy_getPolicyService_histogram", unit = MetricUnits.MILLISECONDS) public Uni<PolicyRuleService> getPolicyService(PolicyRuleId request) { final var policyRuleBasic = PolicyRuleBasic.newBuilder().setPolicyRuleId(request).build(); Loading @@ -111,8 +96,6 @@ public class PolicyGatewayImpl implements PolicyGateway { } @Override @Counted(name = "policy_getPolicyDevice_counter") @Timed(name = "policy_getPolicyDevice_histogram", unit = MetricUnits.MILLISECONDS) public Uni<PolicyRuleDevice> getPolicyDevice(PolicyRuleId request) { final var policyRuleBasic = PolicyRuleBasic.newBuilder().setPolicyRuleId(request).build(); Loading @@ -121,8 +104,6 @@ public class PolicyGatewayImpl implements PolicyGateway { } @Override @Counted(name = "policy_getPolicyByServiceId_counter") @Timed(name = "policy_getPolicyByServiceId_histogram", unit = MetricUnits.MILLISECONDS) public Uni<PolicyRuleServiceList> getPolicyByServiceId(ServiceId request) { return Uni.createFrom().item(() -> Policy.PolicyRuleServiceList.newBuilder().build()); } Loading
src/policy/src/main/java/eu/teraflow/policy/PolicyRuleConditionFieldsGetter.java +1 −1 Original line number Diff line number Diff line /* * Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) * Copyright 2021-2023 H2020 TeraFlow (https://www.teraflow-h2020.eu/) * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. Loading