diff --git a/proto/context.proto b/proto/context.proto index ab7dd5e699a9816daf3e3a180fffc6bfde0a8103..f5dec30796a8426f512947d369b8db5f5889471a 100644 --- a/proto/context.proto +++ b/proto/context.proto @@ -190,6 +190,7 @@ message DeviceList { message DeviceEvent { Event event = 1; DeviceId device_id = 2; + DeviceConfig device_config = 3; } diff --git a/src/automation/src/main/java/eu/teraflow/automation/ContextSubscriber.java b/src/automation/src/main/java/eu/teraflow/automation/ContextSubscriber.java index ce977d1ff24788c471ab6bf2c8d6b2c113fb5c63..c4d636b6b4dca7241808ade421f32a77861e4d3f 100644 --- a/src/automation/src/main/java/eu/teraflow/automation/ContextSubscriber.java +++ b/src/automation/src/main/java/eu/teraflow/automation/ContextSubscriber.java @@ -78,9 +78,9 @@ public class ContextSubscriber { automationService.deleteDevice(deviceEvent.getDeviceId()); break; case UPDATE: - // TODO a DeviceConfig object should be part of the DeviceEvent object in order - // for automationService.updateDevice() to be triggered automatically like - // addDevice(). + LOGGER.infof("Received %s for device [%s]", event, deviceId); + automationService.updateDevice( + deviceEvent.getDeviceId(), deviceEvent.getDeviceConfig().orElse(null)); case UNDEFINED: logWarningMessage(event, deviceId, eventType); break; diff --git a/src/automation/src/main/java/eu/teraflow/automation/Serializer.java b/src/automation/src/main/java/eu/teraflow/automation/Serializer.java index 4359d60db364b4fb28e2623cb0e832a656e803af..816500a57d8431b36f54a95ee714b59b5f984c62 100644 --- a/src/automation/src/main/java/eu/teraflow/automation/Serializer.java +++ b/src/automation/src/main/java/eu/teraflow/automation/Serializer.java @@ -269,6 +269,7 @@ public class Serializer { builder.setDeviceId(deviceId); builder.setEvent(serialize(deviceEvent.getEvent())); + builder.setDeviceConfig(serialize(deviceEvent.getDeviceConfig().orElse(null))); return builder.build(); } @@ -276,8 +277,9 @@ public class Serializer { public DeviceEvent deserialize(ContextOuterClass.DeviceEvent deviceEvent) { final var deviceId = deserialize(deviceEvent.getDeviceId()); final var event = deserialize(deviceEvent.getEvent()); + final var deviceConfig = deserialize(deviceEvent.getDeviceConfig()); - return new DeviceEvent(deviceId, event); + return new DeviceEvent(deviceId, event, deviceConfig); } public ContextOuterClass.ConfigActionEnum serialize(ConfigActionEnum configAction) { diff --git a/src/automation/src/main/java/eu/teraflow/automation/context/model/DeviceEvent.java b/src/automation/src/main/java/eu/teraflow/automation/context/model/DeviceEvent.java index efc0be8308fb9a75132cd604a84fd5b4822f3af7..526b9b7b2ba34edc6d538619bdb190a9aefa9d97 100644 --- a/src/automation/src/main/java/eu/teraflow/automation/context/model/DeviceEvent.java +++ b/src/automation/src/main/java/eu/teraflow/automation/context/model/DeviceEvent.java @@ -16,14 +16,23 @@ package eu.teraflow.automation.context.model; +import java.util.Optional; + public class DeviceEvent { private final Event event; private final String deviceId; + private final Optional<DeviceConfig> deviceConfig; public DeviceEvent(String deviceId, Event event) { + this(deviceId, event, null); + } + + public DeviceEvent(String deviceId, Event event, DeviceConfig deviceConfig) { this.event = event; this.deviceId = deviceId; + this.deviceConfig = + (deviceConfig == null) ? Optional.empty() : Optional.ofNullable(deviceConfig); } public Event getEvent() { @@ -34,8 +43,14 @@ public class DeviceEvent { return deviceId; } + public Optional<DeviceConfig> getDeviceConfig() { + return deviceConfig; + } + @Override public String toString() { - return String.format("%s[%s, %s]", getClass().getSimpleName(), deviceId, event.toString()); + return String.format( + "%s[%s, %s, %s]", + getClass().getSimpleName(), deviceId, event.toString(), deviceConfig.orElse(null)); } } diff --git a/src/automation/src/test/java/eu/teraflow/automation/SerializerTest.java b/src/automation/src/test/java/eu/teraflow/automation/SerializerTest.java index 74cdc0060230f22ae6c022627a4a8be47a9705b5..a02fbbca49319feb93de85efbe759a30a4ed3aa9 100644 --- a/src/automation/src/test/java/eu/teraflow/automation/SerializerTest.java +++ b/src/automation/src/test/java/eu/teraflow/automation/SerializerTest.java @@ -392,14 +392,51 @@ class SerializerTest { .setTimestamp(expectedTimestamp) .setEventType(ContextOuterClass.EventTypeEnum.EVENTTYPE_CREATE) .build(); + + final var expectedConfigRuleCustomA = + ContextOuterClass.ConfigRule_Custom.newBuilder() + .setResourceKey("resourceKeyA") + .setResourceValue("resourceValueA") + .build(); + + final var expectedConfigRuleCustomB = + ContextOuterClass.ConfigRule_Custom.newBuilder() + .setResourceKey("resourceKeyB") + .setResourceValue("resourceValueB") + .build(); + + final var expectedConfigRuleA = + ContextOuterClass.ConfigRule.newBuilder() + .setAction(ContextOuterClass.ConfigActionEnum.CONFIGACTION_SET) + .setCustom(expectedConfigRuleCustomA) + .build(); + final var expectedConfigRuleB = + ContextOuterClass.ConfigRule.newBuilder() + .setAction(ContextOuterClass.ConfigActionEnum.CONFIGACTION_DELETE) + .setCustom(expectedConfigRuleCustomB) + .build(); + + final var expectedDeviceConfig = + ContextOuterClass.DeviceConfig.newBuilder() + .addAllConfigRules(List.of(expectedConfigRuleA, expectedConfigRuleB)) + .build(); + final var expectedDeviceEvent = ContextOuterClass.DeviceEvent.newBuilder() .setDeviceId(expectedDeviceId) .setEvent(expectedEvent) + .setDeviceConfig(expectedDeviceConfig) .build(); final var creationEvent = new Event(1, EventTypeEnum.CREATE); - final var deviceEvent = new DeviceEvent("deviceId", creationEvent); + final var configRuleCustomA = new ConfigRuleCustom("resourceKeyA", "resourceValueA"); + final var configRuleCustomB = new ConfigRuleCustom("resourceKeyB", "resourceValueB"); + final var configRuleTypeA = new ConfigRuleTypeCustom(configRuleCustomA); + final var configRuleTypeB = new ConfigRuleTypeCustom(configRuleCustomB); + final var configRuleA = new ConfigRule(ConfigActionEnum.SET, configRuleTypeA); + final var configRuleB = new ConfigRule(ConfigActionEnum.DELETE, configRuleTypeB); + final var deviceConfig = new DeviceConfig(List.of(configRuleA, configRuleB)); + final var deviceEvent = new DeviceEvent("deviceId", creationEvent, deviceConfig); final var serializedDeviceEvent = serializer.serialize(deviceEvent); assertThat(serializedDeviceEvent).usingRecursiveComparison().isEqualTo(expectedDeviceEvent); @@ -412,7 +449,22 @@ class SerializerTest { final var expectedTimestamp = ContextOuterClass.Timestamp.newBuilder().setTimestamp(1).build(); final var creationEvent = new Event(1, expectedEventType); - final var expectedDeviceEvent = new DeviceEvent(dummyDeviceId, creationEvent); + + final var expectedConfigRuleCustomA = new ConfigRuleCustom("resourceKeyA", "resourceValueA"); + final var expectedConfigRuleCustomB = new ConfigRuleCustom("resourceKeyB", "resourceValueB"); + + final var expectedConfigRuleTypeA = new ConfigRuleTypeCustom(expectedConfigRuleCustomA); + final var expectedConfigRuleTypeB = new ConfigRuleTypeCustom(expectedConfigRuleCustomB); + + final var expectedConfigRuleA = new ConfigRule(ConfigActionEnum.SET, expectedConfigRuleTypeA); + final var expectedConfigRuleB = + new ConfigRule(ConfigActionEnum.DELETE, expectedConfigRuleTypeB); + + final var expectedDeviceConfig = + new DeviceConfig(List.of(expectedConfigRuleA, expectedConfigRuleB)); + + final var expectedDeviceEvent = + new DeviceEvent(dummyDeviceId, creationEvent, expectedDeviceConfig); final var deviceUuid = Uuid.newBuilder().setUuid("deviceId"); final var deviceId = DeviceId.newBuilder().setDeviceUuid(deviceUuid).build(); @@ -421,8 +473,38 @@ class SerializerTest { .setTimestamp(expectedTimestamp) .setEventType(ContextOuterClass.EventTypeEnum.EVENTTYPE_REMOVE) .build(); + + final var configRuleCustomA = + ContextOuterClass.ConfigRule_Custom.newBuilder() + .setResourceKey("resourceKeyA") + .setResourceValue("resourceValueA") + .build(); + final var configRuleCustomB = + ContextOuterClass.ConfigRule_Custom.newBuilder() + .setResourceKey("resourceKeyB") + .setResourceValue("resourceValueB") + .build(); + final var configRuleA = + ContextOuterClass.ConfigRule.newBuilder() + .setAction(ContextOuterClass.ConfigActionEnum.CONFIGACTION_SET) + .setCustom(configRuleCustomA) + .build(); + final var configRuleB = + ContextOuterClass.ConfigRule.newBuilder() + .setAction(ContextOuterClass.ConfigActionEnum.CONFIGACTION_DELETE) + .setCustom(configRuleCustomB) + .build(); + final var deviceConfig = + ContextOuterClass.DeviceConfig.newBuilder() + .addAllConfigRules(List.of(configRuleA, configRuleB)) + .build(); + final var serializedDeviceEvent = - ContextOuterClass.DeviceEvent.newBuilder().setDeviceId(deviceId).setEvent(event).build(); + ContextOuterClass.DeviceEvent.newBuilder() + .setDeviceId(deviceId) + .setEvent(event) + .setDeviceConfig(deviceConfig) + .build(); final var deviceEvent = serializer.deserialize(serializedDeviceEvent); assertThat(deviceEvent).usingRecursiveComparison().isEqualTo(expectedDeviceEvent); diff --git a/src/automation/target/generated-sources/grpc/context/ContextOuterClass.java b/src/automation/target/generated-sources/grpc/context/ContextOuterClass.java index 45a64fabb43bab645e97e9d80bc1825242006dce..3c0d7ce36fcdc4e47697ba11a4ceb3d8e8cdea0c 100644 --- a/src/automation/target/generated-sources/grpc/context/ContextOuterClass.java +++ b/src/automation/target/generated-sources/grpc/context/ContextOuterClass.java @@ -17331,6 +17331,21 @@ public final class ContextOuterClass { * <code>.context.DeviceId device_id = 2;</code> */ context.ContextOuterClass.DeviceIdOrBuilder getDeviceIdOrBuilder(); + + /** + * <code>.context.DeviceConfig device_config = 3;</code> + * @return Whether the deviceConfig field is set. + */ + boolean hasDeviceConfig(); + /** + * <code>.context.DeviceConfig device_config = 3;</code> + * @return The deviceConfig. + */ + context.ContextOuterClass.DeviceConfig getDeviceConfig(); + /** + * <code>.context.DeviceConfig device_config = 3;</code> + */ + context.ContextOuterClass.DeviceConfigOrBuilder getDeviceConfigOrBuilder(); } /** * Protobuf type {@code context.DeviceEvent} @@ -17403,6 +17418,19 @@ public final class ContextOuterClass { break; } + case 26: { + context.ContextOuterClass.DeviceConfig.Builder subBuilder = null; + if (deviceConfig_ != null) { + subBuilder = deviceConfig_.toBuilder(); + } + deviceConfig_ = input.readMessage(context.ContextOuterClass.DeviceConfig.parser(), extensionRegistry); + if (subBuilder != null) { + subBuilder.mergeFrom(deviceConfig_); + deviceConfig_ = subBuilder.buildPartial(); + } + + break; + } default: { if (!parseUnknownField( input, unknownFields, extensionRegistry, tag)) { @@ -17487,6 +17515,32 @@ public final class ContextOuterClass { return getDeviceId(); } + public static final int DEVICE_CONFIG_FIELD_NUMBER = 3; + private context.ContextOuterClass.DeviceConfig deviceConfig_; + /** + * <code>.context.DeviceConfig device_config = 3;</code> + * @return Whether the deviceConfig field is set. + */ + @java.lang.Override + public boolean hasDeviceConfig() { + return deviceConfig_ != null; + } + /** + * <code>.context.DeviceConfig device_config = 3;</code> + * @return The deviceConfig. + */ + @java.lang.Override + public context.ContextOuterClass.DeviceConfig getDeviceConfig() { + return deviceConfig_ == null ? context.ContextOuterClass.DeviceConfig.getDefaultInstance() : deviceConfig_; + } + /** + * <code>.context.DeviceConfig device_config = 3;</code> + */ + @java.lang.Override + public context.ContextOuterClass.DeviceConfigOrBuilder getDeviceConfigOrBuilder() { + return getDeviceConfig(); + } + private byte memoizedIsInitialized = -1; @java.lang.Override public final boolean isInitialized() { @@ -17507,6 +17561,9 @@ public final class ContextOuterClass { if (deviceId_ != null) { output.writeMessage(2, getDeviceId()); } + if (deviceConfig_ != null) { + output.writeMessage(3, getDeviceConfig()); + } unknownFields.writeTo(output); } @@ -17524,6 +17581,10 @@ public final class ContextOuterClass { size += com.google.protobuf.CodedOutputStream .computeMessageSize(2, getDeviceId()); } + if (deviceConfig_ != null) { + size += com.google.protobuf.CodedOutputStream + .computeMessageSize(3, getDeviceConfig()); + } size += unknownFields.getSerializedSize(); memoizedSize = size; return size; @@ -17549,6 +17610,11 @@ public final class ContextOuterClass { if (!getDeviceId() .equals(other.getDeviceId())) return false; } + if (hasDeviceConfig() != other.hasDeviceConfig()) return false; + if (hasDeviceConfig()) { + if (!getDeviceConfig() + .equals(other.getDeviceConfig())) return false; + } if (!unknownFields.equals(other.unknownFields)) return false; return true; } @@ -17568,6 +17634,10 @@ public final class ContextOuterClass { hash = (37 * hash) + DEVICE_ID_FIELD_NUMBER; hash = (53 * hash) + getDeviceId().hashCode(); } + if (hasDeviceConfig()) { + hash = (37 * hash) + DEVICE_CONFIG_FIELD_NUMBER; + hash = (53 * hash) + getDeviceConfig().hashCode(); + } hash = (29 * hash) + unknownFields.hashCode(); memoizedHashCode = hash; return hash; @@ -17713,6 +17783,12 @@ public final class ContextOuterClass { deviceId_ = null; deviceIdBuilder_ = null; } + if (deviceConfigBuilder_ == null) { + deviceConfig_ = null; + } else { + deviceConfig_ = null; + deviceConfigBuilder_ = null; + } return this; } @@ -17749,6 +17825,11 @@ public final class ContextOuterClass { } else { result.deviceId_ = deviceIdBuilder_.build(); } + if (deviceConfigBuilder_ == null) { + result.deviceConfig_ = deviceConfig_; + } else { + result.deviceConfig_ = deviceConfigBuilder_.build(); + } onBuilt(); return result; } @@ -17803,6 +17884,9 @@ public final class ContextOuterClass { if (other.hasDeviceId()) { mergeDeviceId(other.getDeviceId()); } + if (other.hasDeviceConfig()) { + mergeDeviceConfig(other.getDeviceConfig()); + } this.mergeUnknownFields(other.unknownFields); onChanged(); return this; @@ -18069,6 +18153,125 @@ public final class ContextOuterClass { } return deviceIdBuilder_; } + + private context.ContextOuterClass.DeviceConfig deviceConfig_; + private com.google.protobuf.SingleFieldBuilderV3< + context.ContextOuterClass.DeviceConfig, context.ContextOuterClass.DeviceConfig.Builder, context.ContextOuterClass.DeviceConfigOrBuilder> deviceConfigBuilder_; + /** + * <code>.context.DeviceConfig device_config = 3;</code> + * @return Whether the deviceConfig field is set. + */ + public boolean hasDeviceConfig() { + return deviceConfigBuilder_ != null || deviceConfig_ != null; + } + /** + * <code>.context.DeviceConfig device_config = 3;</code> + * @return The deviceConfig. + */ + public context.ContextOuterClass.DeviceConfig getDeviceConfig() { + if (deviceConfigBuilder_ == null) { + return deviceConfig_ == null ? context.ContextOuterClass.DeviceConfig.getDefaultInstance() : deviceConfig_; + } else { + return deviceConfigBuilder_.getMessage(); + } + } + /** + * <code>.context.DeviceConfig device_config = 3;</code> + */ + public Builder setDeviceConfig(context.ContextOuterClass.DeviceConfig value) { + if (deviceConfigBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + deviceConfig_ = value; + onChanged(); + } else { + deviceConfigBuilder_.setMessage(value); + } + + return this; + } + /** + * <code>.context.DeviceConfig device_config = 3;</code> + */ + public Builder setDeviceConfig( + context.ContextOuterClass.DeviceConfig.Builder builderForValue) { + if (deviceConfigBuilder_ == null) { + deviceConfig_ = builderForValue.build(); + onChanged(); + } else { + deviceConfigBuilder_.setMessage(builderForValue.build()); + } + + return this; + } + /** + * <code>.context.DeviceConfig device_config = 3;</code> + */ + public Builder mergeDeviceConfig(context.ContextOuterClass.DeviceConfig value) { + if (deviceConfigBuilder_ == null) { + if (deviceConfig_ != null) { + deviceConfig_ = + context.ContextOuterClass.DeviceConfig.newBuilder(deviceConfig_).mergeFrom(value).buildPartial(); + } else { + deviceConfig_ = value; + } + onChanged(); + } else { + deviceConfigBuilder_.mergeFrom(value); + } + + return this; + } + /** + * <code>.context.DeviceConfig device_config = 3;</code> + */ + public Builder clearDeviceConfig() { + if (deviceConfigBuilder_ == null) { + deviceConfig_ = null; + onChanged(); + } else { + deviceConfig_ = null; + deviceConfigBuilder_ = null; + } + + return this; + } + /** + * <code>.context.DeviceConfig device_config = 3;</code> + */ + public context.ContextOuterClass.DeviceConfig.Builder getDeviceConfigBuilder() { + + onChanged(); + return getDeviceConfigFieldBuilder().getBuilder(); + } + /** + * <code>.context.DeviceConfig device_config = 3;</code> + */ + public context.ContextOuterClass.DeviceConfigOrBuilder getDeviceConfigOrBuilder() { + if (deviceConfigBuilder_ != null) { + return deviceConfigBuilder_.getMessageOrBuilder(); + } else { + return deviceConfig_ == null ? + context.ContextOuterClass.DeviceConfig.getDefaultInstance() : deviceConfig_; + } + } + /** + * <code>.context.DeviceConfig device_config = 3;</code> + */ + private com.google.protobuf.SingleFieldBuilderV3< + context.ContextOuterClass.DeviceConfig, context.ContextOuterClass.DeviceConfig.Builder, context.ContextOuterClass.DeviceConfigOrBuilder> + getDeviceConfigFieldBuilder() { + if (deviceConfigBuilder_ == null) { + deviceConfigBuilder_ = new com.google.protobuf.SingleFieldBuilderV3< + context.ContextOuterClass.DeviceConfig, context.ContextOuterClass.DeviceConfig.Builder, context.ContextOuterClass.DeviceConfigOrBuilder>( + getDeviceConfig(), + getParentForChildren(), + isClean()); + deviceConfig_ = null; + } + return deviceConfigBuilder_; + } @java.lang.Override public final Builder setUnknownFields( final com.google.protobuf.UnknownFieldSet unknownFields) { @@ -61981,230 +62184,234 @@ public final class ContextOuterClass { "(\0132\023.context.ConfigRule\"5\n\014DeviceIdList\022" + "%\n\ndevice_ids\030\001 \003(\0132\021.context.DeviceId\"." + "\n\nDeviceList\022 \n\007devices\030\001 \003(\0132\017.context." + - "Device\"R\n\013DeviceEvent\022\035\n\005event\030\001 \001(\0132\016.c" + - "ontext.Event\022$\n\tdevice_id\030\002 \001(\0132\021.contex" + - "t.DeviceId\"*\n\006LinkId\022 \n\tlink_uuid\030\001 \001(\0132" + - "\r.context.Uuid\"X\n\004Link\022 \n\007link_id\030\001 \001(\0132" + - "\017.context.LinkId\022.\n\021link_endpoint_ids\030\002 " + - "\003(\0132\023.context.EndPointId\"/\n\nLinkIdList\022!" + - "\n\010link_ids\030\001 \003(\0132\017.context.LinkId\"(\n\010Lin" + - "kList\022\034\n\005links\030\001 \003(\0132\r.context.Link\"L\n\tL" + - "inkEvent\022\035\n\005event\030\001 \001(\0132\016.context.Event\022" + - " \n\007link_id\030\002 \001(\0132\017.context.LinkId\"X\n\tSer" + - "viceId\022&\n\ncontext_id\030\001 \001(\0132\022.context.Con" + - "textId\022#\n\014service_uuid\030\002 \001(\0132\r.context.U" + - "uid\"\315\002\n\007Service\022&\n\nservice_id\030\001 \001(\0132\022.co" + - "ntext.ServiceId\022.\n\014service_type\030\002 \001(\0162\030." + - "context.ServiceTypeEnum\0221\n\024service_endpo" + - "int_ids\030\003 \003(\0132\023.context.EndPointId\0220\n\023se" + - "rvice_constraints\030\004 \003(\0132\023.context.Constr" + - "aint\022.\n\016service_status\030\005 \001(\0132\026.context.S" + - "erviceStatus\022.\n\016service_config\030\006 \001(\0132\026.c" + - "ontext.ServiceConfig\022%\n\ttimestamp\030\007 \001(\0132" + - "\022.context.Timestamp\"C\n\rServiceStatus\0222\n\016" + - "service_status\030\001 \001(\0162\032.context.ServiceSt" + - "atusEnum\":\n\rServiceConfig\022)\n\014config_rule" + - "s\030\001 \003(\0132\023.context.ConfigRule\"8\n\rServiceI" + - "dList\022\'\n\013service_ids\030\001 \003(\0132\022.context.Ser" + - "viceId\"1\n\013ServiceList\022\"\n\010services\030\001 \003(\0132" + - "\020.context.Service\"U\n\014ServiceEvent\022\035\n\005eve" + - "nt\030\001 \001(\0132\016.context.Event\022&\n\nservice_id\030\002" + - " \001(\0132\022.context.ServiceId\"T\n\007SliceId\022&\n\nc" + - "ontext_id\030\001 \001(\0132\022.context.ContextId\022!\n\ns" + - "lice_uuid\030\002 \001(\0132\r.context.Uuid\"\222\003\n\005Slice" + - "\022\"\n\010slice_id\030\001 \001(\0132\020.context.SliceId\022/\n\022" + - "slice_endpoint_ids\030\002 \003(\0132\023.context.EndPo" + - "intId\022.\n\021slice_constraints\030\003 \003(\0132\023.conte" + - "xt.Constraint\022-\n\021slice_service_ids\030\004 \003(\013" + - "2\022.context.ServiceId\022,\n\022slice_subslice_i" + - "ds\030\005 \003(\0132\020.context.SliceId\022*\n\014slice_stat" + - "us\030\006 \001(\0132\024.context.SliceStatus\022*\n\014slice_" + - "config\030\007 \001(\0132\024.context.SliceConfig\022(\n\013sl" + - "ice_owner\030\010 \001(\0132\023.context.SliceOwner\022%\n\t" + - "timestamp\030\t \001(\0132\022.context.Timestamp\"E\n\nS" + - "liceOwner\022!\n\nowner_uuid\030\001 \001(\0132\r.context." + - "Uuid\022\024\n\014owner_string\030\002 \001(\t\"=\n\013SliceStatu" + - "s\022.\n\014slice_status\030\001 \001(\0162\030.context.SliceS" + - "tatusEnum\"8\n\013SliceConfig\022)\n\014config_rules" + - "\030\001 \003(\0132\023.context.ConfigRule\"2\n\013SliceIdLi" + - "st\022#\n\tslice_ids\030\001 \003(\0132\020.context.SliceId\"" + - "+\n\tSliceList\022\036\n\006slices\030\001 \003(\0132\016.context.S" + - "lice\"O\n\nSliceEvent\022\035\n\005event\030\001 \001(\0132\016.cont" + - "ext.Event\022\"\n\010slice_id\030\002 \001(\0132\020.context.Sl" + - "iceId\"6\n\014ConnectionId\022&\n\017connection_uuid" + - "\030\001 \001(\0132\r.context.Uuid\"2\n\025ConnectionSetti" + - "ngs_L0\022\031\n\021lsp_symbolic_name\030\001 \001(\t\"\236\001\n\025Co" + - "nnectionSettings_L2\022\027\n\017src_mac_address\030\001" + - " \001(\t\022\027\n\017dst_mac_address\030\002 \001(\t\022\022\n\nether_t" + - "ype\030\003 \001(\r\022\017\n\007vlan_id\030\004 \001(\r\022\022\n\nmpls_label" + - "\030\005 \001(\r\022\032\n\022mpls_traffic_class\030\006 \001(\r\"t\n\025Co" + - "nnectionSettings_L3\022\026\n\016src_ip_address\030\001 " + - "\001(\t\022\026\n\016dst_ip_address\030\002 \001(\t\022\014\n\004dscp\030\003 \001(" + - "\r\022\020\n\010protocol\030\004 \001(\r\022\013\n\003ttl\030\005 \001(\r\"[\n\025Conn" + - "ectionSettings_L4\022\020\n\010src_port\030\001 \001(\r\022\020\n\010d" + - "st_port\030\002 \001(\r\022\021\n\ttcp_flags\030\003 \001(\r\022\013\n\003ttl\030" + - "\004 \001(\r\"\304\001\n\022ConnectionSettings\022*\n\002l0\030\001 \001(\013" + - "2\036.context.ConnectionSettings_L0\022*\n\002l2\030\002" + - " \001(\0132\036.context.ConnectionSettings_L2\022*\n\002" + - "l3\030\003 \001(\0132\036.context.ConnectionSettings_L3" + - "\022*\n\002l4\030\004 \001(\0132\036.context.ConnectionSetting" + - "s_L4\"\363\001\n\nConnection\022,\n\rconnection_id\030\001 \001" + - "(\0132\025.context.ConnectionId\022&\n\nservice_id\030" + - "\002 \001(\0132\022.context.ServiceId\0223\n\026path_hops_e" + - "ndpoint_ids\030\003 \003(\0132\023.context.EndPointId\022+" + - "\n\017sub_service_ids\030\004 \003(\0132\022.context.Servic" + - "eId\022-\n\010settings\030\005 \001(\0132\033.context.Connecti" + - "onSettings\"A\n\020ConnectionIdList\022-\n\016connec" + - "tion_ids\030\001 \003(\0132\025.context.ConnectionId\":\n" + - "\016ConnectionList\022(\n\013connections\030\001 \003(\0132\023.c" + - "ontext.Connection\"^\n\017ConnectionEvent\022\035\n\005" + - "event\030\001 \001(\0132\016.context.Event\022,\n\rconnectio" + - "n_id\030\002 \001(\0132\025.context.ConnectionId\"\202\001\n\nEn" + - "dPointId\022(\n\013topology_id\030\001 \001(\0132\023.context." + - "TopologyId\022$\n\tdevice_id\030\002 \001(\0132\021.context." + - "DeviceId\022$\n\rendpoint_uuid\030\003 \001(\0132\r.contex" + - "t.Uuid\"\264\001\n\010EndPoint\022(\n\013endpoint_id\030\001 \001(\013" + - "2\023.context.EndPointId\022\025\n\rendpoint_type\030\002" + - " \001(\t\0229\n\020kpi_sample_types\030\003 \003(\0162\037.kpi_sam" + - "ple_types.KpiSampleType\022,\n\021endpoint_loca" + - "tion\030\004 \001(\0132\021.context.Location\"A\n\021ConfigR" + - "ule_Custom\022\024\n\014resource_key\030\001 \001(\t\022\026\n\016reso" + - "urce_value\030\002 \001(\t\"]\n\016ConfigRule_ACL\022(\n\013en" + - "dpoint_id\030\001 \001(\0132\023.context.EndPointId\022!\n\010" + - "rule_set\030\002 \001(\0132\017.acl.AclRuleSet\"\234\001\n\nConf" + - "igRule\022)\n\006action\030\001 \001(\0162\031.context.ConfigA" + - "ctionEnum\022,\n\006custom\030\002 \001(\0132\032.context.Conf" + - "igRule_CustomH\000\022&\n\003acl\030\003 \001(\0132\027.context.C" + - "onfigRule_ACLH\000B\r\n\013config_rule\"F\n\021Constr" + - "aint_Custom\022\027\n\017constraint_type\030\001 \001(\t\022\030\n\020" + - "constraint_value\030\002 \001(\t\"E\n\023Constraint_Sch" + - "edule\022\027\n\017start_timestamp\030\001 \001(\002\022\025\n\rdurati" + - "on_days\030\002 \001(\002\"3\n\014GPS_Position\022\020\n\010latitud" + - "e\030\001 \001(\002\022\021\n\tlongitude\030\002 \001(\002\"W\n\010Location\022\020" + - "\n\006region\030\001 \001(\tH\000\022-\n\014gps_position\030\002 \001(\0132\025" + - ".context.GPS_PositionH\000B\n\n\010location\"l\n\033C" + - "onstraint_EndPointLocation\022(\n\013endpoint_i" + - "d\030\001 \001(\0132\023.context.EndPointId\022#\n\010location" + - "\030\002 \001(\0132\021.context.Location\"Y\n\033Constraint_" + - "EndPointPriority\022(\n\013endpoint_id\030\001 \001(\0132\023." + - "context.EndPointId\022\020\n\010priority\030\002 \001(\r\"0\n\026" + - "Constraint_SLA_Latency\022\026\n\016e2e_latency_ms" + - "\030\001 \001(\002\"0\n\027Constraint_SLA_Capacity\022\025\n\rcap" + - "acity_gbps\030\001 \001(\002\"M\n\033Constraint_SLA_Avail" + - "ability\022\032\n\022num_disjoint_paths\030\001 \001(\r\022\022\n\na" + - "ll_active\030\002 \001(\010\"V\n\036Constraint_SLA_Isolat" + - "ion_level\0224\n\017isolation_level\030\001 \003(\0162\033.con" + - "text.IsolationLevelEnum\"\366\003\n\nConstraint\022," + - "\n\006custom\030\001 \001(\0132\032.context.Constraint_Cust" + - "omH\000\0220\n\010schedule\030\002 \001(\0132\034.context.Constra" + - "int_ScheduleH\000\022A\n\021endpoint_location\030\003 \001(" + - "\0132$.context.Constraint_EndPointLocationH" + - "\000\022A\n\021endpoint_priority\030\004 \001(\0132$.context.C" + - "onstraint_EndPointPriorityH\000\0228\n\014sla_capa" + - "city\030\005 \001(\0132 .context.Constraint_SLA_Capa" + - "cityH\000\0226\n\013sla_latency\030\006 \001(\0132\037.context.Co" + - "nstraint_SLA_LatencyH\000\022@\n\020sla_availabili" + - "ty\030\007 \001(\0132$.context.Constraint_SLA_Availa" + - "bilityH\000\022@\n\rsla_isolation\030\010 \001(\0132\'.contex" + - "t.Constraint_SLA_Isolation_levelH\000B\014\n\nco" + - "nstraint\"^\n\022TeraFlowController\022&\n\ncontex" + - "t_id\030\001 \001(\0132\022.context.ContextId\022\022\n\nip_add" + - "ress\030\002 \001(\t\022\014\n\004port\030\003 \001(\r\"U\n\024Authenticati" + - "onResult\022&\n\ncontext_id\030\001 \001(\0132\022.context.C" + - "ontextId\022\025\n\rauthenticated\030\002 \001(\010*j\n\rEvent" + - "TypeEnum\022\027\n\023EVENTTYPE_UNDEFINED\020\000\022\024\n\020EVE" + - "NTTYPE_CREATE\020\001\022\024\n\020EVENTTYPE_UPDATE\020\002\022\024\n" + - "\020EVENTTYPE_REMOVE\020\003*\305\001\n\020DeviceDriverEnum" + - "\022\032\n\026DEVICEDRIVER_UNDEFINED\020\000\022\033\n\027DEVICEDR" + - "IVER_OPENCONFIG\020\001\022\036\n\032DEVICEDRIVER_TRANSP" + - "ORT_API\020\002\022\023\n\017DEVICEDRIVER_P4\020\003\022&\n\"DEVICE" + - "DRIVER_IETF_NETWORK_TOPOLOGY\020\004\022\033\n\027DEVICE" + - "DRIVER_ONF_TR_352\020\005*\217\001\n\033DeviceOperationa" + - "lStatusEnum\022%\n!DEVICEOPERATIONALSTATUS_U" + - "NDEFINED\020\000\022$\n DEVICEOPERATIONALSTATUS_DI" + - "SABLED\020\001\022#\n\037DEVICEOPERATIONALSTATUS_ENAB" + - "LED\020\002*\201\001\n\017ServiceTypeEnum\022\027\n\023SERVICETYPE" + - "_UNKNOWN\020\000\022\024\n\020SERVICETYPE_L3NM\020\001\022\024\n\020SERV" + - "ICETYPE_L2NM\020\002\022)\n%SERVICETYPE_TAPI_CONNE" + - "CTIVITY_SERVICE\020\003*\250\001\n\021ServiceStatusEnum\022" + - "\033\n\027SERVICESTATUS_UNDEFINED\020\000\022\031\n\025SERVICES" + - "TATUS_PLANNED\020\001\022\030\n\024SERVICESTATUS_ACTIVE\020" + - "\002\022!\n\035SERVICESTATUS_PENDING_REMOVAL\020\003\022\036\n\032" + - "SERVICESTATUS_SLA_VIOLATED\020\004*\251\001\n\017SliceSt" + - "atusEnum\022\031\n\025SLICESTATUS_UNDEFINED\020\000\022\027\n\023S" + - "LICESTATUS_PLANNED\020\001\022\024\n\020SLICESTATUS_INIT" + - "\020\002\022\026\n\022SLICESTATUS_ACTIVE\020\003\022\026\n\022SLICESTATU" + - "S_DEINIT\020\004\022\034\n\030SLICESTATUS_SLA_VIOLATED\020\005" + - "*]\n\020ConfigActionEnum\022\032\n\026CONFIGACTION_UND" + - "EFINED\020\000\022\024\n\020CONFIGACTION_SET\020\001\022\027\n\023CONFIG" + - "ACTION_DELETE\020\002*\203\002\n\022IsolationLevelEnum\022\020" + - "\n\014NO_ISOLATION\020\000\022\026\n\022PHYSICAL_ISOLATION\020\001" + - "\022\025\n\021LOGICAL_ISOLATION\020\002\022\025\n\021PROCESS_ISOLA" + - "TION\020\003\022\035\n\031PHYSICAL_MEMORY_ISOLATION\020\004\022\036\n" + - "\032PHYSICAL_NETWORK_ISOLATION\020\005\022\036\n\032VIRTUAL" + - "_RESOURCE_ISOLATION\020\006\022\037\n\033NETWORK_FUNCTIO" + - "NS_ISOLATION\020\007\022\025\n\021SERVICE_ISOLATION\020\0102\357\022" + - "\n\016ContextService\022:\n\016ListContextIds\022\016.con" + - "text.Empty\032\026.context.ContextIdList\"\000\0226\n\014" + - "ListContexts\022\016.context.Empty\032\024.context.C" + - "ontextList\"\000\0224\n\nGetContext\022\022.context.Con" + - "textId\032\020.context.Context\"\000\0224\n\nSetContext" + - "\022\020.context.Context\032\022.context.ContextId\"\000" + - "\0225\n\rRemoveContext\022\022.context.ContextId\032\016." + - "context.Empty\"\000\022=\n\020GetContextEvents\022\016.co" + - "ntext.Empty\032\025.context.ContextEvent\"\0000\001\022@" + - "\n\017ListTopologyIds\022\022.context.ContextId\032\027." + - "context.TopologyIdList\"\000\022=\n\016ListTopologi" + - "es\022\022.context.ContextId\032\025.context.Topolog" + - "yList\"\000\0227\n\013GetTopology\022\023.context.Topolog" + - "yId\032\021.context.Topology\"\000\0227\n\013SetTopology\022" + - "\021.context.Topology\032\023.context.TopologyId\"" + - "\000\0227\n\016RemoveTopology\022\023.context.TopologyId" + - "\032\016.context.Empty\"\000\022?\n\021GetTopologyEvents\022" + - "\016.context.Empty\032\026.context.TopologyEvent\"" + - "\0000\001\0228\n\rListDeviceIds\022\016.context.Empty\032\025.c" + - "ontext.DeviceIdList\"\000\0224\n\013ListDevices\022\016.c" + - "ontext.Empty\032\023.context.DeviceList\"\000\0221\n\tG" + - "etDevice\022\021.context.DeviceId\032\017.context.De" + - "vice\"\000\0221\n\tSetDevice\022\017.context.Device\032\021.c" + - "ontext.DeviceId\"\000\0223\n\014RemoveDevice\022\021.cont" + - "ext.DeviceId\032\016.context.Empty\"\000\022;\n\017GetDev" + - "iceEvents\022\016.context.Empty\032\024.context.Devi" + - "ceEvent\"\0000\001\0224\n\013ListLinkIds\022\016.context.Emp" + - "ty\032\023.context.LinkIdList\"\000\0220\n\tListLinks\022\016" + - ".context.Empty\032\021.context.LinkList\"\000\022+\n\007G" + - "etLink\022\017.context.LinkId\032\r.context.Link\"\000" + - "\022+\n\007SetLink\022\r.context.Link\032\017.context.Lin" + - "kId\"\000\022/\n\nRemoveLink\022\017.context.LinkId\032\016.c" + - "ontext.Empty\"\000\0227\n\rGetLinkEvents\022\016.contex" + - "t.Empty\032\022.context.LinkEvent\"\0000\001\022>\n\016ListS" + - "erviceIds\022\022.context.ContextId\032\026.context." + - "ServiceIdList\"\000\022:\n\014ListServices\022\022.contex" + - "t.ContextId\032\024.context.ServiceList\"\000\0224\n\nG" + - "etService\022\022.context.ServiceId\032\020.context." + - "Service\"\000\0224\n\nSetService\022\020.context.Servic" + - "e\032\022.context.ServiceId\"\000\0225\n\rRemoveService" + - "\022\022.context.ServiceId\032\016.context.Empty\"\000\022=" + - "\n\020GetServiceEvents\022\016.context.Empty\032\025.con" + - "text.ServiceEvent\"\0000\001\022:\n\014ListSliceIds\022\022." + - "context.ContextId\032\024.context.SliceIdList\"" + - "\000\0226\n\nListSlices\022\022.context.ContextId\032\022.co" + - "ntext.SliceList\"\000\022.\n\010GetSlice\022\020.context." + - "SliceId\032\016.context.Slice\"\000\022.\n\010SetSlice\022\016." + - "context.Slice\032\020.context.SliceId\"\000\0221\n\013Rem" + - "oveSlice\022\020.context.SliceId\032\016.context.Emp" + - "ty\"\000\0229\n\016GetSliceEvents\022\016.context.Empty\032\023" + - ".context.SliceEvent\"\0000\001\022D\n\021ListConnectio" + - "nIds\022\022.context.ServiceId\032\031.context.Conne" + - "ctionIdList\"\000\022@\n\017ListConnections\022\022.conte" + - "xt.ServiceId\032\027.context.ConnectionList\"\000\022" + - "=\n\rGetConnection\022\025.context.ConnectionId\032" + - "\023.context.Connection\"\000\022=\n\rSetConnection\022" + - "\023.context.Connection\032\025.context.Connectio" + - "nId\"\000\022;\n\020RemoveConnection\022\025.context.Conn" + - "ectionId\032\016.context.Empty\"\000\022C\n\023GetConnect" + - "ionEvents\022\016.context.Empty\032\030.context.Conn" + - "ectionEvent\"\0000\001b\006proto3" + "Device\"\200\001\n\013DeviceEvent\022\035\n\005event\030\001 \001(\0132\016." + + "context.Event\022$\n\tdevice_id\030\002 \001(\0132\021.conte" + + "xt.DeviceId\022,\n\rdevice_config\030\003 \001(\0132\025.con" + + "text.DeviceConfig\"*\n\006LinkId\022 \n\tlink_uuid" + + "\030\001 \001(\0132\r.context.Uuid\"X\n\004Link\022 \n\007link_id" + + "\030\001 \001(\0132\017.context.LinkId\022.\n\021link_endpoint" + + "_ids\030\002 \003(\0132\023.context.EndPointId\"/\n\nLinkI" + + "dList\022!\n\010link_ids\030\001 \003(\0132\017.context.LinkId" + + "\"(\n\010LinkList\022\034\n\005links\030\001 \003(\0132\r.context.Li" + + "nk\"L\n\tLinkEvent\022\035\n\005event\030\001 \001(\0132\016.context" + + ".Event\022 \n\007link_id\030\002 \001(\0132\017.context.LinkId" + + "\"X\n\tServiceId\022&\n\ncontext_id\030\001 \001(\0132\022.cont" + + "ext.ContextId\022#\n\014service_uuid\030\002 \001(\0132\r.co" + + "ntext.Uuid\"\315\002\n\007Service\022&\n\nservice_id\030\001 \001" + + "(\0132\022.context.ServiceId\022.\n\014service_type\030\002" + + " \001(\0162\030.context.ServiceTypeEnum\0221\n\024servic" + + "e_endpoint_ids\030\003 \003(\0132\023.context.EndPointI" + + "d\0220\n\023service_constraints\030\004 \003(\0132\023.context" + + ".Constraint\022.\n\016service_status\030\005 \001(\0132\026.co" + + "ntext.ServiceStatus\022.\n\016service_config\030\006 " + + "\001(\0132\026.context.ServiceConfig\022%\n\ttimestamp" + + "\030\007 \001(\0132\022.context.Timestamp\"C\n\rServiceSta" + + "tus\0222\n\016service_status\030\001 \001(\0162\032.context.Se" + + "rviceStatusEnum\":\n\rServiceConfig\022)\n\014conf" + + "ig_rules\030\001 \003(\0132\023.context.ConfigRule\"8\n\rS" + + "erviceIdList\022\'\n\013service_ids\030\001 \003(\0132\022.cont" + + "ext.ServiceId\"1\n\013ServiceList\022\"\n\010services" + + "\030\001 \003(\0132\020.context.Service\"U\n\014ServiceEvent" + + "\022\035\n\005event\030\001 \001(\0132\016.context.Event\022&\n\nservi" + + "ce_id\030\002 \001(\0132\022.context.ServiceId\"T\n\007Slice" + + "Id\022&\n\ncontext_id\030\001 \001(\0132\022.context.Context" + + "Id\022!\n\nslice_uuid\030\002 \001(\0132\r.context.Uuid\"\222\003" + + "\n\005Slice\022\"\n\010slice_id\030\001 \001(\0132\020.context.Slic" + + "eId\022/\n\022slice_endpoint_ids\030\002 \003(\0132\023.contex" + + "t.EndPointId\022.\n\021slice_constraints\030\003 \003(\0132" + + "\023.context.Constraint\022-\n\021slice_service_id" + + "s\030\004 \003(\0132\022.context.ServiceId\022,\n\022slice_sub" + + "slice_ids\030\005 \003(\0132\020.context.SliceId\022*\n\014sli" + + "ce_status\030\006 \001(\0132\024.context.SliceStatus\022*\n" + + "\014slice_config\030\007 \001(\0132\024.context.SliceConfi" + + "g\022(\n\013slice_owner\030\010 \001(\0132\023.context.SliceOw" + + "ner\022%\n\ttimestamp\030\t \001(\0132\022.context.Timesta" + + "mp\"E\n\nSliceOwner\022!\n\nowner_uuid\030\001 \001(\0132\r.c" + + "ontext.Uuid\022\024\n\014owner_string\030\002 \001(\t\"=\n\013Sli" + + "ceStatus\022.\n\014slice_status\030\001 \001(\0162\030.context" + + ".SliceStatusEnum\"8\n\013SliceConfig\022)\n\014confi" + + "g_rules\030\001 \003(\0132\023.context.ConfigRule\"2\n\013Sl" + + "iceIdList\022#\n\tslice_ids\030\001 \003(\0132\020.context.S" + + "liceId\"+\n\tSliceList\022\036\n\006slices\030\001 \003(\0132\016.co" + + "ntext.Slice\"O\n\nSliceEvent\022\035\n\005event\030\001 \001(\013" + + "2\016.context.Event\022\"\n\010slice_id\030\002 \001(\0132\020.con" + + "text.SliceId\"6\n\014ConnectionId\022&\n\017connecti" + + "on_uuid\030\001 \001(\0132\r.context.Uuid\"2\n\025Connecti" + + "onSettings_L0\022\031\n\021lsp_symbolic_name\030\001 \001(\t" + + "\"\236\001\n\025ConnectionSettings_L2\022\027\n\017src_mac_ad" + + "dress\030\001 \001(\t\022\027\n\017dst_mac_address\030\002 \001(\t\022\022\n\n" + + "ether_type\030\003 \001(\r\022\017\n\007vlan_id\030\004 \001(\r\022\022\n\nmpl" + + "s_label\030\005 \001(\r\022\032\n\022mpls_traffic_class\030\006 \001(" + + "\r\"t\n\025ConnectionSettings_L3\022\026\n\016src_ip_add" + + "ress\030\001 \001(\t\022\026\n\016dst_ip_address\030\002 \001(\t\022\014\n\004ds" + + "cp\030\003 \001(\r\022\020\n\010protocol\030\004 \001(\r\022\013\n\003ttl\030\005 \001(\r\"" + + "[\n\025ConnectionSettings_L4\022\020\n\010src_port\030\001 \001" + + "(\r\022\020\n\010dst_port\030\002 \001(\r\022\021\n\ttcp_flags\030\003 \001(\r\022" + + "\013\n\003ttl\030\004 \001(\r\"\304\001\n\022ConnectionSettings\022*\n\002l" + + "0\030\001 \001(\0132\036.context.ConnectionSettings_L0\022" + + "*\n\002l2\030\002 \001(\0132\036.context.ConnectionSettings" + + "_L2\022*\n\002l3\030\003 \001(\0132\036.context.ConnectionSett" + + "ings_L3\022*\n\002l4\030\004 \001(\0132\036.context.Connection" + + "Settings_L4\"\363\001\n\nConnection\022,\n\rconnection" + + "_id\030\001 \001(\0132\025.context.ConnectionId\022&\n\nserv" + + "ice_id\030\002 \001(\0132\022.context.ServiceId\0223\n\026path" + + "_hops_endpoint_ids\030\003 \003(\0132\023.context.EndPo" + + "intId\022+\n\017sub_service_ids\030\004 \003(\0132\022.context" + + ".ServiceId\022-\n\010settings\030\005 \001(\0132\033.context.C" + + "onnectionSettings\"A\n\020ConnectionIdList\022-\n" + + "\016connection_ids\030\001 \003(\0132\025.context.Connecti" + + "onId\":\n\016ConnectionList\022(\n\013connections\030\001 " + + "\003(\0132\023.context.Connection\"^\n\017ConnectionEv" + + "ent\022\035\n\005event\030\001 \001(\0132\016.context.Event\022,\n\rco" + + "nnection_id\030\002 \001(\0132\025.context.ConnectionId" + + "\"\202\001\n\nEndPointId\022(\n\013topology_id\030\001 \001(\0132\023.c" + + "ontext.TopologyId\022$\n\tdevice_id\030\002 \001(\0132\021.c" + + "ontext.DeviceId\022$\n\rendpoint_uuid\030\003 \001(\0132\r" + + ".context.Uuid\"\264\001\n\010EndPoint\022(\n\013endpoint_i" + + "d\030\001 \001(\0132\023.context.EndPointId\022\025\n\rendpoint" + + "_type\030\002 \001(\t\0229\n\020kpi_sample_types\030\003 \003(\0162\037." + + "kpi_sample_types.KpiSampleType\022,\n\021endpoi" + + "nt_location\030\004 \001(\0132\021.context.Location\"A\n\021" + + "ConfigRule_Custom\022\024\n\014resource_key\030\001 \001(\t\022" + + "\026\n\016resource_value\030\002 \001(\t\"]\n\016ConfigRule_AC" + + "L\022(\n\013endpoint_id\030\001 \001(\0132\023.context.EndPoin" + + "tId\022!\n\010rule_set\030\002 \001(\0132\017.acl.AclRuleSet\"\234" + + "\001\n\nConfigRule\022)\n\006action\030\001 \001(\0162\031.context." + + "ConfigActionEnum\022,\n\006custom\030\002 \001(\0132\032.conte" + + "xt.ConfigRule_CustomH\000\022&\n\003acl\030\003 \001(\0132\027.co" + + "ntext.ConfigRule_ACLH\000B\r\n\013config_rule\"F\n" + + "\021Constraint_Custom\022\027\n\017constraint_type\030\001 " + + "\001(\t\022\030\n\020constraint_value\030\002 \001(\t\"E\n\023Constra" + + "int_Schedule\022\027\n\017start_timestamp\030\001 \001(\002\022\025\n" + + "\rduration_days\030\002 \001(\002\"3\n\014GPS_Position\022\020\n\010" + + "latitude\030\001 \001(\002\022\021\n\tlongitude\030\002 \001(\002\"W\n\010Loc" + + "ation\022\020\n\006region\030\001 \001(\tH\000\022-\n\014gps_position\030" + + "\002 \001(\0132\025.context.GPS_PositionH\000B\n\n\010locati" + + "on\"l\n\033Constraint_EndPointLocation\022(\n\013end" + + "point_id\030\001 \001(\0132\023.context.EndPointId\022#\n\010l" + + "ocation\030\002 \001(\0132\021.context.Location\"Y\n\033Cons" + + "traint_EndPointPriority\022(\n\013endpoint_id\030\001" + + " \001(\0132\023.context.EndPointId\022\020\n\010priority\030\002 " + + "\001(\r\"0\n\026Constraint_SLA_Latency\022\026\n\016e2e_lat" + + "ency_ms\030\001 \001(\002\"0\n\027Constraint_SLA_Capacity" + + "\022\025\n\rcapacity_gbps\030\001 \001(\002\"M\n\033Constraint_SL" + + "A_Availability\022\032\n\022num_disjoint_paths\030\001 \001" + + "(\r\022\022\n\nall_active\030\002 \001(\010\"V\n\036Constraint_SLA" + + "_Isolation_level\0224\n\017isolation_level\030\001 \003(" + + "\0162\033.context.IsolationLevelEnum\"\366\003\n\nConst" + + "raint\022,\n\006custom\030\001 \001(\0132\032.context.Constrai" + + "nt_CustomH\000\0220\n\010schedule\030\002 \001(\0132\034.context." + + "Constraint_ScheduleH\000\022A\n\021endpoint_locati" + + "on\030\003 \001(\0132$.context.Constraint_EndPointLo" + + "cationH\000\022A\n\021endpoint_priority\030\004 \001(\0132$.co" + + "ntext.Constraint_EndPointPriorityH\000\0228\n\014s" + + "la_capacity\030\005 \001(\0132 .context.Constraint_S" + + "LA_CapacityH\000\0226\n\013sla_latency\030\006 \001(\0132\037.con" + + "text.Constraint_SLA_LatencyH\000\022@\n\020sla_ava" + + "ilability\030\007 \001(\0132$.context.Constraint_SLA" + + "_AvailabilityH\000\022@\n\rsla_isolation\030\010 \001(\0132\'" + + ".context.Constraint_SLA_Isolation_levelH" + + "\000B\014\n\nconstraint\"^\n\022TeraFlowController\022&\n" + + "\ncontext_id\030\001 \001(\0132\022.context.ContextId\022\022\n" + + "\nip_address\030\002 \001(\t\022\014\n\004port\030\003 \001(\r\"U\n\024Authe" + + "nticationResult\022&\n\ncontext_id\030\001 \001(\0132\022.co" + + "ntext.ContextId\022\025\n\rauthenticated\030\002 \001(\010*j" + + "\n\rEventTypeEnum\022\027\n\023EVENTTYPE_UNDEFINED\020\000" + + "\022\024\n\020EVENTTYPE_CREATE\020\001\022\024\n\020EVENTTYPE_UPDA" + + "TE\020\002\022\024\n\020EVENTTYPE_REMOVE\020\003*\305\001\n\020DeviceDri" + + "verEnum\022\032\n\026DEVICEDRIVER_UNDEFINED\020\000\022\033\n\027D" + + "EVICEDRIVER_OPENCONFIG\020\001\022\036\n\032DEVICEDRIVER" + + "_TRANSPORT_API\020\002\022\023\n\017DEVICEDRIVER_P4\020\003\022&\n" + + "\"DEVICEDRIVER_IETF_NETWORK_TOPOLOGY\020\004\022\033\n" + + "\027DEVICEDRIVER_ONF_TR_352\020\005*\217\001\n\033DeviceOpe" + + "rationalStatusEnum\022%\n!DEVICEOPERATIONALS" + + "TATUS_UNDEFINED\020\000\022$\n DEVICEOPERATIONALST" + + "ATUS_DISABLED\020\001\022#\n\037DEVICEOPERATIONALSTAT" + + "US_ENABLED\020\002*\201\001\n\017ServiceTypeEnum\022\027\n\023SERV" + + "ICETYPE_UNKNOWN\020\000\022\024\n\020SERVICETYPE_L3NM\020\001\022" + + "\024\n\020SERVICETYPE_L2NM\020\002\022)\n%SERVICETYPE_TAP" + + "I_CONNECTIVITY_SERVICE\020\003*\250\001\n\021ServiceStat" + + "usEnum\022\033\n\027SERVICESTATUS_UNDEFINED\020\000\022\031\n\025S" + + "ERVICESTATUS_PLANNED\020\001\022\030\n\024SERVICESTATUS_" + + "ACTIVE\020\002\022!\n\035SERVICESTATUS_PENDING_REMOVA" + + "L\020\003\022\036\n\032SERVICESTATUS_SLA_VIOLATED\020\004*\251\001\n\017" + + "SliceStatusEnum\022\031\n\025SLICESTATUS_UNDEFINED" + + "\020\000\022\027\n\023SLICESTATUS_PLANNED\020\001\022\024\n\020SLICESTAT" + + "US_INIT\020\002\022\026\n\022SLICESTATUS_ACTIVE\020\003\022\026\n\022SLI" + + "CESTATUS_DEINIT\020\004\022\034\n\030SLICESTATUS_SLA_VIO" + + "LATED\020\005*]\n\020ConfigActionEnum\022\032\n\026CONFIGACT" + + "ION_UNDEFINED\020\000\022\024\n\020CONFIGACTION_SET\020\001\022\027\n" + + "\023CONFIGACTION_DELETE\020\002*\203\002\n\022IsolationLeve" + + "lEnum\022\020\n\014NO_ISOLATION\020\000\022\026\n\022PHYSICAL_ISOL" + + "ATION\020\001\022\025\n\021LOGICAL_ISOLATION\020\002\022\025\n\021PROCES" + + "S_ISOLATION\020\003\022\035\n\031PHYSICAL_MEMORY_ISOLATI" + + "ON\020\004\022\036\n\032PHYSICAL_NETWORK_ISOLATION\020\005\022\036\n\032" + + "VIRTUAL_RESOURCE_ISOLATION\020\006\022\037\n\033NETWORK_" + + "FUNCTIONS_ISOLATION\020\007\022\025\n\021SERVICE_ISOLATI" + + "ON\020\0102\331\023\n\016ContextService\022:\n\016ListContextId" + + "s\022\016.context.Empty\032\026.context.ContextIdLis" + + "t\"\000\0226\n\014ListContexts\022\016.context.Empty\032\024.co" + + "ntext.ContextList\"\000\0224\n\nGetContext\022\022.cont" + + "ext.ContextId\032\020.context.Context\"\000\0224\n\nSet" + + "Context\022\020.context.Context\032\022.context.Cont" + + "extId\"\000\0225\n\rRemoveContext\022\022.context.Conte" + + "xtId\032\016.context.Empty\"\000\022=\n\020GetContextEven" + + "ts\022\016.context.Empty\032\025.context.ContextEven" + + "t\"\0000\001\022@\n\017ListTopologyIds\022\022.context.Conte" + + "xtId\032\027.context.TopologyIdList\"\000\022=\n\016ListT" + + "opologies\022\022.context.ContextId\032\025.context." + + "TopologyList\"\000\0227\n\013GetTopology\022\023.context." + + "TopologyId\032\021.context.Topology\"\000\0227\n\013SetTo" + + "pology\022\021.context.Topology\032\023.context.Topo" + + "logyId\"\000\0227\n\016RemoveTopology\022\023.context.Top" + + "ologyId\032\016.context.Empty\"\000\022?\n\021GetTopology" + + "Events\022\016.context.Empty\032\026.context.Topolog" + + "yEvent\"\0000\001\0228\n\rListDeviceIds\022\016.context.Em" + + "pty\032\025.context.DeviceIdList\"\000\0224\n\013ListDevi" + + "ces\022\016.context.Empty\032\023.context.DeviceList" + + "\"\000\0221\n\tGetDevice\022\021.context.DeviceId\032\017.con" + + "text.Device\"\000\0221\n\tSetDevice\022\017.context.Dev" + + "ice\032\021.context.DeviceId\"\000\0223\n\014RemoveDevice" + + "\022\021.context.DeviceId\032\016.context.Empty\"\000\022;\n" + + "\017GetDeviceEvents\022\016.context.Empty\032\024.conte" + + "xt.DeviceEvent\"\0000\001\0224\n\013ListLinkIds\022\016.cont" + + "ext.Empty\032\023.context.LinkIdList\"\000\0220\n\tList" + + "Links\022\016.context.Empty\032\021.context.LinkList" + + "\"\000\022+\n\007GetLink\022\017.context.LinkId\032\r.context" + + ".Link\"\000\022+\n\007SetLink\022\r.context.Link\032\017.cont" + + "ext.LinkId\"\000\022/\n\nRemoveLink\022\017.context.Lin" + + "kId\032\016.context.Empty\"\000\0227\n\rGetLinkEvents\022\016" + + ".context.Empty\032\022.context.LinkEvent\"\0000\001\022>" + + "\n\016ListServiceIds\022\022.context.ContextId\032\026.c" + + "ontext.ServiceIdList\"\000\022:\n\014ListServices\022\022" + + ".context.ContextId\032\024.context.ServiceList" + + "\"\000\0224\n\nGetService\022\022.context.ServiceId\032\020.c" + + "ontext.Service\"\000\0224\n\nSetService\022\020.context" + + ".Service\032\022.context.ServiceId\"\000\0226\n\014UnsetS" + + "ervice\022\020.context.Service\032\022.context.Servi" + + "ceId\"\000\0225\n\rRemoveService\022\022.context.Servic" + + "eId\032\016.context.Empty\"\000\022=\n\020GetServiceEvent" + + "s\022\016.context.Empty\032\025.context.ServiceEvent" + + "\"\0000\001\022:\n\014ListSliceIds\022\022.context.ContextId" + + "\032\024.context.SliceIdList\"\000\0226\n\nListSlices\022\022" + + ".context.ContextId\032\022.context.SliceList\"\000" + + "\022.\n\010GetSlice\022\020.context.SliceId\032\016.context" + + ".Slice\"\000\022.\n\010SetSlice\022\016.context.Slice\032\020.c" + + "ontext.SliceId\"\000\0220\n\nUnsetSlice\022\016.context" + + ".Slice\032\020.context.SliceId\"\000\0221\n\013RemoveSlic" + + "e\022\020.context.SliceId\032\016.context.Empty\"\000\0229\n" + + "\016GetSliceEvents\022\016.context.Empty\032\023.contex" + + "t.SliceEvent\"\0000\001\022D\n\021ListConnectionIds\022\022." + + "context.ServiceId\032\031.context.ConnectionId" + + "List\"\000\022@\n\017ListConnections\022\022.context.Serv" + + "iceId\032\027.context.ConnectionList\"\000\022=\n\rGetC" + + "onnection\022\025.context.ConnectionId\032\023.conte" + + "xt.Connection\"\000\022=\n\rSetConnection\022\023.conte" + + "xt.Connection\032\025.context.ConnectionId\"\000\022;" + + "\n\020RemoveConnection\022\025.context.ConnectionI" + + "d\032\016.context.Empty\"\000\022C\n\023GetConnectionEven" + + "ts\022\016.context.Empty\032\030.context.ConnectionE" + + "vent\"\0000\001b\006proto3" }; descriptor = com.google.protobuf.Descriptors.FileDescriptor .internalBuildGeneratedFileFrom(descriptorData, @@ -62331,7 +62538,7 @@ public final class ContextOuterClass { internal_static_context_DeviceEvent_fieldAccessorTable = new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( internal_static_context_DeviceEvent_descriptor, - new java.lang.String[] { "Event", "DeviceId", }); + new java.lang.String[] { "Event", "DeviceId", "DeviceConfig", }); internal_static_context_LinkId_descriptor = getDescriptor().getMessageTypes().get(20); internal_static_context_LinkId_fieldAccessorTable = new diff --git a/src/automation/target/generated-sources/grpc/context/ContextService.java b/src/automation/target/generated-sources/grpc/context/ContextService.java index d54c56057ca53e40071490d3b9aa313a13a77665..814ea98b65370f8fd3ffd752c77bec04997a5dd6 100644 --- a/src/automation/target/generated-sources/grpc/context/ContextService.java +++ b/src/automation/target/generated-sources/grpc/context/ContextService.java @@ -56,6 +56,8 @@ public interface ContextService extends MutinyService { io.smallrye.mutiny.Uni<context.ContextOuterClass.ServiceId> setService(context.ContextOuterClass.Service request); + io.smallrye.mutiny.Uni<context.ContextOuterClass.ServiceId> unsetService(context.ContextOuterClass.Service request); + io.smallrye.mutiny.Uni<context.ContextOuterClass.Empty> removeService(context.ContextOuterClass.ServiceId request); io.smallrye.mutiny.Uni<context.ContextOuterClass.SliceIdList> listSliceIds(context.ContextOuterClass.ContextId request); @@ -66,6 +68,8 @@ public interface ContextService extends MutinyService { io.smallrye.mutiny.Uni<context.ContextOuterClass.SliceId> setSlice(context.ContextOuterClass.Slice request); + io.smallrye.mutiny.Uni<context.ContextOuterClass.SliceId> unsetSlice(context.ContextOuterClass.Slice request); + io.smallrye.mutiny.Uni<context.ContextOuterClass.Empty> removeSlice(context.ContextOuterClass.SliceId request); io.smallrye.mutiny.Uni<context.ContextOuterClass.ConnectionIdList> listConnectionIds(context.ContextOuterClass.ServiceId request); diff --git a/src/automation/target/generated-sources/grpc/context/ContextServiceBean.java b/src/automation/target/generated-sources/grpc/context/ContextServiceBean.java index f552294b8e6d645af41cc30632ae0432504bbc67..2b0099f106265e34d1f60bb3e0ecdc35f81895ee 100644 --- a/src/automation/target/generated-sources/grpc/context/ContextServiceBean.java +++ b/src/automation/target/generated-sources/grpc/context/ContextServiceBean.java @@ -208,6 +208,14 @@ public class ContextServiceBean extends MutinyContextServiceGrpc.ContextServiceI } } @Override + public io.smallrye.mutiny.Uni<context.ContextOuterClass.ServiceId> unsetService(context.ContextOuterClass.Service request) { + try { + return delegate.unsetService(request); + } catch (UnsupportedOperationException e) { + throw new io.grpc.StatusRuntimeException(io.grpc.Status.UNIMPLEMENTED); + } + } + @Override public io.smallrye.mutiny.Uni<context.ContextOuterClass.Empty> removeService(context.ContextOuterClass.ServiceId request) { try { return delegate.removeService(request); @@ -248,6 +256,14 @@ public class ContextServiceBean extends MutinyContextServiceGrpc.ContextServiceI } } @Override + public io.smallrye.mutiny.Uni<context.ContextOuterClass.SliceId> unsetSlice(context.ContextOuterClass.Slice request) { + try { + return delegate.unsetSlice(request); + } catch (UnsupportedOperationException e) { + throw new io.grpc.StatusRuntimeException(io.grpc.Status.UNIMPLEMENTED); + } + } + @Override public io.smallrye.mutiny.Uni<context.ContextOuterClass.Empty> removeSlice(context.ContextOuterClass.SliceId request) { try { return delegate.removeSlice(request); diff --git a/src/automation/target/generated-sources/grpc/context/ContextServiceClient.java b/src/automation/target/generated-sources/grpc/context/ContextServiceClient.java index c6493bd4d381967238e5eb87dd717f679d028526..c518a0b4622522728e0eb22fdbeb80442b10f7ef 100644 --- a/src/automation/target/generated-sources/grpc/context/ContextServiceClient.java +++ b/src/automation/target/generated-sources/grpc/context/ContextServiceClient.java @@ -117,6 +117,10 @@ public class ContextServiceClient implements ContextService, MutinyClient<Mutiny return stub.setService(request); } @Override + public io.smallrye.mutiny.Uni<context.ContextOuterClass.ServiceId> unsetService(context.ContextOuterClass.Service request) { + return stub.unsetService(request); + } + @Override public io.smallrye.mutiny.Uni<context.ContextOuterClass.Empty> removeService(context.ContextOuterClass.ServiceId request) { return stub.removeService(request); } @@ -137,6 +141,10 @@ public class ContextServiceClient implements ContextService, MutinyClient<Mutiny return stub.setSlice(request); } @Override + public io.smallrye.mutiny.Uni<context.ContextOuterClass.SliceId> unsetSlice(context.ContextOuterClass.Slice request) { + return stub.unsetSlice(request); + } + @Override public io.smallrye.mutiny.Uni<context.ContextOuterClass.Empty> removeSlice(context.ContextOuterClass.SliceId request) { return stub.removeSlice(request); } diff --git a/src/automation/target/generated-sources/grpc/context/ContextServiceGrpc.java b/src/automation/target/generated-sources/grpc/context/ContextServiceGrpc.java index be720c127439e50f68c2518332f85f750d6579ee..f59378086c84d0776cc25fb7aa9640403b072c0f 100644 --- a/src/automation/target/generated-sources/grpc/context/ContextServiceGrpc.java +++ b/src/automation/target/generated-sources/grpc/context/ContextServiceGrpc.java @@ -882,6 +882,37 @@ public final class ContextServiceGrpc { return getSetServiceMethod; } + private static volatile io.grpc.MethodDescriptor<context.ContextOuterClass.Service, + context.ContextOuterClass.ServiceId> getUnsetServiceMethod; + + @io.grpc.stub.annotations.RpcMethod( + fullMethodName = SERVICE_NAME + '/' + "UnsetService", + requestType = context.ContextOuterClass.Service.class, + responseType = context.ContextOuterClass.ServiceId.class, + methodType = io.grpc.MethodDescriptor.MethodType.UNARY) + public static io.grpc.MethodDescriptor<context.ContextOuterClass.Service, + context.ContextOuterClass.ServiceId> getUnsetServiceMethod() { + io.grpc.MethodDescriptor<context.ContextOuterClass.Service, context.ContextOuterClass.ServiceId> getUnsetServiceMethod; + if ((getUnsetServiceMethod = ContextServiceGrpc.getUnsetServiceMethod) == null) { + synchronized (ContextServiceGrpc.class) { + if ((getUnsetServiceMethod = ContextServiceGrpc.getUnsetServiceMethod) == null) { + ContextServiceGrpc.getUnsetServiceMethod = getUnsetServiceMethod = + io.grpc.MethodDescriptor.<context.ContextOuterClass.Service, context.ContextOuterClass.ServiceId>newBuilder() + .setType(io.grpc.MethodDescriptor.MethodType.UNARY) + .setFullMethodName(generateFullMethodName(SERVICE_NAME, "UnsetService")) + .setSampledToLocalTracing(true) + .setRequestMarshaller(io.grpc.protobuf.ProtoUtils.marshaller( + context.ContextOuterClass.Service.getDefaultInstance())) + .setResponseMarshaller(io.grpc.protobuf.ProtoUtils.marshaller( + context.ContextOuterClass.ServiceId.getDefaultInstance())) + .setSchemaDescriptor(new ContextServiceMethodDescriptorSupplier("UnsetService")) + .build(); + } + } + } + return getUnsetServiceMethod; + } + private static volatile io.grpc.MethodDescriptor<context.ContextOuterClass.ServiceId, context.ContextOuterClass.Empty> getRemoveServiceMethod; @@ -1068,6 +1099,37 @@ public final class ContextServiceGrpc { return getSetSliceMethod; } + private static volatile io.grpc.MethodDescriptor<context.ContextOuterClass.Slice, + context.ContextOuterClass.SliceId> getUnsetSliceMethod; + + @io.grpc.stub.annotations.RpcMethod( + fullMethodName = SERVICE_NAME + '/' + "UnsetSlice", + requestType = context.ContextOuterClass.Slice.class, + responseType = context.ContextOuterClass.SliceId.class, + methodType = io.grpc.MethodDescriptor.MethodType.UNARY) + public static io.grpc.MethodDescriptor<context.ContextOuterClass.Slice, + context.ContextOuterClass.SliceId> getUnsetSliceMethod() { + io.grpc.MethodDescriptor<context.ContextOuterClass.Slice, context.ContextOuterClass.SliceId> getUnsetSliceMethod; + if ((getUnsetSliceMethod = ContextServiceGrpc.getUnsetSliceMethod) == null) { + synchronized (ContextServiceGrpc.class) { + if ((getUnsetSliceMethod = ContextServiceGrpc.getUnsetSliceMethod) == null) { + ContextServiceGrpc.getUnsetSliceMethod = getUnsetSliceMethod = + io.grpc.MethodDescriptor.<context.ContextOuterClass.Slice, context.ContextOuterClass.SliceId>newBuilder() + .setType(io.grpc.MethodDescriptor.MethodType.UNARY) + .setFullMethodName(generateFullMethodName(SERVICE_NAME, "UnsetSlice")) + .setSampledToLocalTracing(true) + .setRequestMarshaller(io.grpc.protobuf.ProtoUtils.marshaller( + context.ContextOuterClass.Slice.getDefaultInstance())) + .setResponseMarshaller(io.grpc.protobuf.ProtoUtils.marshaller( + context.ContextOuterClass.SliceId.getDefaultInstance())) + .setSchemaDescriptor(new ContextServiceMethodDescriptorSupplier("UnsetSlice")) + .build(); + } + } + } + return getUnsetSliceMethod; + } + private static volatile io.grpc.MethodDescriptor<context.ContextOuterClass.SliceId, context.ContextOuterClass.Empty> getRemoveSliceMethod; @@ -1560,6 +1622,13 @@ public final class ContextServiceGrpc { io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall(getSetServiceMethod(), responseObserver); } + /** + */ + public void unsetService(context.ContextOuterClass.Service request, + io.grpc.stub.StreamObserver<context.ContextOuterClass.ServiceId> responseObserver) { + io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall(getUnsetServiceMethod(), responseObserver); + } + /** */ public void removeService(context.ContextOuterClass.ServiceId request, @@ -1602,6 +1671,13 @@ public final class ContextServiceGrpc { io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall(getSetSliceMethod(), responseObserver); } + /** + */ + public void unsetSlice(context.ContextOuterClass.Slice request, + io.grpc.stub.StreamObserver<context.ContextOuterClass.SliceId> responseObserver) { + io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall(getUnsetSliceMethod(), responseObserver); + } + /** */ public void removeSlice(context.ContextOuterClass.SliceId request, @@ -1856,6 +1932,13 @@ public final class ContextServiceGrpc { context.ContextOuterClass.Service, context.ContextOuterClass.ServiceId>( this, METHODID_SET_SERVICE))) + .addMethod( + getUnsetServiceMethod(), + io.grpc.stub.ServerCalls.asyncUnaryCall( + new MethodHandlers< + context.ContextOuterClass.Service, + context.ContextOuterClass.ServiceId>( + this, METHODID_UNSET_SERVICE))) .addMethod( getRemoveServiceMethod(), io.grpc.stub.ServerCalls.asyncUnaryCall( @@ -1898,6 +1981,13 @@ public final class ContextServiceGrpc { context.ContextOuterClass.Slice, context.ContextOuterClass.SliceId>( this, METHODID_SET_SLICE))) + .addMethod( + getUnsetSliceMethod(), + io.grpc.stub.ServerCalls.asyncUnaryCall( + new MethodHandlers< + context.ContextOuterClass.Slice, + context.ContextOuterClass.SliceId>( + this, METHODID_UNSET_SLICE))) .addMethod( getRemoveSliceMethod(), io.grpc.stub.ServerCalls.asyncUnaryCall( @@ -2196,6 +2286,14 @@ public final class ContextServiceGrpc { getChannel().newCall(getSetServiceMethod(), getCallOptions()), request, responseObserver); } + /** + */ + public void unsetService(context.ContextOuterClass.Service request, + io.grpc.stub.StreamObserver<context.ContextOuterClass.ServiceId> responseObserver) { + io.grpc.stub.ClientCalls.asyncUnaryCall( + getChannel().newCall(getUnsetServiceMethod(), getCallOptions()), request, responseObserver); + } + /** */ public void removeService(context.ContextOuterClass.ServiceId request, @@ -2244,6 +2342,14 @@ public final class ContextServiceGrpc { getChannel().newCall(getSetSliceMethod(), getCallOptions()), request, responseObserver); } + /** + */ + public void unsetSlice(context.ContextOuterClass.Slice request, + io.grpc.stub.StreamObserver<context.ContextOuterClass.SliceId> responseObserver) { + io.grpc.stub.ClientCalls.asyncUnaryCall( + getChannel().newCall(getUnsetSliceMethod(), getCallOptions()), request, responseObserver); + } + /** */ public void removeSlice(context.ContextOuterClass.SliceId request, @@ -2523,6 +2629,13 @@ public final class ContextServiceGrpc { getChannel(), getSetServiceMethod(), getCallOptions(), request); } + /** + */ + public context.ContextOuterClass.ServiceId unsetService(context.ContextOuterClass.Service request) { + return io.grpc.stub.ClientCalls.blockingUnaryCall( + getChannel(), getUnsetServiceMethod(), getCallOptions(), request); + } + /** */ public context.ContextOuterClass.Empty removeService(context.ContextOuterClass.ServiceId request) { @@ -2566,6 +2679,13 @@ public final class ContextServiceGrpc { getChannel(), getSetSliceMethod(), getCallOptions(), request); } + /** + */ + public context.ContextOuterClass.SliceId unsetSlice(context.ContextOuterClass.Slice request) { + return io.grpc.stub.ClientCalls.blockingUnaryCall( + getChannel(), getUnsetSliceMethod(), getCallOptions(), request); + } + /** */ public context.ContextOuterClass.Empty removeSlice(context.ContextOuterClass.SliceId request) { @@ -2831,6 +2951,14 @@ public final class ContextServiceGrpc { getChannel().newCall(getSetServiceMethod(), getCallOptions()), request); } + /** + */ + public com.google.common.util.concurrent.ListenableFuture<context.ContextOuterClass.ServiceId> unsetService( + context.ContextOuterClass.Service request) { + return io.grpc.stub.ClientCalls.futureUnaryCall( + getChannel().newCall(getUnsetServiceMethod(), getCallOptions()), request); + } + /** */ public com.google.common.util.concurrent.ListenableFuture<context.ContextOuterClass.Empty> removeService( @@ -2871,6 +2999,14 @@ public final class ContextServiceGrpc { getChannel().newCall(getSetSliceMethod(), getCallOptions()), request); } + /** + */ + public com.google.common.util.concurrent.ListenableFuture<context.ContextOuterClass.SliceId> unsetSlice( + context.ContextOuterClass.Slice request) { + return io.grpc.stub.ClientCalls.futureUnaryCall( + getChannel().newCall(getUnsetSliceMethod(), getCallOptions()), request); + } + /** */ public com.google.common.util.concurrent.ListenableFuture<context.ContextOuterClass.Empty> removeSlice( @@ -2948,20 +3084,22 @@ public final class ContextServiceGrpc { private static final int METHODID_LIST_SERVICES = 25; private static final int METHODID_GET_SERVICE = 26; private static final int METHODID_SET_SERVICE = 27; - private static final int METHODID_REMOVE_SERVICE = 28; - private static final int METHODID_GET_SERVICE_EVENTS = 29; - private static final int METHODID_LIST_SLICE_IDS = 30; - private static final int METHODID_LIST_SLICES = 31; - private static final int METHODID_GET_SLICE = 32; - private static final int METHODID_SET_SLICE = 33; - private static final int METHODID_REMOVE_SLICE = 34; - private static final int METHODID_GET_SLICE_EVENTS = 35; - private static final int METHODID_LIST_CONNECTION_IDS = 36; - private static final int METHODID_LIST_CONNECTIONS = 37; - private static final int METHODID_GET_CONNECTION = 38; - private static final int METHODID_SET_CONNECTION = 39; - private static final int METHODID_REMOVE_CONNECTION = 40; - private static final int METHODID_GET_CONNECTION_EVENTS = 41; + private static final int METHODID_UNSET_SERVICE = 28; + private static final int METHODID_REMOVE_SERVICE = 29; + private static final int METHODID_GET_SERVICE_EVENTS = 30; + private static final int METHODID_LIST_SLICE_IDS = 31; + private static final int METHODID_LIST_SLICES = 32; + private static final int METHODID_GET_SLICE = 33; + private static final int METHODID_SET_SLICE = 34; + private static final int METHODID_UNSET_SLICE = 35; + private static final int METHODID_REMOVE_SLICE = 36; + private static final int METHODID_GET_SLICE_EVENTS = 37; + private static final int METHODID_LIST_CONNECTION_IDS = 38; + private static final int METHODID_LIST_CONNECTIONS = 39; + private static final int METHODID_GET_CONNECTION = 40; + private static final int METHODID_SET_CONNECTION = 41; + private static final int METHODID_REMOVE_CONNECTION = 42; + private static final int METHODID_GET_CONNECTION_EVENTS = 43; private static final class MethodHandlers<Req, Resp> implements io.grpc.stub.ServerCalls.UnaryMethod<Req, Resp>, @@ -3092,6 +3230,10 @@ public final class ContextServiceGrpc { serviceImpl.setService((context.ContextOuterClass.Service) request, (io.grpc.stub.StreamObserver<context.ContextOuterClass.ServiceId>) responseObserver); break; + case METHODID_UNSET_SERVICE: + serviceImpl.unsetService((context.ContextOuterClass.Service) request, + (io.grpc.stub.StreamObserver<context.ContextOuterClass.ServiceId>) responseObserver); + break; case METHODID_REMOVE_SERVICE: serviceImpl.removeService((context.ContextOuterClass.ServiceId) request, (io.grpc.stub.StreamObserver<context.ContextOuterClass.Empty>) responseObserver); @@ -3116,6 +3258,10 @@ public final class ContextServiceGrpc { serviceImpl.setSlice((context.ContextOuterClass.Slice) request, (io.grpc.stub.StreamObserver<context.ContextOuterClass.SliceId>) responseObserver); break; + case METHODID_UNSET_SLICE: + serviceImpl.unsetSlice((context.ContextOuterClass.Slice) request, + (io.grpc.stub.StreamObserver<context.ContextOuterClass.SliceId>) responseObserver); + break; case METHODID_REMOVE_SLICE: serviceImpl.removeSlice((context.ContextOuterClass.SliceId) request, (io.grpc.stub.StreamObserver<context.ContextOuterClass.Empty>) responseObserver); @@ -3237,12 +3383,14 @@ public final class ContextServiceGrpc { .addMethod(getListServicesMethod()) .addMethod(getGetServiceMethod()) .addMethod(getSetServiceMethod()) + .addMethod(getUnsetServiceMethod()) .addMethod(getRemoveServiceMethod()) .addMethod(getGetServiceEventsMethod()) .addMethod(getListSliceIdsMethod()) .addMethod(getListSlicesMethod()) .addMethod(getGetSliceMethod()) .addMethod(getSetSliceMethod()) + .addMethod(getUnsetSliceMethod()) .addMethod(getRemoveSliceMethod()) .addMethod(getGetSliceEventsMethod()) .addMethod(getListConnectionIdsMethod()) diff --git a/src/automation/target/generated-sources/grpc/context/MutinyContextServiceGrpc.java b/src/automation/target/generated-sources/grpc/context/MutinyContextServiceGrpc.java index 9f71b53786e40922546dc59cfd4328040a40bd7c..f7d2cb94e339366b54355c7e11b3ee72fa1e415c 100644 --- a/src/automation/target/generated-sources/grpc/context/MutinyContextServiceGrpc.java +++ b/src/automation/target/generated-sources/grpc/context/MutinyContextServiceGrpc.java @@ -156,6 +156,11 @@ public final class MutinyContextServiceGrpc implements io.quarkus.grpc.runtime.M } + public io.smallrye.mutiny.Uni<context.ContextOuterClass.ServiceId> unsetService(context.ContextOuterClass.Service request) { + return io.quarkus.grpc.runtime.ClientCalls.oneToOne(request, delegateStub::unsetService); + } + + public io.smallrye.mutiny.Uni<context.ContextOuterClass.Empty> removeService(context.ContextOuterClass.ServiceId request) { return io.quarkus.grpc.runtime.ClientCalls.oneToOne(request, delegateStub::removeService); } @@ -181,6 +186,11 @@ public final class MutinyContextServiceGrpc implements io.quarkus.grpc.runtime.M } + public io.smallrye.mutiny.Uni<context.ContextOuterClass.SliceId> unsetSlice(context.ContextOuterClass.Slice request) { + return io.quarkus.grpc.runtime.ClientCalls.oneToOne(request, delegateStub::unsetSlice); + } + + public io.smallrye.mutiny.Uni<context.ContextOuterClass.Empty> removeSlice(context.ContextOuterClass.SliceId request) { return io.quarkus.grpc.runtime.ClientCalls.oneToOne(request, delegateStub::removeSlice); } @@ -383,6 +393,11 @@ public final class MutinyContextServiceGrpc implements io.quarkus.grpc.runtime.M } + public io.smallrye.mutiny.Uni<context.ContextOuterClass.ServiceId> unsetService(context.ContextOuterClass.Service request) { + throw new io.grpc.StatusRuntimeException(io.grpc.Status.UNIMPLEMENTED); + } + + public io.smallrye.mutiny.Uni<context.ContextOuterClass.Empty> removeService(context.ContextOuterClass.ServiceId request) { throw new io.grpc.StatusRuntimeException(io.grpc.Status.UNIMPLEMENTED); } @@ -408,6 +423,11 @@ public final class MutinyContextServiceGrpc implements io.quarkus.grpc.runtime.M } + public io.smallrye.mutiny.Uni<context.ContextOuterClass.SliceId> unsetSlice(context.ContextOuterClass.Slice request) { + throw new io.grpc.StatusRuntimeException(io.grpc.Status.UNIMPLEMENTED); + } + + public io.smallrye.mutiny.Uni<context.ContextOuterClass.Empty> removeSlice(context.ContextOuterClass.SliceId request) { throw new io.grpc.StatusRuntimeException(io.grpc.Status.UNIMPLEMENTED); } @@ -670,6 +690,13 @@ public final class MutinyContextServiceGrpc implements io.quarkus.grpc.runtime.M context.ContextOuterClass.Service, context.ContextOuterClass.ServiceId>( this, METHODID_SET_SERVICE, compression))) + .addMethod( + context.ContextServiceGrpc.getUnsetServiceMethod(), + asyncUnaryCall( + new MethodHandlers< + context.ContextOuterClass.Service, + context.ContextOuterClass.ServiceId>( + this, METHODID_UNSET_SERVICE, compression))) .addMethod( context.ContextServiceGrpc.getRemoveServiceMethod(), asyncUnaryCall( @@ -712,6 +739,13 @@ public final class MutinyContextServiceGrpc implements io.quarkus.grpc.runtime.M context.ContextOuterClass.Slice, context.ContextOuterClass.SliceId>( this, METHODID_SET_SLICE, compression))) + .addMethod( + context.ContextServiceGrpc.getUnsetSliceMethod(), + asyncUnaryCall( + new MethodHandlers< + context.ContextOuterClass.Slice, + context.ContextOuterClass.SliceId>( + this, METHODID_UNSET_SLICE, compression))) .addMethod( context.ContextServiceGrpc.getRemoveSliceMethod(), asyncUnaryCall( @@ -800,20 +834,22 @@ public final class MutinyContextServiceGrpc implements io.quarkus.grpc.runtime.M private static final int METHODID_LIST_SERVICES = 25; private static final int METHODID_GET_SERVICE = 26; private static final int METHODID_SET_SERVICE = 27; - private static final int METHODID_REMOVE_SERVICE = 28; - private static final int METHODID_GET_SERVICE_EVENTS = 29; - private static final int METHODID_LIST_SLICE_IDS = 30; - private static final int METHODID_LIST_SLICES = 31; - private static final int METHODID_GET_SLICE = 32; - private static final int METHODID_SET_SLICE = 33; - private static final int METHODID_REMOVE_SLICE = 34; - private static final int METHODID_GET_SLICE_EVENTS = 35; - private static final int METHODID_LIST_CONNECTION_IDS = 36; - private static final int METHODID_LIST_CONNECTIONS = 37; - private static final int METHODID_GET_CONNECTION = 38; - private static final int METHODID_SET_CONNECTION = 39; - private static final int METHODID_REMOVE_CONNECTION = 40; - private static final int METHODID_GET_CONNECTION_EVENTS = 41; + private static final int METHODID_UNSET_SERVICE = 28; + private static final int METHODID_REMOVE_SERVICE = 29; + private static final int METHODID_GET_SERVICE_EVENTS = 30; + private static final int METHODID_LIST_SLICE_IDS = 31; + private static final int METHODID_LIST_SLICES = 32; + private static final int METHODID_GET_SLICE = 33; + private static final int METHODID_SET_SLICE = 34; + private static final int METHODID_UNSET_SLICE = 35; + private static final int METHODID_REMOVE_SLICE = 36; + private static final int METHODID_GET_SLICE_EVENTS = 37; + private static final int METHODID_LIST_CONNECTION_IDS = 38; + private static final int METHODID_LIST_CONNECTIONS = 39; + private static final int METHODID_GET_CONNECTION = 40; + private static final int METHODID_SET_CONNECTION = 41; + private static final int METHODID_REMOVE_CONNECTION = 42; + private static final int METHODID_GET_CONNECTION_EVENTS = 43; private static final class MethodHandlers<Req, Resp> implements io.grpc.stub.ServerCalls.UnaryMethod<Req, Resp>, @@ -1002,6 +1038,12 @@ public final class MutinyContextServiceGrpc implements io.quarkus.grpc.runtime.M compression, serviceImpl::setService); break; + case METHODID_UNSET_SERVICE: + io.quarkus.grpc.runtime.ServerCalls.oneToOne((context.ContextOuterClass.Service) request, + (io.grpc.stub.StreamObserver<context.ContextOuterClass.ServiceId>) responseObserver, + compression, + serviceImpl::unsetService); + break; case METHODID_REMOVE_SERVICE: io.quarkus.grpc.runtime.ServerCalls.oneToOne((context.ContextOuterClass.ServiceId) request, (io.grpc.stub.StreamObserver<context.ContextOuterClass.Empty>) responseObserver, @@ -1038,6 +1080,12 @@ public final class MutinyContextServiceGrpc implements io.quarkus.grpc.runtime.M compression, serviceImpl::setSlice); break; + case METHODID_UNSET_SLICE: + io.quarkus.grpc.runtime.ServerCalls.oneToOne((context.ContextOuterClass.Slice) request, + (io.grpc.stub.StreamObserver<context.ContextOuterClass.SliceId>) responseObserver, + compression, + serviceImpl::unsetSlice); + break; case METHODID_REMOVE_SLICE: io.quarkus.grpc.runtime.ServerCalls.oneToOne((context.ContextOuterClass.SliceId) request, (io.grpc.stub.StreamObserver<context.ContextOuterClass.Empty>) responseObserver, diff --git a/src/automation/target/kubernetes/kubernetes.yml b/src/automation/target/kubernetes/kubernetes.yml index 1fc788787ff527647cb920ffa74b270171ab1b6d..8bc14b935b4e4f4a18ed03f10cca0b74f480dcf0 100644 --- a/src/automation/target/kubernetes/kubernetes.yml +++ b/src/automation/target/kubernetes/kubernetes.yml @@ -3,20 +3,19 @@ apiVersion: v1 kind: Service metadata: annotations: - app.quarkus.io/commit-id: 80cfc0874138153f72a2a673fc4d040be707e899 - app.quarkus.io/build-timestamp: 2022-08-31 - 09:25:37 +0000 + app.quarkus.io/build-timestamp: 2022-09-19 - 10:48:18 +0000 labels: app.kubernetes.io/name: automationservice app: automationservice name: automationservice spec: ports: - - name: http - port: 8080 - targetPort: 8080 - name: grpc port: 5050 targetPort: 5050 + - name: http + port: 8080 + targetPort: 8080 selector: app.kubernetes.io/name: automationservice type: ClusterIP @@ -25,8 +24,7 @@ apiVersion: apps/v1 kind: Deployment metadata: annotations: - app.quarkus.io/commit-id: 80cfc0874138153f72a2a673fc4d040be707e899 - app.quarkus.io/build-timestamp: 2022-08-31 - 09:25:37 +0000 + app.quarkus.io/build-timestamp: 2022-09-19 - 10:48:18 +0000 labels: app: automationservice app.kubernetes.io/name: automationservice @@ -39,8 +37,7 @@ spec: template: metadata: annotations: - app.quarkus.io/commit-id: 80cfc0874138153f72a2a673fc4d040be707e899 - app.quarkus.io/build-timestamp: 2022-08-31 - 09:25:37 +0000 + app.quarkus.io/build-timestamp: 2022-09-19 - 10:48:18 +0000 labels: app: automationservice app.kubernetes.io/name: automationservice @@ -52,9 +49,9 @@ spec: fieldRef: fieldPath: metadata.namespace - name: CONTEXT_SERVICE_HOST - value: ContextService + value: contextservice - name: DEVICE_SERVICE_HOST - value: DeviceService + value: deviceservice image: registry.gitlab.com/teraflow-h2020/controller/automation:0.2.0 imagePullPolicy: Always livenessProbe: @@ -69,12 +66,12 @@ spec: timeoutSeconds: 10 name: automationservice ports: - - containerPort: 8080 - name: http - protocol: TCP - containerPort: 5050 name: grpc protocol: TCP + - containerPort: 8080 + name: http + protocol: TCP readinessProbe: failureThreshold: 3 httpGet: