diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index 8fe5e6c5db2815ff2c5fcbf28b6fedeec3e060c0..2e411116766596d90f77e339f03684449780d9ae 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -32,7 +32,7 @@ include: - local: '/src/opticalattackmitigator/.gitlab-ci.yml' - local: '/src/opticalattackdetector/.gitlab-ci.yml' # - local: '/src/opticalattackmanager/.gitlab-ci.yml' - - local: '/src/automation/.gitlab-ci.yml' + - local: '/src/ztp/.gitlab-ci.yml' - local: '/src/policy/.gitlab-ci.yml' #- local: '/src/webui/.gitlab-ci.yml' #- local: '/src/l3_distributedattackdetector/.gitlab-ci.yml' diff --git a/.gitlab/issue_templates/new-feature-with-design.md b/.gitlab/issue_templates/new-feature-with-design.md index ec08771641bcf5193ea4db45581bc85eb1a0a5b9..03c4804e64a2c14ca494947f9a30f920e5c2e5c8 100644 --- a/.gitlab/issue_templates/new-feature-with-design.md +++ b/.gitlab/issue_templates/new-feature-with-design.md @@ -40,7 +40,7 @@ components deployed. ## Impacted Components -List of impacted components: Context, Device, Service, PathComp, Slice, Monitoring, Automation, Policy, Compute, etc. +List of impacted components: Context, Device, Service, PathComp, Slice, Monitoring, ZTP, Policy, Compute, etc. Just an enumeration, elaboration of impacts is done below. ## Component1 Impact diff --git a/deploy/all.sh b/deploy/all.sh index 9584dd32d121b7f63e7c7f177bf7bee8c287b4c9..bc09083ca110ff3093cb35bd57af1f3411c46a13 100755 --- a/deploy/all.sh +++ b/deploy/all.sh @@ -27,7 +27,7 @@ export TFS_REGISTRY_IMAGES=${TFS_REGISTRY_IMAGES:-"http://localhost:32000/tfs/"} # If not already set, set the list of components, separated by spaces, you want to build images for, and deploy. # By default, only basic components are deployed -export TFS_COMPONENTS=${TFS_COMPONENTS:-"context device automation monitoring pathcomp service slice compute webui load_generator"} +export TFS_COMPONENTS=${TFS_COMPONENTS:-"context device ztp monitoring pathcomp service slice compute webui load_generator"} # If not already set, set the tag you want to use for your images. export TFS_IMAGE_TAG=${TFS_IMAGE_TAG:-"dev"} diff --git a/deploy/component.sh b/deploy/component.sh index 922aa5e0ec77a2c6acd73db1195a9ec3d2b160fb..e2648818684f672c41cca19a7ac1281b797f4382 100755 --- a/deploy/component.sh +++ b/deploy/component.sh @@ -59,7 +59,7 @@ for COMPONENT in $TFS_COMPONENTS; do echo " Building Docker image..." BUILD_LOG="$TMP_LOGS_FOLDER/build_${COMPONENT}.log" - if [ "$COMPONENT" == "automation" ] || [ "$COMPONENT" == "policy" ]; then + if [ "$COMPONENT" == "ztp" ] || [ "$COMPONENT" == "policy" ]; then docker build -t "$IMAGE_NAME" -f ./src/"$COMPONENT"/Dockerfile ./src/"$COMPONENT"/ > "$BUILD_LOG" elif [ "$COMPONENT" == "pathcomp" ]; then BUILD_LOG="$TMP_LOGS_FOLDER/build_${COMPONENT}-frontend.log" diff --git a/deploy/tfs.sh b/deploy/tfs.sh index 1ffc0cb9883c50b1029980ceb9e491627434de68..e9045ec888d5c4f05576d001c8068624b4b6cf52 100755 --- a/deploy/tfs.sh +++ b/deploy/tfs.sh @@ -27,7 +27,7 @@ export TFS_REGISTRY_IMAGES=${TFS_REGISTRY_IMAGES:-"http://localhost:32000/tfs/"} # If not already set, set the list of components, separated by spaces, you want to build images for, and deploy. # By default, only basic components are deployed -export TFS_COMPONENTS=${TFS_COMPONENTS:-"context device automation monitoring pathcomp service slice compute webui load_generator"} +export TFS_COMPONENTS=${TFS_COMPONENTS:-"context device ztp monitoring pathcomp service slice compute webui load_generator"} # If not already set, set the tag you want to use for your images. export TFS_IMAGE_TAG=${TFS_IMAGE_TAG:-"dev"} @@ -207,7 +207,7 @@ for COMPONENT in $TFS_COMPONENTS; do echo " Building Docker image..." BUILD_LOG="$TMP_LOGS_FOLDER/build_${COMPONENT}.log" - if [ "$COMPONENT" == "automation" ] || [ "$COMPONENT" == "policy" ]; then + if [ "$COMPONENT" == "ztp" ] || [ "$COMPONENT" == "policy" ]; then $DOCKER_BUILD -t "$COMPONENT:$TFS_IMAGE_TAG" -f ./src/"$COMPONENT"/Dockerfile ./src/"$COMPONENT"/ > "$BUILD_LOG" elif [ "$COMPONENT" == "pathcomp" ]; then BUILD_LOG="$TMP_LOGS_FOLDER/build_${COMPONENT}-frontend.log" diff --git a/expose_ingress_grpc.sh b/expose_ingress_grpc.sh index 2bc0fd64b60cafdfad92b3d8d031cd28d7d6a873..0f073d54a08b569beeb73beca529fe1a4efc6c53 100755 --- a/expose_ingress_grpc.sh +++ b/expose_ingress_grpc.sh @@ -21,7 +21,7 @@ export TFS_K8S_NAMESPACE=${TFS_K8S_NAMESPACE:-"tfs"} # If not already set, set the list of components you want to build images for, and deploy. -export TFS_COMPONENTS=${TFS_COMPONENTS:-"context device automation policy service compute monitoring dbscanserving opticalattackmitigator opticalcentralizedattackdetector l3_attackmitigator l3_centralizedattackdetector webui"} +export TFS_COMPONENTS=${TFS_COMPONENTS:-"context device ztp policy service compute monitoring dbscanserving opticalattackmitigator opticalcentralizedattackdetector l3_attackmitigator l3_centralizedattackdetector webui"} ######################################################################################################################## # Automated steps start here diff --git a/hackfest/p4/deploy_specs.sh b/hackfest/p4/deploy_specs.sh index b988123d5564684bd1bfcb776bab7f187fc628ca..6bd8d07c839ce235cc3cba8fcd29be93214a730f 100755 --- a/hackfest/p4/deploy_specs.sh +++ b/hackfest/p4/deploy_specs.sh @@ -16,7 +16,7 @@ export TFS_REGISTRY_IMAGE="http://localhost:32000/tfs/" # Set the list of components, separated by spaces, you want to build images for, and deploy. -export TFS_COMPONENTS="context device automation service compute monitoring webui" +export TFS_COMPONENTS="context device ztp service compute monitoring webui" # Set the tag you want to use for your images. export TFS_IMAGE_TAG="dev" diff --git a/install_requirements.sh b/install_requirements.sh index 213edef5af3f6efc75b060f12972926aee2e5c5c..79ec929cf43815092c4a1643e008954a8e7c9c4d 100755 --- a/install_requirements.sh +++ b/install_requirements.sh @@ -16,7 +16,7 @@ # If not already set, set the list of components you want to install dependencies for. # By default, dependencies for all components are installed. # Components still not supported by this script: -# automation & policy : implemented in Java +# ztp & policy : implemented in Java # dlt : under design # pathcomp : under design ALL_COMPONENTS="context device service compute monitoring webui interdomain slice" @@ -38,7 +38,7 @@ printf "\n" echo "Collecting requirements from components..." for COMPONENT in $TFS_COMPONENTS do - if [ "$COMPONENT" == "automation" ] || [ "$COMPONENT" == "policy" ]; then continue; fi + if [ "$COMPONENT" == "ztp" ] || [ "$COMPONENT" == "policy" ]; then continue; fi diff requirements.in src/$COMPONENT/requirements.in | grep '^>' | sed 's/^>\ //' >> requirements.in done printf "\n" diff --git a/manifests/servicemonitors.yaml b/manifests/servicemonitors.yaml index e77216af2a723cef8a4c5f468ef564625ea810f1..28dede7ab701ebdcff6d1d5c1ccbcab213ff87dd 100644 --- a/manifests/servicemonitors.yaml +++ b/manifests/servicemonitors.yaml @@ -277,9 +277,9 @@ apiVersion: monitoring.coreos.com/v1 kind: ServiceMonitor metadata: namespace: monitoring # namespace where prometheus is running - name: tfs-automationservice-metric + name: tfs-ztpservice-metric labels: - app: automationservice + app: ztpservice #release: prometheus #release: prom # name of the release # ( VERY IMPORTANT: You need to know the correct release name by viewing @@ -290,7 +290,7 @@ spec: matchLabels: # Target app service #namespace: tfs - app: automationservice # same as above + app: ztpservice # same as above #release: prometheus # same as above endpoints: - port: metrics # named port in target app @@ -474,4 +474,4 @@ spec: namespaceSelector: any: false matchNames: - - tfs # namespace where the app is running \ No newline at end of file + - tfs # namespace where the app is running diff --git a/manifests/automationservice.yaml b/manifests/ztpservice.yaml similarity index 84% rename from manifests/automationservice.yaml rename to manifests/ztpservice.yaml index f4a4def176cd2b9f89d7ee4f10c0af48a08b9733..e2be80cea7b1e779fdc9bb05110ddc0d6b144101 100644 --- a/manifests/automationservice.yaml +++ b/manifests/ztpservice.yaml @@ -19,9 +19,9 @@ metadata: annotations: app.quarkus.io/build-timestamp: 2022-09-19 - 10:48:18 +0000 labels: - app.kubernetes.io/name: automationservice - app: automationservice - name: automationservice + app.kubernetes.io/name: ztpservice + app: ztpservice + name: ztpservice spec: ports: - name: grpc @@ -32,7 +32,7 @@ spec: port: 9192 targetPort: 8080 selector: - app.kubernetes.io/name: automationservice + app.kubernetes.io/name: ztpservice type: ClusterIP --- apiVersion: apps/v1 @@ -41,21 +41,21 @@ metadata: annotations: app.quarkus.io/build-timestamp: 2022-09-19 - 10:48:18 +0000 labels: - app: automationservice - app.kubernetes.io/name: automationservice - name: automationservice + app: ztpservice + app.kubernetes.io/name: ztpservice + name: ztpservice spec: replicas: 1 selector: matchLabels: - app.kubernetes.io/name: automationservice + app.kubernetes.io/name: ztpservice template: metadata: annotations: app.quarkus.io/build-timestamp: 2022-09-19 - 10:48:18 +0000 labels: - app: automationservice - app.kubernetes.io/name: automationservice + app: ztpservice + app.kubernetes.io/name: ztpservice spec: containers: - env: @@ -67,7 +67,7 @@ spec: value: contextservice - name: DEVICE_SERVICE_HOST value: deviceservice - image: labs.etsi.org:5050/tfs/controller/automation:0.2.0 + image: labs.etsi.org:5050/tfs/controller/ztp:0.2.0 imagePullPolicy: Always livenessProbe: failureThreshold: 3 @@ -79,7 +79,7 @@ spec: periodSeconds: 10 successThreshold: 1 timeoutSeconds: 10 - name: automationservice + name: ztpservice ports: - containerPort: 5050 name: grpc @@ -108,12 +108,12 @@ spec: apiVersion: autoscaling/v2 kind: HorizontalPodAutoscaler metadata: - name: automationservice-hpa + name: ztpservice-hpa spec: scaleTargetRef: apiVersion: apps/v1 kind: Deployment - name: automationservice + name: ztpservice minReplicas: 1 maxReplicas: 10 metrics: diff --git a/my_deploy.sh b/my_deploy.sh index 888fc98903eb665729d7e0843cf9e9fc8b60741d..99e5d40597f458db8546d28b2ef14f0b0d3358e4 100755 --- a/my_deploy.sh +++ b/my_deploy.sh @@ -25,8 +25,11 @@ export TFS_COMPONENTS="context device pathcomp service slice compute webui load_ # Uncomment to activate Monitoring #export TFS_COMPONENTS="${TFS_COMPONENTS} monitoring" -# Uncomment to activate Automation and Policy Manager -#export TFS_COMPONENTS="${TFS_COMPONENTS} automation policy" +# Uncomment to activate ZTP +#export TFS_COMPONENTS="${TFS_COMPONENTS} ztp" + +# Uncomment to activate Policy Manager +#export TFS_COMPONENTS="${TFS_COMPONENTS} policy" # Uncomment to activate Optical CyberSecurity #export TFS_COMPONENTS="${TFS_COMPONENTS} dbscanserving opticalattackmitigator opticalattackdetector opticalattackmanager" diff --git a/proto/automation.proto b/proto/ztp.proto similarity index 97% rename from proto/automation.proto rename to proto/ztp.proto index e2dbe33223566c4065ecb0086fbd8231a56834d4..5c895900d8c8b379fc6e58a16bbf4dad3918276b 100644 --- a/proto/automation.proto +++ b/proto/ztp.proto @@ -13,11 +13,11 @@ // limitations under the License. syntax = "proto3"; -package automation; +package ztp; import "context.proto"; -service AutomationService { +service ZtpService { rpc ZtpGetDeviceRole(DeviceRoleId) returns (DeviceRole) {} rpc ZtpGetDeviceRolesByDeviceId(context.DeviceId) returns (DeviceRoleList) {} rpc ZtpAdd(DeviceRole) returns (DeviceRoleState) {} diff --git a/run_tests_docker.sh b/run_tests_docker.sh index d27c4e7d8a36f89b3b0b72e9c5725c80b520141f..ae8dc9162e32d16472ba4be1de96b46bdd20db9b 100755 --- a/run_tests_docker.sh +++ b/run_tests_docker.sh @@ -24,7 +24,7 @@ REGISTRY_IMAGE="" #REGISTRY_IMAGE="http://my-container-registry.local/" # Set the list of components you want to build images for, and deploy. -COMPONENTS="context device automation policy service compute monitoring centralizedattackdetector" +COMPONENTS="context device ztp policy service compute monitoring centralizedattackdetector" # Set the tag you want to use for your images. IMAGE_TAG="tf-dev" @@ -43,7 +43,7 @@ for COMPONENT in $COMPONENTS; do echo " Building Docker image..." BUILD_LOG="$TMP_LOGS_FOLDER/build_${COMPONENT}.log" - if [ "$COMPONENT" == "automation" ] || [ "$COMPONENT" == "policy" ]; then + if [ "$COMPONENT" == "ztp" ] || [ "$COMPONENT" == "policy" ]; then docker build -t "$IMAGE_NAME" -f ./src/"$COMPONENT"/Dockerfile ./src/"$COMPONENT"/ > "$BUILD_LOG" else docker build -t "$IMAGE_NAME" -f ./src/"$COMPONENT"/Dockerfile ./src/ > "$BUILD_LOG" diff --git a/scripts/old/deploy_in_kubernetes.sh b/scripts/old/deploy_in_kubernetes.sh index c13a236664bde370a323f1663095afd72f72aaec..df4a550eaa57791a3daa4e0784dbdbaaa821106e 100755 --- a/scripts/old/deploy_in_kubernetes.sh +++ b/scripts/old/deploy_in_kubernetes.sh @@ -24,7 +24,7 @@ export REGISTRY_IMAGE=${REGISTRY_IMAGE:-""} #export REGISTRY_IMAGE="http://my-container-registry.local/" # If not already set, set the list of components you want to build images for, and deploy. -export COMPONENTS=${COMPONENTS:-"context device automation policy service compute monitoring dbscanserving opticalattackmitigator opticalcentralizedattackdetector webui"} +export COMPONENTS=${COMPONENTS:-"context device ztp policy service compute monitoring dbscanserving opticalattackmitigator opticalcentralizedattackdetector webui"} # If not already set, set the tag you want to use for your images. export IMAGE_TAG=${IMAGE_TAG:-"tf-dev"} @@ -78,7 +78,7 @@ for COMPONENT in $COMPONENTS; do echo " Building Docker image..." BUILD_LOG="$TMP_LOGS_FOLDER/build_${COMPONENT}.log" - if [ "$COMPONENT" == "automation" ] || [ "$COMPONENT" == "policy" ]; then + if [ "$COMPONENT" == "ztp" ] || [ "$COMPONENT" == "policy" ]; then docker build -t "$IMAGE_NAME" -f ./src/"$COMPONENT"/Dockerfile ./src/"$COMPONENT"/ > "$BUILD_LOG" else docker build -t "$IMAGE_NAME" -f ./src/"$COMPONENT"/Dockerfile . > "$BUILD_LOG" diff --git a/scripts/show_logs_automation.sh b/scripts/show_logs_automation.sh index 46c0dbba9752b207b11136535403f0c009d0a377..5ee561f532a7e424326f38501906f78327c05559 100755 --- a/scripts/show_logs_automation.sh +++ b/scripts/show_logs_automation.sh @@ -24,4 +24,4 @@ export TFS_K8S_NAMESPACE=${TFS_K8S_NAMESPACE:-"tfs"} # Automated steps start here ######################################################################################################################## -kubectl --namespace $TFS_K8S_NAMESPACE logs deployment/automationservice +kubectl --namespace $TFS_K8S_NAMESPACE logs deployment/ztpservice diff --git a/scripts/update_license_headers.py b/scripts/update_license_headers.py index f721425f89b84fe76783cd2f26b923c0c9005e5a..45baf39e07ea1ea3dde800c2cefd1641620bb4aa 100644 --- a/scripts/update_license_headers.py +++ b/scripts/update_license_headers.py @@ -55,8 +55,8 @@ def skip_file(file_path : str) -> bool: if '/.mvn/' in file_path: return True if '/hackfest/kafka/kafka_2.13-2.8.0' in file_path: return True if '/src/device/service/drivers/openconfig/templates/' in file_path: return True - if '/automation/target/generated-sources/grpc/' in file_path: return True - if '/automation/target/kubernetes/' in file_path: return True + if '/ztp/target/generated-sources/grpc/' in file_path: return True + if '/ztp/target/kubernetes/' in file_path: return True if '/policy/target/generated-sources/grpc/' in file_path: return True if '/policy/target/kubernetes/' in file_path: return True if '/src/dlt/gateway/' in file_path: return True diff --git a/src/automation/src/main/proto/automation.proto b/src/automation/src/main/proto/automation.proto deleted file mode 120000 index afef7a8e47ec5688ec46498c2197bc345e6c5e92..0000000000000000000000000000000000000000 --- a/src/automation/src/main/proto/automation.proto +++ /dev/null @@ -1 +0,0 @@ -../../../../../proto/automation.proto \ No newline at end of file diff --git a/src/automation/src/main/resources/teraflow-automation-banner.txt b/src/automation/src/main/resources/teraflow-automation-banner.txt deleted file mode 100644 index 3792524170f5b74de9add7340ab32940d7f65a64..0000000000000000000000000000000000000000 --- a/src/automation/src/main/resources/teraflow-automation-banner.txt +++ /dev/null @@ -1,9 +0,0 @@ - - _______ ______ _ _ _ _ - |__ __| | ____| | /\ | | | | (_) - | | ___ _ __ __ _| |__ | | _____ __ / \ _ _| |_ ___ _ __ ___ __ _| |_ _ ___ _ __ - | |/ _ \ '__/ _` | __| | |/ _ \ \ /\ / / / /\ \| | | | __/ _ \| '_ ` _ \ / _` | __| |/ _ \| '_ \ - | | __/ | | (_| | | | | (_) \ V V / / ____ \ |_| | || (_) | | | | | | (_| | |_| | (_) | | | | - |_|\___|_| \__,_|_| |_|\___/ \_/\_/ /_/ \_\__,_|\__\___/|_| |_| |_|\__,_|\__|_|\___/|_| |_| - - diff --git a/src/automation/target/generated-sources/grpc/automation/AutomationService.java b/src/automation/target/generated-sources/grpc/automation/AutomationService.java deleted file mode 100644 index 8ef5784815a7b8bb6d51b05f89f6ca3a4b23f2e5..0000000000000000000000000000000000000000 --- a/src/automation/target/generated-sources/grpc/automation/AutomationService.java +++ /dev/null @@ -1,26 +0,0 @@ -package automation; - -import io.quarkus.grpc.runtime.MutinyService; - -@javax.annotation.Generated( -value = "by Mutiny Grpc generator", -comments = "Source: automation.proto") -public interface AutomationService extends MutinyService { - - - io.smallrye.mutiny.Uni ztpGetDeviceRole(automation.Automation.DeviceRoleId request); - - io.smallrye.mutiny.Uni ztpGetDeviceRolesByDeviceId(context.ContextOuterClass.DeviceId request); - - io.smallrye.mutiny.Uni ztpAdd(automation.Automation.DeviceRole request); - - io.smallrye.mutiny.Uni ztpUpdate(automation.Automation.DeviceRoleConfig request); - - io.smallrye.mutiny.Uni ztpDelete(automation.Automation.DeviceRole request); - - io.smallrye.mutiny.Uni ztpDeleteAll(context.ContextOuterClass.Empty request); - - - - -} \ No newline at end of file diff --git a/src/automation/target/generated-sources/grpc/automation/AutomationServiceClient.java b/src/automation/target/generated-sources/grpc/automation/AutomationServiceClient.java deleted file mode 100644 index 13d13c431b63baebd22ed7fd566b6b25395977e3..0000000000000000000000000000000000000000 --- a/src/automation/target/generated-sources/grpc/automation/AutomationServiceClient.java +++ /dev/null @@ -1,48 +0,0 @@ -package automation; - -import java.util.function.BiFunction; - -import io.quarkus.grpc.runtime.MutinyClient; - -@javax.annotation.Generated( -value = "by Mutiny Grpc generator", -comments = "Source: automation.proto") -public class AutomationServiceClient implements AutomationService, MutinyClient { - - private final MutinyAutomationServiceGrpc.MutinyAutomationServiceStub stub; - - public AutomationServiceClient(String name, io.grpc.Channel channel, BiFunction stubConfigurator) { - this.stub = stubConfigurator.apply(name,MutinyAutomationServiceGrpc.newMutinyStub(channel)); - } - - @Override - public MutinyAutomationServiceGrpc.MutinyAutomationServiceStub getStub() { - return stub; - } - - @Override - public io.smallrye.mutiny.Uni ztpGetDeviceRole(automation.Automation.DeviceRoleId request) { - return stub.ztpGetDeviceRole(request); - } - @Override - public io.smallrye.mutiny.Uni ztpGetDeviceRolesByDeviceId(context.ContextOuterClass.DeviceId request) { - return stub.ztpGetDeviceRolesByDeviceId(request); - } - @Override - public io.smallrye.mutiny.Uni ztpAdd(automation.Automation.DeviceRole request) { - return stub.ztpAdd(request); - } - @Override - public io.smallrye.mutiny.Uni ztpUpdate(automation.Automation.DeviceRoleConfig request) { - return stub.ztpUpdate(request); - } - @Override - public io.smallrye.mutiny.Uni ztpDelete(automation.Automation.DeviceRole request) { - return stub.ztpDelete(request); - } - @Override - public io.smallrye.mutiny.Uni ztpDeleteAll(context.ContextOuterClass.Empty request) { - return stub.ztpDeleteAll(request); - } - -} \ No newline at end of file diff --git a/src/automation/target/generated-sources/grpc/automation/AutomationServiceGrpc.java b/src/automation/target/generated-sources/grpc/automation/AutomationServiceGrpc.java deleted file mode 100644 index 841994ea713bb9d1c0223689386d6cae35c6d014..0000000000000000000000000000000000000000 --- a/src/automation/target/generated-sources/grpc/automation/AutomationServiceGrpc.java +++ /dev/null @@ -1,645 +0,0 @@ -package automation; - -import static io.grpc.MethodDescriptor.generateFullMethodName; - -/** - */ -@javax.annotation.Generated( - value = "by gRPC proto compiler (version 1.38.1)", - comments = "Source: automation.proto") -public final class AutomationServiceGrpc { - - private AutomationServiceGrpc() {} - - public static final String SERVICE_NAME = "automation.AutomationService"; - - // Static method descriptors that strictly reflect the proto. - private static volatile io.grpc.MethodDescriptor getZtpGetDeviceRoleMethod; - - @io.grpc.stub.annotations.RpcMethod( - fullMethodName = SERVICE_NAME + '/' + "ZtpGetDeviceRole", - requestType = automation.Automation.DeviceRoleId.class, - responseType = automation.Automation.DeviceRole.class, - methodType = io.grpc.MethodDescriptor.MethodType.UNARY) - public static io.grpc.MethodDescriptor getZtpGetDeviceRoleMethod() { - io.grpc.MethodDescriptor getZtpGetDeviceRoleMethod; - if ((getZtpGetDeviceRoleMethod = AutomationServiceGrpc.getZtpGetDeviceRoleMethod) == null) { - synchronized (AutomationServiceGrpc.class) { - if ((getZtpGetDeviceRoleMethod = AutomationServiceGrpc.getZtpGetDeviceRoleMethod) == null) { - AutomationServiceGrpc.getZtpGetDeviceRoleMethod = getZtpGetDeviceRoleMethod = - io.grpc.MethodDescriptor.newBuilder() - .setType(io.grpc.MethodDescriptor.MethodType.UNARY) - .setFullMethodName(generateFullMethodName(SERVICE_NAME, "ZtpGetDeviceRole")) - .setSampledToLocalTracing(true) - .setRequestMarshaller(io.grpc.protobuf.ProtoUtils.marshaller( - automation.Automation.DeviceRoleId.getDefaultInstance())) - .setResponseMarshaller(io.grpc.protobuf.ProtoUtils.marshaller( - automation.Automation.DeviceRole.getDefaultInstance())) - .setSchemaDescriptor(new AutomationServiceMethodDescriptorSupplier("ZtpGetDeviceRole")) - .build(); - } - } - } - return getZtpGetDeviceRoleMethod; - } - - private static volatile io.grpc.MethodDescriptor getZtpGetDeviceRolesByDeviceIdMethod; - - @io.grpc.stub.annotations.RpcMethod( - fullMethodName = SERVICE_NAME + '/' + "ZtpGetDeviceRolesByDeviceId", - requestType = context.ContextOuterClass.DeviceId.class, - responseType = automation.Automation.DeviceRoleList.class, - methodType = io.grpc.MethodDescriptor.MethodType.UNARY) - public static io.grpc.MethodDescriptor getZtpGetDeviceRolesByDeviceIdMethod() { - io.grpc.MethodDescriptor getZtpGetDeviceRolesByDeviceIdMethod; - if ((getZtpGetDeviceRolesByDeviceIdMethod = AutomationServiceGrpc.getZtpGetDeviceRolesByDeviceIdMethod) == null) { - synchronized (AutomationServiceGrpc.class) { - if ((getZtpGetDeviceRolesByDeviceIdMethod = AutomationServiceGrpc.getZtpGetDeviceRolesByDeviceIdMethod) == null) { - AutomationServiceGrpc.getZtpGetDeviceRolesByDeviceIdMethod = getZtpGetDeviceRolesByDeviceIdMethod = - io.grpc.MethodDescriptor.newBuilder() - .setType(io.grpc.MethodDescriptor.MethodType.UNARY) - .setFullMethodName(generateFullMethodName(SERVICE_NAME, "ZtpGetDeviceRolesByDeviceId")) - .setSampledToLocalTracing(true) - .setRequestMarshaller(io.grpc.protobuf.ProtoUtils.marshaller( - context.ContextOuterClass.DeviceId.getDefaultInstance())) - .setResponseMarshaller(io.grpc.protobuf.ProtoUtils.marshaller( - automation.Automation.DeviceRoleList.getDefaultInstance())) - .setSchemaDescriptor(new AutomationServiceMethodDescriptorSupplier("ZtpGetDeviceRolesByDeviceId")) - .build(); - } - } - } - return getZtpGetDeviceRolesByDeviceIdMethod; - } - - private static volatile io.grpc.MethodDescriptor getZtpAddMethod; - - @io.grpc.stub.annotations.RpcMethod( - fullMethodName = SERVICE_NAME + '/' + "ZtpAdd", - requestType = automation.Automation.DeviceRole.class, - responseType = automation.Automation.DeviceRoleState.class, - methodType = io.grpc.MethodDescriptor.MethodType.UNARY) - public static io.grpc.MethodDescriptor getZtpAddMethod() { - io.grpc.MethodDescriptor getZtpAddMethod; - if ((getZtpAddMethod = AutomationServiceGrpc.getZtpAddMethod) == null) { - synchronized (AutomationServiceGrpc.class) { - if ((getZtpAddMethod = AutomationServiceGrpc.getZtpAddMethod) == null) { - AutomationServiceGrpc.getZtpAddMethod = getZtpAddMethod = - io.grpc.MethodDescriptor.newBuilder() - .setType(io.grpc.MethodDescriptor.MethodType.UNARY) - .setFullMethodName(generateFullMethodName(SERVICE_NAME, "ZtpAdd")) - .setSampledToLocalTracing(true) - .setRequestMarshaller(io.grpc.protobuf.ProtoUtils.marshaller( - automation.Automation.DeviceRole.getDefaultInstance())) - .setResponseMarshaller(io.grpc.protobuf.ProtoUtils.marshaller( - automation.Automation.DeviceRoleState.getDefaultInstance())) - .setSchemaDescriptor(new AutomationServiceMethodDescriptorSupplier("ZtpAdd")) - .build(); - } - } - } - return getZtpAddMethod; - } - - private static volatile io.grpc.MethodDescriptor getZtpUpdateMethod; - - @io.grpc.stub.annotations.RpcMethod( - fullMethodName = SERVICE_NAME + '/' + "ZtpUpdate", - requestType = automation.Automation.DeviceRoleConfig.class, - responseType = automation.Automation.DeviceRoleState.class, - methodType = io.grpc.MethodDescriptor.MethodType.UNARY) - public static io.grpc.MethodDescriptor getZtpUpdateMethod() { - io.grpc.MethodDescriptor getZtpUpdateMethod; - if ((getZtpUpdateMethod = AutomationServiceGrpc.getZtpUpdateMethod) == null) { - synchronized (AutomationServiceGrpc.class) { - if ((getZtpUpdateMethod = AutomationServiceGrpc.getZtpUpdateMethod) == null) { - AutomationServiceGrpc.getZtpUpdateMethod = getZtpUpdateMethod = - io.grpc.MethodDescriptor.newBuilder() - .setType(io.grpc.MethodDescriptor.MethodType.UNARY) - .setFullMethodName(generateFullMethodName(SERVICE_NAME, "ZtpUpdate")) - .setSampledToLocalTracing(true) - .setRequestMarshaller(io.grpc.protobuf.ProtoUtils.marshaller( - automation.Automation.DeviceRoleConfig.getDefaultInstance())) - .setResponseMarshaller(io.grpc.protobuf.ProtoUtils.marshaller( - automation.Automation.DeviceRoleState.getDefaultInstance())) - .setSchemaDescriptor(new AutomationServiceMethodDescriptorSupplier("ZtpUpdate")) - .build(); - } - } - } - return getZtpUpdateMethod; - } - - private static volatile io.grpc.MethodDescriptor getZtpDeleteMethod; - - @io.grpc.stub.annotations.RpcMethod( - fullMethodName = SERVICE_NAME + '/' + "ZtpDelete", - requestType = automation.Automation.DeviceRole.class, - responseType = automation.Automation.DeviceRoleState.class, - methodType = io.grpc.MethodDescriptor.MethodType.UNARY) - public static io.grpc.MethodDescriptor getZtpDeleteMethod() { - io.grpc.MethodDescriptor getZtpDeleteMethod; - if ((getZtpDeleteMethod = AutomationServiceGrpc.getZtpDeleteMethod) == null) { - synchronized (AutomationServiceGrpc.class) { - if ((getZtpDeleteMethod = AutomationServiceGrpc.getZtpDeleteMethod) == null) { - AutomationServiceGrpc.getZtpDeleteMethod = getZtpDeleteMethod = - io.grpc.MethodDescriptor.newBuilder() - .setType(io.grpc.MethodDescriptor.MethodType.UNARY) - .setFullMethodName(generateFullMethodName(SERVICE_NAME, "ZtpDelete")) - .setSampledToLocalTracing(true) - .setRequestMarshaller(io.grpc.protobuf.ProtoUtils.marshaller( - automation.Automation.DeviceRole.getDefaultInstance())) - .setResponseMarshaller(io.grpc.protobuf.ProtoUtils.marshaller( - automation.Automation.DeviceRoleState.getDefaultInstance())) - .setSchemaDescriptor(new AutomationServiceMethodDescriptorSupplier("ZtpDelete")) - .build(); - } - } - } - return getZtpDeleteMethod; - } - - private static volatile io.grpc.MethodDescriptor getZtpDeleteAllMethod; - - @io.grpc.stub.annotations.RpcMethod( - fullMethodName = SERVICE_NAME + '/' + "ZtpDeleteAll", - requestType = context.ContextOuterClass.Empty.class, - responseType = automation.Automation.DeviceDeletionResult.class, - methodType = io.grpc.MethodDescriptor.MethodType.UNARY) - public static io.grpc.MethodDescriptor getZtpDeleteAllMethod() { - io.grpc.MethodDescriptor getZtpDeleteAllMethod; - if ((getZtpDeleteAllMethod = AutomationServiceGrpc.getZtpDeleteAllMethod) == null) { - synchronized (AutomationServiceGrpc.class) { - if ((getZtpDeleteAllMethod = AutomationServiceGrpc.getZtpDeleteAllMethod) == null) { - AutomationServiceGrpc.getZtpDeleteAllMethod = getZtpDeleteAllMethod = - io.grpc.MethodDescriptor.newBuilder() - .setType(io.grpc.MethodDescriptor.MethodType.UNARY) - .setFullMethodName(generateFullMethodName(SERVICE_NAME, "ZtpDeleteAll")) - .setSampledToLocalTracing(true) - .setRequestMarshaller(io.grpc.protobuf.ProtoUtils.marshaller( - context.ContextOuterClass.Empty.getDefaultInstance())) - .setResponseMarshaller(io.grpc.protobuf.ProtoUtils.marshaller( - automation.Automation.DeviceDeletionResult.getDefaultInstance())) - .setSchemaDescriptor(new AutomationServiceMethodDescriptorSupplier("ZtpDeleteAll")) - .build(); - } - } - } - return getZtpDeleteAllMethod; - } - - /** - * Creates a new async stub that supports all call types for the service - */ - public static AutomationServiceStub newStub(io.grpc.Channel channel) { - io.grpc.stub.AbstractStub.StubFactory factory = - new io.grpc.stub.AbstractStub.StubFactory() { - @java.lang.Override - public AutomationServiceStub newStub(io.grpc.Channel channel, io.grpc.CallOptions callOptions) { - return new AutomationServiceStub(channel, callOptions); - } - }; - return AutomationServiceStub.newStub(factory, channel); - } - - /** - * Creates a new blocking-style stub that supports unary and streaming output calls on the service - */ - public static AutomationServiceBlockingStub newBlockingStub( - io.grpc.Channel channel) { - io.grpc.stub.AbstractStub.StubFactory factory = - new io.grpc.stub.AbstractStub.StubFactory() { - @java.lang.Override - public AutomationServiceBlockingStub newStub(io.grpc.Channel channel, io.grpc.CallOptions callOptions) { - return new AutomationServiceBlockingStub(channel, callOptions); - } - }; - return AutomationServiceBlockingStub.newStub(factory, channel); - } - - /** - * Creates a new ListenableFuture-style stub that supports unary calls on the service - */ - public static AutomationServiceFutureStub newFutureStub( - io.grpc.Channel channel) { - io.grpc.stub.AbstractStub.StubFactory factory = - new io.grpc.stub.AbstractStub.StubFactory() { - @java.lang.Override - public AutomationServiceFutureStub newStub(io.grpc.Channel channel, io.grpc.CallOptions callOptions) { - return new AutomationServiceFutureStub(channel, callOptions); - } - }; - return AutomationServiceFutureStub.newStub(factory, channel); - } - - /** - */ - public static abstract class AutomationServiceImplBase implements io.grpc.BindableService { - - /** - */ - public void ztpGetDeviceRole(automation.Automation.DeviceRoleId request, - io.grpc.stub.StreamObserver responseObserver) { - io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall(getZtpGetDeviceRoleMethod(), responseObserver); - } - - /** - */ - public void ztpGetDeviceRolesByDeviceId(context.ContextOuterClass.DeviceId request, - io.grpc.stub.StreamObserver responseObserver) { - io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall(getZtpGetDeviceRolesByDeviceIdMethod(), responseObserver); - } - - /** - */ - public void ztpAdd(automation.Automation.DeviceRole request, - io.grpc.stub.StreamObserver responseObserver) { - io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall(getZtpAddMethod(), responseObserver); - } - - /** - */ - public void ztpUpdate(automation.Automation.DeviceRoleConfig request, - io.grpc.stub.StreamObserver responseObserver) { - io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall(getZtpUpdateMethod(), responseObserver); - } - - /** - */ - public void ztpDelete(automation.Automation.DeviceRole request, - io.grpc.stub.StreamObserver responseObserver) { - io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall(getZtpDeleteMethod(), responseObserver); - } - - /** - */ - public void ztpDeleteAll(context.ContextOuterClass.Empty request, - io.grpc.stub.StreamObserver responseObserver) { - io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall(getZtpDeleteAllMethod(), responseObserver); - } - - @java.lang.Override public final io.grpc.ServerServiceDefinition bindService() { - return io.grpc.ServerServiceDefinition.builder(getServiceDescriptor()) - .addMethod( - getZtpGetDeviceRoleMethod(), - io.grpc.stub.ServerCalls.asyncUnaryCall( - new MethodHandlers< - automation.Automation.DeviceRoleId, - automation.Automation.DeviceRole>( - this, METHODID_ZTP_GET_DEVICE_ROLE))) - .addMethod( - getZtpGetDeviceRolesByDeviceIdMethod(), - io.grpc.stub.ServerCalls.asyncUnaryCall( - new MethodHandlers< - context.ContextOuterClass.DeviceId, - automation.Automation.DeviceRoleList>( - this, METHODID_ZTP_GET_DEVICE_ROLES_BY_DEVICE_ID))) - .addMethod( - getZtpAddMethod(), - io.grpc.stub.ServerCalls.asyncUnaryCall( - new MethodHandlers< - automation.Automation.DeviceRole, - automation.Automation.DeviceRoleState>( - this, METHODID_ZTP_ADD))) - .addMethod( - getZtpUpdateMethod(), - io.grpc.stub.ServerCalls.asyncUnaryCall( - new MethodHandlers< - automation.Automation.DeviceRoleConfig, - automation.Automation.DeviceRoleState>( - this, METHODID_ZTP_UPDATE))) - .addMethod( - getZtpDeleteMethod(), - io.grpc.stub.ServerCalls.asyncUnaryCall( - new MethodHandlers< - automation.Automation.DeviceRole, - automation.Automation.DeviceRoleState>( - this, METHODID_ZTP_DELETE))) - .addMethod( - getZtpDeleteAllMethod(), - io.grpc.stub.ServerCalls.asyncUnaryCall( - new MethodHandlers< - context.ContextOuterClass.Empty, - automation.Automation.DeviceDeletionResult>( - this, METHODID_ZTP_DELETE_ALL))) - .build(); - } - } - - /** - */ - public static final class AutomationServiceStub extends io.grpc.stub.AbstractAsyncStub { - private AutomationServiceStub( - io.grpc.Channel channel, io.grpc.CallOptions callOptions) { - super(channel, callOptions); - } - - @java.lang.Override - protected AutomationServiceStub build( - io.grpc.Channel channel, io.grpc.CallOptions callOptions) { - return new AutomationServiceStub(channel, callOptions); - } - - /** - */ - public void ztpGetDeviceRole(automation.Automation.DeviceRoleId request, - io.grpc.stub.StreamObserver responseObserver) { - io.grpc.stub.ClientCalls.asyncUnaryCall( - getChannel().newCall(getZtpGetDeviceRoleMethod(), getCallOptions()), request, responseObserver); - } - - /** - */ - public void ztpGetDeviceRolesByDeviceId(context.ContextOuterClass.DeviceId request, - io.grpc.stub.StreamObserver responseObserver) { - io.grpc.stub.ClientCalls.asyncUnaryCall( - getChannel().newCall(getZtpGetDeviceRolesByDeviceIdMethod(), getCallOptions()), request, responseObserver); - } - - /** - */ - public void ztpAdd(automation.Automation.DeviceRole request, - io.grpc.stub.StreamObserver responseObserver) { - io.grpc.stub.ClientCalls.asyncUnaryCall( - getChannel().newCall(getZtpAddMethod(), getCallOptions()), request, responseObserver); - } - - /** - */ - public void ztpUpdate(automation.Automation.DeviceRoleConfig request, - io.grpc.stub.StreamObserver responseObserver) { - io.grpc.stub.ClientCalls.asyncUnaryCall( - getChannel().newCall(getZtpUpdateMethod(), getCallOptions()), request, responseObserver); - } - - /** - */ - public void ztpDelete(automation.Automation.DeviceRole request, - io.grpc.stub.StreamObserver responseObserver) { - io.grpc.stub.ClientCalls.asyncUnaryCall( - getChannel().newCall(getZtpDeleteMethod(), getCallOptions()), request, responseObserver); - } - - /** - */ - public void ztpDeleteAll(context.ContextOuterClass.Empty request, - io.grpc.stub.StreamObserver responseObserver) { - io.grpc.stub.ClientCalls.asyncUnaryCall( - getChannel().newCall(getZtpDeleteAllMethod(), getCallOptions()), request, responseObserver); - } - } - - /** - */ - public static final class AutomationServiceBlockingStub extends io.grpc.stub.AbstractBlockingStub { - private AutomationServiceBlockingStub( - io.grpc.Channel channel, io.grpc.CallOptions callOptions) { - super(channel, callOptions); - } - - @java.lang.Override - protected AutomationServiceBlockingStub build( - io.grpc.Channel channel, io.grpc.CallOptions callOptions) { - return new AutomationServiceBlockingStub(channel, callOptions); - } - - /** - */ - public automation.Automation.DeviceRole ztpGetDeviceRole(automation.Automation.DeviceRoleId request) { - return io.grpc.stub.ClientCalls.blockingUnaryCall( - getChannel(), getZtpGetDeviceRoleMethod(), getCallOptions(), request); - } - - /** - */ - public automation.Automation.DeviceRoleList ztpGetDeviceRolesByDeviceId(context.ContextOuterClass.DeviceId request) { - return io.grpc.stub.ClientCalls.blockingUnaryCall( - getChannel(), getZtpGetDeviceRolesByDeviceIdMethod(), getCallOptions(), request); - } - - /** - */ - public automation.Automation.DeviceRoleState ztpAdd(automation.Automation.DeviceRole request) { - return io.grpc.stub.ClientCalls.blockingUnaryCall( - getChannel(), getZtpAddMethod(), getCallOptions(), request); - } - - /** - */ - public automation.Automation.DeviceRoleState ztpUpdate(automation.Automation.DeviceRoleConfig request) { - return io.grpc.stub.ClientCalls.blockingUnaryCall( - getChannel(), getZtpUpdateMethod(), getCallOptions(), request); - } - - /** - */ - public automation.Automation.DeviceRoleState ztpDelete(automation.Automation.DeviceRole request) { - return io.grpc.stub.ClientCalls.blockingUnaryCall( - getChannel(), getZtpDeleteMethod(), getCallOptions(), request); - } - - /** - */ - public automation.Automation.DeviceDeletionResult ztpDeleteAll(context.ContextOuterClass.Empty request) { - return io.grpc.stub.ClientCalls.blockingUnaryCall( - getChannel(), getZtpDeleteAllMethod(), getCallOptions(), request); - } - } - - /** - */ - public static final class AutomationServiceFutureStub extends io.grpc.stub.AbstractFutureStub { - private AutomationServiceFutureStub( - io.grpc.Channel channel, io.grpc.CallOptions callOptions) { - super(channel, callOptions); - } - - @java.lang.Override - protected AutomationServiceFutureStub build( - io.grpc.Channel channel, io.grpc.CallOptions callOptions) { - return new AutomationServiceFutureStub(channel, callOptions); - } - - /** - */ - public com.google.common.util.concurrent.ListenableFuture ztpGetDeviceRole( - automation.Automation.DeviceRoleId request) { - return io.grpc.stub.ClientCalls.futureUnaryCall( - getChannel().newCall(getZtpGetDeviceRoleMethod(), getCallOptions()), request); - } - - /** - */ - public com.google.common.util.concurrent.ListenableFuture ztpGetDeviceRolesByDeviceId( - context.ContextOuterClass.DeviceId request) { - return io.grpc.stub.ClientCalls.futureUnaryCall( - getChannel().newCall(getZtpGetDeviceRolesByDeviceIdMethod(), getCallOptions()), request); - } - - /** - */ - public com.google.common.util.concurrent.ListenableFuture ztpAdd( - automation.Automation.DeviceRole request) { - return io.grpc.stub.ClientCalls.futureUnaryCall( - getChannel().newCall(getZtpAddMethod(), getCallOptions()), request); - } - - /** - */ - public com.google.common.util.concurrent.ListenableFuture ztpUpdate( - automation.Automation.DeviceRoleConfig request) { - return io.grpc.stub.ClientCalls.futureUnaryCall( - getChannel().newCall(getZtpUpdateMethod(), getCallOptions()), request); - } - - /** - */ - public com.google.common.util.concurrent.ListenableFuture ztpDelete( - automation.Automation.DeviceRole request) { - return io.grpc.stub.ClientCalls.futureUnaryCall( - getChannel().newCall(getZtpDeleteMethod(), getCallOptions()), request); - } - - /** - */ - public com.google.common.util.concurrent.ListenableFuture ztpDeleteAll( - context.ContextOuterClass.Empty request) { - return io.grpc.stub.ClientCalls.futureUnaryCall( - getChannel().newCall(getZtpDeleteAllMethod(), getCallOptions()), request); - } - } - - private static final int METHODID_ZTP_GET_DEVICE_ROLE = 0; - private static final int METHODID_ZTP_GET_DEVICE_ROLES_BY_DEVICE_ID = 1; - private static final int METHODID_ZTP_ADD = 2; - private static final int METHODID_ZTP_UPDATE = 3; - private static final int METHODID_ZTP_DELETE = 4; - private static final int METHODID_ZTP_DELETE_ALL = 5; - - private static final class MethodHandlers implements - io.grpc.stub.ServerCalls.UnaryMethod, - io.grpc.stub.ServerCalls.ServerStreamingMethod, - io.grpc.stub.ServerCalls.ClientStreamingMethod, - io.grpc.stub.ServerCalls.BidiStreamingMethod { - private final AutomationServiceImplBase serviceImpl; - private final int methodId; - - MethodHandlers(AutomationServiceImplBase serviceImpl, int methodId) { - this.serviceImpl = serviceImpl; - this.methodId = methodId; - } - - @java.lang.Override - @java.lang.SuppressWarnings("unchecked") - public void invoke(Req request, io.grpc.stub.StreamObserver responseObserver) { - switch (methodId) { - case METHODID_ZTP_GET_DEVICE_ROLE: - serviceImpl.ztpGetDeviceRole((automation.Automation.DeviceRoleId) request, - (io.grpc.stub.StreamObserver) responseObserver); - break; - case METHODID_ZTP_GET_DEVICE_ROLES_BY_DEVICE_ID: - serviceImpl.ztpGetDeviceRolesByDeviceId((context.ContextOuterClass.DeviceId) request, - (io.grpc.stub.StreamObserver) responseObserver); - break; - case METHODID_ZTP_ADD: - serviceImpl.ztpAdd((automation.Automation.DeviceRole) request, - (io.grpc.stub.StreamObserver) responseObserver); - break; - case METHODID_ZTP_UPDATE: - serviceImpl.ztpUpdate((automation.Automation.DeviceRoleConfig) request, - (io.grpc.stub.StreamObserver) responseObserver); - break; - case METHODID_ZTP_DELETE: - serviceImpl.ztpDelete((automation.Automation.DeviceRole) request, - (io.grpc.stub.StreamObserver) responseObserver); - break; - case METHODID_ZTP_DELETE_ALL: - serviceImpl.ztpDeleteAll((context.ContextOuterClass.Empty) request, - (io.grpc.stub.StreamObserver) responseObserver); - break; - default: - throw new AssertionError(); - } - } - - @java.lang.Override - @java.lang.SuppressWarnings("unchecked") - public io.grpc.stub.StreamObserver invoke( - io.grpc.stub.StreamObserver responseObserver) { - switch (methodId) { - default: - throw new AssertionError(); - } - } - } - - private static abstract class AutomationServiceBaseDescriptorSupplier - implements io.grpc.protobuf.ProtoFileDescriptorSupplier, io.grpc.protobuf.ProtoServiceDescriptorSupplier { - AutomationServiceBaseDescriptorSupplier() {} - - @java.lang.Override - public com.google.protobuf.Descriptors.FileDescriptor getFileDescriptor() { - return automation.Automation.getDescriptor(); - } - - @java.lang.Override - public com.google.protobuf.Descriptors.ServiceDescriptor getServiceDescriptor() { - return getFileDescriptor().findServiceByName("AutomationService"); - } - } - - private static final class AutomationServiceFileDescriptorSupplier - extends AutomationServiceBaseDescriptorSupplier { - AutomationServiceFileDescriptorSupplier() {} - } - - private static final class AutomationServiceMethodDescriptorSupplier - extends AutomationServiceBaseDescriptorSupplier - implements io.grpc.protobuf.ProtoMethodDescriptorSupplier { - private final String methodName; - - AutomationServiceMethodDescriptorSupplier(String methodName) { - this.methodName = methodName; - } - - @java.lang.Override - public com.google.protobuf.Descriptors.MethodDescriptor getMethodDescriptor() { - return getServiceDescriptor().findMethodByName(methodName); - } - } - - private static volatile io.grpc.ServiceDescriptor serviceDescriptor; - - public static io.grpc.ServiceDescriptor getServiceDescriptor() { - io.grpc.ServiceDescriptor result = serviceDescriptor; - if (result == null) { - synchronized (AutomationServiceGrpc.class) { - result = serviceDescriptor; - if (result == null) { - serviceDescriptor = result = io.grpc.ServiceDescriptor.newBuilder(SERVICE_NAME) - .setSchemaDescriptor(new AutomationServiceFileDescriptorSupplier()) - .addMethod(getZtpGetDeviceRoleMethod()) - .addMethod(getZtpGetDeviceRolesByDeviceIdMethod()) - .addMethod(getZtpAddMethod()) - .addMethod(getZtpUpdateMethod()) - .addMethod(getZtpDeleteMethod()) - .addMethod(getZtpDeleteAllMethod()) - .build(); - } - } - } - return result; - } -} diff --git a/src/common/Constants.py b/src/common/Constants.py index 423f2558b71b189b9e771e5af94968d28f8777c0..91d3116359ff53e10adba8f4e3d6e8bcc05c2abb 100644 --- a/src/common/Constants.py +++ b/src/common/Constants.py @@ -40,7 +40,7 @@ class ServiceNameEnum(Enum): DEVICE = 'device' SERVICE = 'service' SLICE = 'slice' - AUTOMATION = 'automation' + ZTP = 'ztp' POLICY = 'policy' MONITORING = 'monitoring' DLT = 'dlt' @@ -68,7 +68,7 @@ DEFAULT_SERVICE_GRPC_PORTS = { ServiceNameEnum.DEVICE .value : 2020, ServiceNameEnum.SERVICE .value : 3030, ServiceNameEnum.SLICE .value : 4040, - ServiceNameEnum.AUTOMATION .value : 5050, + ServiceNameEnum.ZTP .value : 5050, ServiceNameEnum.POLICY .value : 6060, ServiceNameEnum.MONITORING .value : 7070, ServiceNameEnum.DLT .value : 8080, diff --git a/src/device/service/DeviceServiceServicerImpl.py b/src/device/service/DeviceServiceServicerImpl.py index d29d469cb0812218030698284abbfc7551058411..eeffdd7b0592b5166c06c1597e17f79adcfd25bb 100644 --- a/src/device/service/DeviceServiceServicerImpl.py +++ b/src/device/service/DeviceServiceServicerImpl.py @@ -123,13 +123,13 @@ class DeviceServiceServicerImpl(DeviceServiceServicer): t9 = time.time() - automation_service_host = get_env_var_name(ServiceNameEnum.AUTOMATION, ENVVAR_SUFIX_SERVICE_HOST) + ztp_service_host = get_env_var_name(ServiceNameEnum.ZTP, ENVVAR_SUFIX_SERVICE_HOST) environment_variables = set(os.environ.keys()) - if automation_service_host in environment_variables: - # Automation component is deployed; leave devices disabled. Automation will enable them. + if ztp_service_host in environment_variables: + # ZTP component is deployed; leave devices disabled. ZTP will enable them. device.device_operational_status = DeviceOperationalStatusEnum.DEVICEOPERATIONALSTATUS_DISABLED else: - # Automation is not deployed; assume the device is ready while onboarding and set them as enabled. + # ZTP is not deployed; assume the device is ready while onboarding and set them as enabled. device.device_operational_status = DeviceOperationalStatusEnum.DEVICEOPERATIONALSTATUS_ENABLED device_id = context_client.SetDevice(device) diff --git a/src/device/service/drivers/xr/README_XR.md b/src/device/service/drivers/xr/README_XR.md index 9c64cdef1b773e84153c0d27a58e71af8bdf238f..6f79cfad0cbc9531c88682445f990560a9f1ff2e 100644 --- a/src/device/service/drivers/xr/README_XR.md +++ b/src/device/service/drivers/xr/README_XR.md @@ -52,7 +52,7 @@ Script requires more variables than before as of February 2023. # See https://labs.etsi.org/rep/tfs/controller/-/blob/develop/my_deploy.sh # Use docker run -d -p 32000:5000 --restart=always --name registry registry:2 export TFS_REGISTRY_IMAGE="http://localhost:32000/tfs/" -export TFS_COMPONENTS="context device automation monitoring pathcomp service slice compute webui load_generator" +export TFS_COMPONENTS="context device ztp monitoring pathcomp service slice compute webui load_generator" export TFS_IMAGE_TAG="dev" export TFS_K8S_NAMESPACE="tfs" export TFS_EXTRA_MANIFESTS="manifests/nginx_ingress_http.yaml" @@ -113,14 +113,14 @@ Run deploy script to build in docker containers and then instantiate to configur If protobuf definitions have changed, regenerate version controlled Java files manually (it is a horrifying bug in build system that this is not automated!). ``` -cd automation +cd ztp # In case Java is not already installed sudo apt-get install openjdk-11-jdk -y export MAVEN_OPTS='--add-exports=java.base/jdk.internal.module=ALL-UNNAMED --add-exports jdk.compiler/com.sun.tools.javac.file=ALL-UNNAMED --add-exports jdk.compiler/com.sun.tools.javac.parser=ALL-UNNAMED --add-exports jdk.compiler/com.sun.tools.javac.tree=ALL-UNNAMED --add-exports jdk.compiler/com.sun.tools.javac.util=ALL-UNNAMED --add-exports jdk.compiler/com.sun.tools.javac.tree=ALL-UNNAMED --add-exports jdk.compiler/com.sun.tools.javac.api=ALL-UNNAMED' cd src/policy ./mvnw compile cd - -cd src/automation +cd src/ztp ./mvnw compile ``` diff --git a/src/load_generator/tests/deploy_specs.sh b/src/load_generator/tests/deploy_specs.sh index 571990ecabfbf120b517f44fd99b4550a4b8a9a1..da09bae6a34e68b036938f61f08fa4f1e9220fbd 100755 --- a/src/load_generator/tests/deploy_specs.sh +++ b/src/load_generator/tests/deploy_specs.sh @@ -17,11 +17,11 @@ export TFS_REGISTRY_IMAGE="http://localhost:32000/tfs/" # Set the list of components, separated by spaces, you want to build images for, and deploy. # Supported components are: -# context device automation policy service compute monitoring webui +# context device ztp policy service compute monitoring webui # interdomain slice pathcomp dlt # dbscanserving opticalattackmitigator opticalattackdetector # l3_attackmitigator l3_centralizedattackdetector l3_distributedattackdetector -export TFS_COMPONENTS="context device pathcomp service slice webui load_generator" # automation monitoring compute dlt +export TFS_COMPONENTS="context device pathcomp service slice webui load_generator" # ztp monitoring compute dlt # Set the tag you want to use for your images. export TFS_IMAGE_TAG="dev" diff --git a/src/pathcomp/misc/my_deploy-tests.sh b/src/pathcomp/misc/my_deploy-tests.sh index 66564e9a07a6a9ea8eb7cc6ba545c551f614a526..639ddb08ad68ddfcfdbbdca2717718053dc28ab4 100755 --- a/src/pathcomp/misc/my_deploy-tests.sh +++ b/src/pathcomp/misc/my_deploy-tests.sh @@ -17,7 +17,7 @@ export TFS_REGISTRY_IMAGE="http://localhost:32000/tfs/" # Set the list of components, separated by comas, you want to build images for, and deploy. # Supported components are: -# context device automation policy service compute monitoring webui +# context device ztp policy service compute monitoring webui # interdomain slice pathcomp dlt # dbscanserving opticalattackmitigator opticalcentralizedattackdetector # l3_attackmitigator l3_centralizedattackdetector l3_distributedattackdetector diff --git a/src/te/config/sys.config.src b/src/te/config/sys.config.src index edcd4384a3236df42b1e530c8b3a92b96c80e09e..0d57845070f53734fe413de80ff77ddf780d09ff 100644 --- a/src/te/config/sys.config.src +++ b/src/te/config/sys.config.src @@ -36,8 +36,8 @@ {context, [ {http, {env, "CONTEXTSERVICE_SERVICE_HOST"}, {env, "CONTEXTSERVICE_SERVICE_PORT_GRPC"}, []} ], #{}}, - {automation, [ - {http, {env, "AUTOMATIONSERVICE_SERVICE_HOST"}, {env, "AUTOMATIONSERVICE_SERVICE_PORT_GRPC"}, []} + {ztp, [ + {http, {env, "ZTPSERVICE_SERVICE_HOST"}, {env, "ZTPSERVICE_SERVICE_PORT_GRPC"}, []} ], #{}} ]} ]}, @@ -98,4 +98,4 @@ }} ]} ]} -]. \ No newline at end of file +]. diff --git a/src/te/tests/deploy_specs.sh b/src/te/tests/deploy_specs.sh index 818fb2b0d69ae63b197a83683e68aed96e50d6e2..ebc5ac1d678ba833b72d3288b4d45e1efad0520a 100644 --- a/src/te/tests/deploy_specs.sh +++ b/src/te/tests/deploy_specs.sh @@ -25,8 +25,8 @@ export TFS_COMPONENTS="context device pathcomp service slice webui" # Uncomment to activate Monitoring #export TFS_COMPONENTS="${TFS_COMPONENTS} monitoring" -# Uncomment to activate Automation and Policy Manager -#export TFS_COMPONENTS="${TFS_COMPONENTS} automation policy" +# Uncomment to activate ZTP and Policy Manager +#export TFS_COMPONENTS="${TFS_COMPONENTS} ztp policy" # Uncomment to activate Optical CyberSecurity #export TFS_COMPONENTS="${TFS_COMPONENTS} dbscanserving opticalattackmitigator opticalattackdetector opticalattackmanager" diff --git a/src/tests/benchmark/policy/deploy_specs.sh b/src/tests/benchmark/policy/deploy_specs.sh index 7d408f003ce411566b9bf2435d89c72ff5db1459..51bc99cf7ae6cc7ecfc4cbd79bca19e9fcbdc353 100644 --- a/src/tests/benchmark/policy/deploy_specs.sh +++ b/src/tests/benchmark/policy/deploy_specs.sh @@ -19,7 +19,7 @@ export TFS_REGISTRY_IMAGES="http://localhost:32000/tfs/" # Set the list of components, separated by spaces, you want to build images for, and deploy. -export TFS_COMPONENTS="context device automation monitoring pathcomp service slice compute webui" +export TFS_COMPONENTS="context device ztp monitoring pathcomp service slice compute webui" # Set the tag you want to use for your images. export TFS_IMAGE_TAG="dev" diff --git a/src/tests/benchmark/automation/.gitignore b/src/tests/benchmark/ztp/.gitignore similarity index 100% rename from src/tests/benchmark/automation/.gitignore rename to src/tests/benchmark/ztp/.gitignore diff --git a/src/tests/benchmark/automation/README.md b/src/tests/benchmark/ztp/README.md similarity index 100% rename from src/tests/benchmark/automation/README.md rename to src/tests/benchmark/ztp/README.md diff --git a/src/tests/benchmark/automation/ZtpAdd.js b/src/tests/benchmark/ztp/ZtpAdd.js similarity index 92% rename from src/tests/benchmark/automation/ZtpAdd.js rename to src/tests/benchmark/ztp/ZtpAdd.js index d7740ad32c8b685a31a31c5fc09a7a7cc6ef27a0..3d7a7831a0cd9dfc73eab8133681ecd20d2f81ef 100644 --- a/src/tests/benchmark/automation/ZtpAdd.js +++ b/src/tests/benchmark/ztp/ZtpAdd.js @@ -19,7 +19,7 @@ import exec from "k6/execution"; import { check, sleep } from 'k6'; const client = new grpc.Client(); -client.load(['../../../../proto'], 'automation.proto'); +client.load(['../../../../proto'], 'ztp.proto'); export const data = []; for (let i = 1; i < 801; i++) { @@ -51,7 +51,7 @@ export default () => { }); var item = data[exec.scenario.iterationInInstance]; - const response = client.invoke('automation.AutomationService/ZtpAdd', item); + const response = client.invoke('ztp.ZTPService/ZtpAdd', item); check(response, { 'status is OK': (r) => r && r.status === grpc.StatusOK, diff --git a/src/tests/benchmark/automation/ZtpDelete.js b/src/tests/benchmark/ztp/ZtpDelete.js similarity index 92% rename from src/tests/benchmark/automation/ZtpDelete.js rename to src/tests/benchmark/ztp/ZtpDelete.js index b1b7f3a09734d484ef14868cbf93c87dce79f357..4b5d41340a9ac4d42899a996380a3bc5203bc1fd 100644 --- a/src/tests/benchmark/automation/ZtpDelete.js +++ b/src/tests/benchmark/ztp/ZtpDelete.js @@ -19,7 +19,7 @@ import exec from "k6/execution"; import { check, sleep } from 'k6'; const client = new grpc.Client(); -client.load(['../../../../proto'], 'automation.proto'); +client.load(['../../../../proto'], 'ztp.proto'); export const data = []; for (let i = 1; i < 801; i++) { @@ -51,7 +51,7 @@ export default () => { }); var item = data[exec.scenario.iterationInInstance]; - const response = client.invoke('automation.AutomationService/ZtpDelete', item); + const response = client.invoke('ztp.ZTPService/ZtpDelete', item); check(response, { 'status is OK': (r) => r && r.status === grpc.StatusOK, diff --git a/src/tests/benchmark/automation/ZtpUpdate.js b/src/tests/benchmark/ztp/ZtpUpdate.js similarity index 93% rename from src/tests/benchmark/automation/ZtpUpdate.js rename to src/tests/benchmark/ztp/ZtpUpdate.js index c274d22861ae6df52906d57cfb545eb1dc3c94c2..61d38bc993d7ceeda9c8c7ce29e1b9804e6825f4 100644 --- a/src/tests/benchmark/automation/ZtpUpdate.js +++ b/src/tests/benchmark/ztp/ZtpUpdate.js @@ -19,7 +19,7 @@ import exec from "k6/execution"; import { check, sleep } from 'k6'; const client = new grpc.Client(); -client.load(['../../../../proto'], 'automation.proto'); +client.load(['../../../../proto'], 'ztp.proto'); export const data = []; for (let i = 1; i < 801; i++) { @@ -56,7 +56,7 @@ export default () => { }); var item = data[exec.scenario.iterationInInstance]; - const response = client.invoke('automation.AutomationService/ZtpUpdate', item); + const response = client.invoke('ztp.ZTPService/ZtpUpdate', item); check(response, { 'status is OK': (r) => r && r.status === grpc.StatusOK, diff --git a/src/tests/benchmark/automation/__init__.py b/src/tests/benchmark/ztp/__init__.py similarity index 100% rename from src/tests/benchmark/automation/__init__.py rename to src/tests/benchmark/ztp/__init__.py diff --git a/src/tests/benchmark/automation/run_test_01_bootstrap.sh b/src/tests/benchmark/ztp/run_test_01_bootstrap.sh similarity index 90% rename from src/tests/benchmark/automation/run_test_01_bootstrap.sh rename to src/tests/benchmark/ztp/run_test_01_bootstrap.sh index 2382521b26cbf6217aacea7c2f9d86fdac1209be..bbd0b5111ab3ddb05513396b253fe4c7e630d3a5 100755 --- a/src/tests/benchmark/automation/run_test_01_bootstrap.sh +++ b/src/tests/benchmark/ztp/run_test_01_bootstrap.sh @@ -14,4 +14,4 @@ # limitations under the License. source tfs_runtime_env_vars.sh -pytest --verbose --log-level=INFO -o log_cli=true -o log_cli_level=INFO src/tests/benchmark/automation/tests/test_functional_bootstrap.py +pytest --verbose --log-level=INFO -o log_cli=true -o log_cli_level=INFO src/tests/benchmark/ztp/tests/test_functional_bootstrap.py diff --git a/src/tests/benchmark/automation/run_test_02_cleanup.sh b/src/tests/benchmark/ztp/run_test_02_cleanup.sh similarity index 91% rename from src/tests/benchmark/automation/run_test_02_cleanup.sh rename to src/tests/benchmark/ztp/run_test_02_cleanup.sh index 56965d2007b441ab76ab07777a04c25b38eb8b28..6b98bca0097b17c96793c9168c0976bd1e48fe3a 100755 --- a/src/tests/benchmark/automation/run_test_02_cleanup.sh +++ b/src/tests/benchmark/ztp/run_test_02_cleanup.sh @@ -14,4 +14,4 @@ # limitations under the License. source tfs_runtime_env_vars.sh -pytest --verbose --log-level=INFO -o log_cli=true -o log_cli_level=INFO src/tests/benchmark/automation/tests/test_functional_cleanup.py +pytest --verbose --log-level=INFO -o log_cli=true -o log_cli_level=INFO src/tests/benchmark/ztp/tests/test_functional_cleanup.py diff --git a/src/tests/benchmark/automation/tests/.gitignore b/src/tests/benchmark/ztp/tests/.gitignore similarity index 100% rename from src/tests/benchmark/automation/tests/.gitignore rename to src/tests/benchmark/ztp/tests/.gitignore diff --git a/src/tests/benchmark/automation/tests/Fixtures.py b/src/tests/benchmark/ztp/tests/Fixtures.py similarity index 100% rename from src/tests/benchmark/automation/tests/Fixtures.py rename to src/tests/benchmark/ztp/tests/Fixtures.py diff --git a/src/tests/benchmark/automation/tests/Objects.py b/src/tests/benchmark/ztp/tests/Objects.py similarity index 100% rename from src/tests/benchmark/automation/tests/Objects.py rename to src/tests/benchmark/ztp/tests/Objects.py diff --git a/src/tests/benchmark/automation/tests/__init__.py b/src/tests/benchmark/ztp/tests/__init__.py similarity index 100% rename from src/tests/benchmark/automation/tests/__init__.py rename to src/tests/benchmark/ztp/tests/__init__.py diff --git a/src/tests/benchmark/automation/tests/test_functional_bootstrap.py b/src/tests/benchmark/ztp/tests/test_functional_bootstrap.py similarity index 100% rename from src/tests/benchmark/automation/tests/test_functional_bootstrap.py rename to src/tests/benchmark/ztp/tests/test_functional_bootstrap.py diff --git a/src/tests/benchmark/automation/tests/test_functional_cleanup.py b/src/tests/benchmark/ztp/tests/test_functional_cleanup.py similarity index 100% rename from src/tests/benchmark/automation/tests/test_functional_cleanup.py rename to src/tests/benchmark/ztp/tests/test_functional_cleanup.py diff --git a/src/tests/ecoc22/deploy_specs.sh b/src/tests/ecoc22/deploy_specs.sh index b1ee5ef6d6e500078bf0e170af5dfb32f01df088..4a12c3b2df5af430b88281e73ff4d0768a33f91d 100755 --- a/src/tests/ecoc22/deploy_specs.sh +++ b/src/tests/ecoc22/deploy_specs.sh @@ -26,8 +26,8 @@ export TFS_COMPONENTS="context device pathcomp service slice compute webui" # Uncomment to activate Monitoring #export TFS_COMPONENTS="${TFS_COMPONENTS} monitoring" -# Uncomment to activate Automation and Policy Manager -#export TFS_COMPONENTS="${TFS_COMPONENTS} automation policy" +# Uncomment to activate ZTP and Policy Manager +#export TFS_COMPONENTS="${TFS_COMPONENTS} ztp policy" # Uncomment to activate Optical CyberSecurity #export TFS_COMPONENTS="${TFS_COMPONENTS} dbscanserving opticalattackmitigator opticalattackdetector opticalattackmanager" diff --git a/src/tests/oeccpsc22/deploy_specs_dom1.sh b/src/tests/oeccpsc22/deploy_specs_dom1.sh index 7db9159e00e3044ddeb571b03cf3e05de33a8150..fc82b2c929e5477d0a8de9487c6fe4775ac2a1c6 100755 --- a/src/tests/oeccpsc22/deploy_specs_dom1.sh +++ b/src/tests/oeccpsc22/deploy_specs_dom1.sh @@ -20,7 +20,7 @@ export TFS_REGISTRY_IMAGES="http://localhost:32000/tfs/" # Set the list of components, separated by spaces, you want to build images for, and deploy. -#export TFS_COMPONENTS="context device automation monitoring pathcomp service slice compute webui interdomain load_generator" +#export TFS_COMPONENTS="context device ztp monitoring pathcomp service slice compute webui interdomain load_generator" export TFS_COMPONENTS="context device pathcomp service slice interdomain webui" # Set the tag you want to use for your images. diff --git a/src/tests/oeccpsc22/deploy_specs_dom2.sh b/src/tests/oeccpsc22/deploy_specs_dom2.sh index 3e23c56feb3247a1b1bcef1a82feeac049654cb6..9d9ba834175a34d8db5d13e795bd0a8a358c9e1f 100755 --- a/src/tests/oeccpsc22/deploy_specs_dom2.sh +++ b/src/tests/oeccpsc22/deploy_specs_dom2.sh @@ -20,7 +20,7 @@ export TFS_REGISTRY_IMAGES="http://localhost:32000/tfs/" # Set the list of components, separated by spaces, you want to build images for, and deploy. -#export TFS_COMPONENTS="context device automation monitoring pathcomp service slice compute webui interdomain load_generator" +#export TFS_COMPONENTS="context device ztp monitoring pathcomp service slice compute webui interdomain load_generator" export TFS_COMPONENTS="context device pathcomp service slice interdomain webui" # Set the tag you want to use for your images. diff --git a/src/tests/oeccpsc22/old/deploy_in_kubernetes.sh b/src/tests/oeccpsc22/old/deploy_in_kubernetes.sh index 53b6e76a8bb32310945b29c57946435d98a0b8d3..32582a78a3748457d8b6b6b98d2828ec5ae1eeb6 100755 --- a/src/tests/oeccpsc22/old/deploy_in_kubernetes.sh +++ b/src/tests/oeccpsc22/old/deploy_in_kubernetes.sh @@ -67,7 +67,7 @@ for COMPONENT in $COMPONENTS; do echo " Building Docker image..." BUILD_LOG="$TMP_LOGS_FOLDER/build_${COMPONENT}.log" - if [ "$COMPONENT" == "automation" ] || [ "$COMPONENT" == "policy" ]; then + if [ "$COMPONENT" == "ztp" ] || [ "$COMPONENT" == "policy" ]; then docker build -t "$IMAGE_NAME" -f ./src/"$COMPONENT"/Dockerfile ./src/"$COMPONENT"/ > "$BUILD_LOG" else docker build -t "$IMAGE_NAME" -f ./src/"$COMPONENT"/Dockerfile ./src/ > "$BUILD_LOG" diff --git a/src/tests/ofc22/deploy_specs.sh b/src/tests/ofc22/deploy_specs.sh index 0c1f57387ee66ed9809695d14a9a8dad7ccda4c5..65aa0b13c3cc6766be17b350be335b6c058775b9 100755 --- a/src/tests/ofc22/deploy_specs.sh +++ b/src/tests/ofc22/deploy_specs.sh @@ -26,9 +26,9 @@ export TFS_COMPONENTS="context device pathcomp service slice compute webui" # Uncomment to activate Monitoring export TFS_COMPONENTS="${TFS_COMPONENTS} monitoring" -# Uncomment to activate Automation and Policy Manager -#export TFS_COMPONENTS="${TFS_COMPONENTS} automation policy" -export TFS_COMPONENTS="${TFS_COMPONENTS} automation" +# Uncomment to activate ZTP and Policy Manager +#export TFS_COMPONENTS="${TFS_COMPONENTS} ztp policy" +export TFS_COMPONENTS="${TFS_COMPONENTS} ztp" # Uncomment to activate Optical CyberSecurity #export TFS_COMPONENTS="${TFS_COMPONENTS} dbscanserving opticalattackmitigator opticalattackdetector opticalattackmanager" diff --git a/src/tests/ofc23/deploy_specs_child.sh b/src/tests/ofc23/deploy_specs_child.sh index 94c0d4de00c56c8b9b435eb734e112c4f34ab25e..63a1a20d2788dd54d6469dbffa289359dc8c866d 100755 --- a/src/tests/ofc23/deploy_specs_child.sh +++ b/src/tests/ofc23/deploy_specs_child.sh @@ -25,8 +25,8 @@ export TFS_COMPONENTS="context device pathcomp service slice compute webui load_ # Uncomment to activate Monitoring #export TFS_COMPONENTS="${TFS_COMPONENTS} monitoring" -# Uncomment to activate Automation and Policy Manager -#export TFS_COMPONENTS="${TFS_COMPONENTS} automation policy" +# Uncomment to activate ZTP and Policy Manager +#export TFS_COMPONENTS="${TFS_COMPONENTS} ztp policy" # Uncomment to activate Optical CyberSecurity #export TFS_COMPONENTS="${TFS_COMPONENTS} dbscanserving opticalattackmitigator opticalattackdetector opticalattackmanager" diff --git a/src/tests/ofc23/deploy_specs_parent.sh b/src/tests/ofc23/deploy_specs_parent.sh index 6bd4dc33b324fb7a301c13695901c28d2375d2d7..fb76b687aace0222b6867a07f2b572e2c831ae4a 100755 --- a/src/tests/ofc23/deploy_specs_parent.sh +++ b/src/tests/ofc23/deploy_specs_parent.sh @@ -25,8 +25,8 @@ export TFS_COMPONENTS="context device pathcomp service slice compute webui load_ # Uncomment to activate Monitoring #export TFS_COMPONENTS="${TFS_COMPONENTS} monitoring" -# Uncomment to activate Automation and Policy Manager -#export TFS_COMPONENTS="${TFS_COMPONENTS} automation policy" +# Uncomment to activate ZTP and Policy Manager +#export TFS_COMPONENTS="${TFS_COMPONENTS} ztp policy" # Uncomment to activate Optical CyberSecurity #export TFS_COMPONENTS="${TFS_COMPONENTS} dbscanserving opticalattackmitigator opticalattackdetector opticalattackmanager" diff --git a/src/tests/ofc23/deploy_specs_sligrp.sh b/src/tests/ofc23/deploy_specs_sligrp.sh index 0422c7b103f0fd07cfa9e3b0ea69dcb9a4f7cd05..a16bc7e56949e480e490e8b84e1e62f4c148a5fd 100755 --- a/src/tests/ofc23/deploy_specs_sligrp.sh +++ b/src/tests/ofc23/deploy_specs_sligrp.sh @@ -25,8 +25,8 @@ export TFS_COMPONENTS="context device pathcomp service slice webui load_generato # Uncomment to activate Monitoring export TFS_COMPONENTS="${TFS_COMPONENTS} monitoring" -# Uncomment to activate Automation and Policy Manager -#export TFS_COMPONENTS="${TFS_COMPONENTS} automation policy" +# Uncomment to activate ZTP and Policy Manager +#export TFS_COMPONENTS="${TFS_COMPONENTS} ztp policy" # Uncomment to activate Optical CyberSecurity #export TFS_COMPONENTS="${TFS_COMPONENTS} dbscanserving opticalattackmitigator opticalattackdetector opticalattackmanager" diff --git a/src/tests/p4/deploy_specs.sh b/src/tests/p4/deploy_specs.sh index b988123d5564684bd1bfcb776bab7f187fc628ca..6bd8d07c839ce235cc3cba8fcd29be93214a730f 100755 --- a/src/tests/p4/deploy_specs.sh +++ b/src/tests/p4/deploy_specs.sh @@ -16,7 +16,7 @@ export TFS_REGISTRY_IMAGE="http://localhost:32000/tfs/" # Set the list of components, separated by spaces, you want to build images for, and deploy. -export TFS_COMPONENTS="context device automation service compute monitoring webui" +export TFS_COMPONENTS="context device ztp service compute monitoring webui" # Set the tag you want to use for your images. export TFS_IMAGE_TAG="dev" diff --git a/src/tests/scenario2/deploy_specs_dom1.sh b/src/tests/scenario2/deploy_specs_dom1.sh index 7dd777fbee12537729e8408fe671074a1e9b19f1..1180c1af1deb0d2bd79c1749941c79233a1ae5bd 100755 --- a/src/tests/scenario2/deploy_specs_dom1.sh +++ b/src/tests/scenario2/deploy_specs_dom1.sh @@ -26,8 +26,8 @@ export TFS_COMPONENTS="context device pathcomp service slice webui" # Uncomment to activate Monitoring #export TFS_COMPONENTS="${TFS_COMPONENTS} monitoring" -# Uncomment to activate Automation and Policy Manager -#export TFS_COMPONENTS="${TFS_COMPONENTS} automation policy" +# Uncomment to activate ZTP and Policy Manager +#export TFS_COMPONENTS="${TFS_COMPONENTS} ztp policy" # Uncomment to activate Optical CyberSecurity #export TFS_COMPONENTS="${TFS_COMPONENTS} dbscanserving opticalattackmitigator opticalattackdetector opticalattackmanager" diff --git a/src/tests/scenario2/deploy_specs_dom2.sh b/src/tests/scenario2/deploy_specs_dom2.sh index bb6ce2f0c390d3253696e62bf23aa85b0d16782e..37420409053c50cc44647f3d58d1c15bc1ce28ec 100755 --- a/src/tests/scenario2/deploy_specs_dom2.sh +++ b/src/tests/scenario2/deploy_specs_dom2.sh @@ -26,8 +26,8 @@ export TFS_COMPONENTS="context device pathcomp service slice webui" # Uncomment to activate Monitoring #export TFS_COMPONENTS="${TFS_COMPONENTS} monitoring" -# Uncomment to activate Automation and Policy Manager -#export TFS_COMPONENTS="${TFS_COMPONENTS} automation policy" +# Uncomment to activate ZTP and Policy Manager +#export TFS_COMPONENTS="${TFS_COMPONENTS} ztp policy" # Uncomment to activate Optical CyberSecurity #export TFS_COMPONENTS="${TFS_COMPONENTS} dbscanserving opticalattackmitigator opticalattackdetector opticalattackmanager" diff --git a/src/tests/scenario2/deploy_specs_dom3.sh b/src/tests/scenario2/deploy_specs_dom3.sh index 797d55894a143308935664f2c879260dfd2760ec..4b31ed9a3e7b85facf787f72e200bd8ec831576d 100755 --- a/src/tests/scenario2/deploy_specs_dom3.sh +++ b/src/tests/scenario2/deploy_specs_dom3.sh @@ -26,8 +26,8 @@ export TFS_COMPONENTS="context device pathcomp service slice webui" # Uncomment to activate Monitoring #export TFS_COMPONENTS="${TFS_COMPONENTS} monitoring" -# Uncomment to activate Automation and Policy Manager -#export TFS_COMPONENTS="${TFS_COMPONENTS} automation policy" +# Uncomment to activate ZTP and Policy Manager +#export TFS_COMPONENTS="${TFS_COMPONENTS} ztp policy" # Uncomment to activate Optical CyberSecurity #export TFS_COMPONENTS="${TFS_COMPONENTS} dbscanserving opticalattackmitigator opticalattackdetector opticalattackmanager" diff --git a/src/tests/scenario2/deploy_specs_dom4.sh b/src/tests/scenario2/deploy_specs_dom4.sh index d2fe2abfa981d498558d263ca053093e017225d2..e281802af208b9066cb0ae4381ebc499f609ec61 100755 --- a/src/tests/scenario2/deploy_specs_dom4.sh +++ b/src/tests/scenario2/deploy_specs_dom4.sh @@ -26,8 +26,8 @@ export TFS_COMPONENTS="context device pathcomp service slice webui" # Uncomment to activate Monitoring #export TFS_COMPONENTS="${TFS_COMPONENTS} monitoring" -# Uncomment to activate Automation and Policy Manager -#export TFS_COMPONENTS="${TFS_COMPONENTS} automation policy" +# Uncomment to activate ZTP and Policy Manager +#export TFS_COMPONENTS="${TFS_COMPONENTS} ztp policy" # Uncomment to activate Optical CyberSecurity #export TFS_COMPONENTS="${TFS_COMPONENTS} dbscanserving opticalattackmitigator opticalattackdetector opticalattackmanager" diff --git a/src/tests/scenario2/old_tests/tests/test_functional_bootstrap.py b/src/tests/scenario2/old_tests/tests/test_functional_bootstrap.py index cfe21603de85862e83d7dd8b9fb4eebefd99b702..cb1d8318da37725b5adf66b5dc06e454c48f4e53 100644 --- a/src/tests/scenario2/old_tests/tests/test_functional_bootstrap.py +++ b/src/tests/scenario2/old_tests/tests/test_functional_bootstrap.py @@ -117,7 +117,7 @@ def test_devices_bootstraping( assert response.device_uuid.uuid == device_uuid #expected_events.extend([ - # # Device creation, update for automation to start the device + # # Device creation, update for ztp to start the device # ('DeviceEvent', EVENT_CREATE, json_device_id(device_uuid)), # #('DeviceEvent', EVENT_UPDATE, json_device_id(device_uuid)), #]) @@ -216,4 +216,4 @@ def test_scenario_alarms_created(monitoring_client: MonitoringClient, alarm_desc monitoring_client.SetKpiAlarm(new_alarm_descriptor) response: AlarmList = monitoring_client.GetAlarms(Empty()) - assert len(response.alarm_descriptor) == 16 \ No newline at end of file + assert len(response.alarm_descriptor) == 16 diff --git a/src/tests/scenario3/l3/deploy_specs.sh b/src/tests/scenario3/l3/deploy_specs.sh index 8c8264fca75d471c3bbbf0cb523c7a17bcffa5a0..6f594fca4168c3c0e3590b40e65a90606e9f08f9 100644 --- a/src/tests/scenario3/l3/deploy_specs.sh +++ b/src/tests/scenario3/l3/deploy_specs.sh @@ -26,8 +26,8 @@ export TFS_COMPONENTS="context device pathcomp service slice webui" # Uncomment to activate Monitoring export TFS_COMPONENTS="${TFS_COMPONENTS} monitoring" -# Uncomment to activate Automation and Policy Manager -#export TFS_COMPONENTS="${TFS_COMPONENTS} automation policy" +# Uncomment to activate ZTP and Policy Manager +#export TFS_COMPONENTS="${TFS_COMPONENTS} ztp policy" # Uncomment to activate Optical CyberSecurity #export TFS_COMPONENTS="${TFS_COMPONENTS} dbscanserving opticalattackmitigator opticalattackdetector opticalattackmanager" diff --git a/src/tests/scenario3/optical/deploy_specs.sh b/src/tests/scenario3/optical/deploy_specs.sh index 73c9112254c3e95eea4155abd7afd26ee358e368..dca0a08bba2bd903469448c44f636dfeb1eea5e8 100644 --- a/src/tests/scenario3/optical/deploy_specs.sh +++ b/src/tests/scenario3/optical/deploy_specs.sh @@ -17,7 +17,7 @@ # ----- TeraFlowSDN ------------------------------------------------------------ # Set the list of components, separated by spaces, you want to build images for, and deploy. -export TFS_COMPONENTS="context device automation monitoring pathcomp service slice compute webui load_generator" +export TFS_COMPONENTS="context device ztp monitoring pathcomp service slice compute webui load_generator" # addition for the optical cybersecurity component export TFS_COMPONENTS="${TFS_COMPONENTS} dbscanserving opticalattackmitigator opticalattackdetector opticalattackmanager" diff --git a/src/tests/tools/mock_mw_sdn_ctrl/scenario/microwave_deploy.sh b/src/tests/tools/mock_mw_sdn_ctrl/scenario/microwave_deploy.sh index fb0629dc4ce600f7bea058a7bcfbbd261ac157cb..ea39e8147d33d8b6f60a9b26c4f510df9fec5fe8 100755 --- a/src/tests/tools/mock_mw_sdn_ctrl/scenario/microwave_deploy.sh +++ b/src/tests/tools/mock_mw_sdn_ctrl/scenario/microwave_deploy.sh @@ -17,7 +17,7 @@ export TFS_REGISTRY_IMAGE="http://localhost:32000/tfs/" # Set the list of components, separated by spaces, you want to build images for, and deploy. # Supported components are: -# context device automation policy service compute monitoring webui +# context device ztp policy service compute monitoring webui # interdomain slice pathcomp dlt # dbscanserving opticalattackmitigator opticalattackdetector # l3_attackmitigator l3_centralizedattackdetector l3_distributedattackdetector diff --git a/src/automation/.dockerignore b/src/ztp/.dockerignore similarity index 100% rename from src/automation/.dockerignore rename to src/ztp/.dockerignore diff --git a/src/automation/.env.example b/src/ztp/.env.example similarity index 100% rename from src/automation/.env.example rename to src/ztp/.env.example diff --git a/src/automation/.gitignore b/src/ztp/.gitignore similarity index 100% rename from src/automation/.gitignore rename to src/ztp/.gitignore diff --git a/src/automation/.gitlab-ci.yml b/src/ztp/.gitlab-ci.yml similarity index 90% rename from src/automation/.gitlab-ci.yml rename to src/ztp/.gitlab-ci.yml index 0dc6284a4086253e64138343a989055581eccdda..a40a14f495b46da55f47d1bbb851fc62e261b32c 100644 --- a/src/automation/.gitlab-ci.yml +++ b/src/ztp/.gitlab-ci.yml @@ -13,12 +13,12 @@ # limitations under the License. variables: - IMAGE_NAME: 'automation' + IMAGE_NAME: 'ztp' REPORTS_PATH: "src/${IMAGE_NAME}/reports" BUILD_ENV: build.env # Package application needed to run tests & build the image on next stage -build automation: +build ztp: stage: build script: - export IMAGE_TAG=$(grep -m1 '' ./src/$IMAGE_NAME/pom.xml | grep -oP '(?<=>).*(?=<)') @@ -39,12 +39,12 @@ build automation: - .gitlab-ci.yml # Run tests, build & push the image -unit_test automation: +unit_test ztp: variables: REPORTS_CONTAINER: "${IMAGE_NAME}-reports" stage: unit_test needs: - - build automation + - build ztp before_script: - docker login -u "$CI_REGISTRY_USER" -p "$CI_REGISTRY_PASSWORD" $CI_REGISTRY - docker rm ${REPORTS_CONTAINER} || true @@ -79,18 +79,18 @@ unit_test automation: - manifests/${IMAGE_NAME}service.yaml - .gitlab-ci.yml -## Deployment of automation service in Kubernetes Cluster -#deploy automation: +## Deployment of ztp service in Kubernetes Cluster +#deploy ztp: # stage: deploy # needs: -# - build automation -# - unit_test automation +# - build ztp +# - unit_test ztp # script: # - kubectl version # - kubectl get all -# - kubectl delete --ignore-not-found=true -f "manifests/automationservice.yaml" -# - kubectl apply -f "manifests/automationservice.yaml" -# - kubectl delete pods --selector app=automationservice +# - kubectl delete --ignore-not-found=true -f "manifests/ztpservice.yaml" +# - kubectl apply -f "manifests/ztpservice.yaml" +# - kubectl delete pods --selector app=ztpservice # - kubectl get all # rules: # - if: '$CI_PIPELINE_SOURCE == "merge_request_event" && ($CI_MERGE_REQUEST_TARGET_BRANCH_NAME == "develop" || $CI_MERGE_REQUEST_TARGET_BRANCH_NAME == $CI_DEFAULT_BRANCH)' diff --git a/src/automation/.java-version b/src/ztp/.java-version similarity index 100% rename from src/automation/.java-version rename to src/ztp/.java-version diff --git a/src/automation/.mvn/wrapper/MavenWrapperDownloader.java b/src/ztp/.mvn/wrapper/MavenWrapperDownloader.java similarity index 100% rename from src/automation/.mvn/wrapper/MavenWrapperDownloader.java rename to src/ztp/.mvn/wrapper/MavenWrapperDownloader.java diff --git a/src/automation/.mvn/wrapper/maven-wrapper.jar b/src/ztp/.mvn/wrapper/maven-wrapper.jar similarity index 100% rename from src/automation/.mvn/wrapper/maven-wrapper.jar rename to src/ztp/.mvn/wrapper/maven-wrapper.jar diff --git a/src/automation/.mvn/wrapper/maven-wrapper.properties b/src/ztp/.mvn/wrapper/maven-wrapper.properties similarity index 100% rename from src/automation/.mvn/wrapper/maven-wrapper.properties rename to src/ztp/.mvn/wrapper/maven-wrapper.properties diff --git a/src/automation/Dockerfile b/src/ztp/Dockerfile similarity index 100% rename from src/automation/Dockerfile rename to src/ztp/Dockerfile diff --git a/src/automation/README.md b/src/ztp/README.md similarity index 69% rename from src/automation/README.md rename to src/ztp/README.md index e98d2b8ab62563f43cf2c1011e91fb2a1d08d378..54454464e40ed86101d84b8d69e38287d17b07de 100644 --- a/src/automation/README.md +++ b/src/ztp/README.md @@ -1,25 +1,25 @@ -# TeraFlowSDN Automation service +# TeraFlowSDN Ztp service -This repository hosts the TeraFlowSDN Automation service, also known as Zero-Touch Provisioning (ZTP) service. +This repository hosts the TeraFlowSDN Ztp service, also known as Zero-Touch Provisioning (ZTP) service. Follow the instructions below to build, test, and run this service on your local environment. -## TeraFlowSDN Automation service architecture +## TeraFlowSDN Ztp service architecture -The TeraFlowSDN Automation architecture consists of six (6) interfaces listed below: +The TeraFlowSDN Ztp architecture consists of six (6) interfaces listed below: Interfaces | |----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------| -| 1. The `AutomationGateway` interface that implements all the RPC functions that are described in `automation.proto` file. | +| 1. The `ZtpGateway` interface that implements all the RPC functions that are described in `ztp.proto` file. | | 2. The `ContextGateway` interface that communicates with a `Context` Service gRPC client to invoke key RPC functions described in `context.proto` file. | | 3. The `DeviceGateway` interface that communicates with a `Device` Service gRPC client to invoke key RPC functions described in `device.proto` file. | -| 4. The `AutomationService` interface that implements the `addDevice()`, `updateDevice()`, and `deleteDevice()` methods by communicating with a `Context` gRPC client and a `Device` gRPC client through the use of `ContextService` interface and `DeviceService` interface respectively. | +| 4. The `ZtpService` interface that implements the `addDevice()`, `updateDevice()`, and `deleteDevice()` methods by communicating with a `Context` gRPC client and a `Device` gRPC client through the use of `ContextService` interface and `DeviceService` interface respectively. | | 5. The `ContextService` interface that implements the `getDevice()` and `getDeviceEvents()` methods by communicating with a `Context` gRPC client through the use of `ContextGateway` interface. | | 6. The `DeviceService` interface that implements the `getInitialConfiguration()`, `configureDevice()`, and `deleteDevice()` methods by communicating with a `Device` gRPC client through the use of `DeviceGateway` interface. | ## Prerequisites -The Automation service is currently tested against Ubuntu 20.04 and Java 11. +The Ztp service is currently tested against Ubuntu 20.04 and Java 11. To quickly install Java 11 on a Debian-based Linux distro do: @@ -64,7 +64,7 @@ To create the K8s manifest file under `target/kubernetes/kubernetes.yml` to be u To deploy the application in a K8s cluster run ```bash -kubectl apply -f "manifests/automationservice.yaml" +kubectl apply -f "manifests/ztpservice.yaml" ``` ## Maintainers diff --git a/src/automation/mvnw b/src/ztp/mvnw similarity index 100% rename from src/automation/mvnw rename to src/ztp/mvnw diff --git a/src/automation/mvnw.cmd b/src/ztp/mvnw.cmd similarity index 100% rename from src/automation/mvnw.cmd rename to src/ztp/mvnw.cmd diff --git a/src/automation/pom.xml b/src/ztp/pom.xml similarity index 98% rename from src/automation/pom.xml rename to src/ztp/pom.xml index 7dfc3dac438fa5df740381be0ef595a5734d7699..aeadbc57240032edcaf40960fcd8df3b5a48d2b5 100644 --- a/src/automation/pom.xml +++ b/src/ztp/pom.xml @@ -20,10 +20,10 @@ 4.0.0 eu.teraflow - automation + ztp 0.2.0 - TeraFlow Automation Component - TeraFlow Automation Component + TeraFlow ZTP Component + TeraFlow ZTP Component 11 @@ -297,7 +297,7 @@ ${jacoco.version} - automation/* + ztp/* context/* device/* monitoring/* diff --git a/src/automation/src/main/docker/Dockerfile.multistage.jvm b/src/ztp/src/main/docker/Dockerfile.multistage.jvm similarity index 100% rename from src/automation/src/main/docker/Dockerfile.multistage.jvm rename to src/ztp/src/main/docker/Dockerfile.multistage.jvm diff --git a/src/automation/src/main/java/eu/teraflow/automation/ContextSubscriber.java b/src/ztp/src/main/java/eu/teraflow/ztp/ContextSubscriber.java similarity index 79% rename from src/automation/src/main/java/eu/teraflow/automation/ContextSubscriber.java rename to src/ztp/src/main/java/eu/teraflow/ztp/ContextSubscriber.java index 4813da7bfdeaf7c24b1892e2a4d596aa596c3674..0d2c63209eaed3b9c9c19b6bd3ba6f7e561914f1 100644 --- a/src/automation/src/main/java/eu/teraflow/automation/ContextSubscriber.java +++ b/src/ztp/src/main/java/eu/teraflow/ztp/ContextSubscriber.java @@ -14,11 +14,11 @@ * limitations under the License. */ -package eu.teraflow.automation; +package eu.teraflow.ztp; -import eu.teraflow.automation.context.ContextService; -import eu.teraflow.automation.context.model.Event; -import eu.teraflow.automation.context.model.EventTypeEnum; +import eu.teraflow.ztp.context.ContextService; +import eu.teraflow.ztp.context.model.Event; +import eu.teraflow.ztp.context.model.EventTypeEnum; import io.quarkus.runtime.StartupEvent; import java.time.Duration; import javax.enterprise.context.ApplicationScoped; @@ -32,17 +32,15 @@ public class ContextSubscriber { private static final Logger LOGGER = Logger.getLogger(ContextSubscriber.class); private final ContextService contextService; - private final AutomationService automationService; - private final AutomationConfiguration automationConfiguration; + private final ZtpService ztpService; + private final ZtpConfiguration ztpConfiguration; @Inject public ContextSubscriber( - ContextService contextService, - AutomationService automationService, - AutomationConfiguration automationConfiguration) { + ContextService contextService, ZtpService ztpService, ZtpConfiguration ztpConfiguration) { this.contextService = contextService; - this.automationService = automationService; - this.automationConfiguration = automationConfiguration; + this.ztpService = ztpService; + this.ztpConfiguration = ztpConfiguration; } public void listenForDeviceEvents() { @@ -71,16 +69,16 @@ public class ContextSubscriber { switch (eventType) { case CREATE: LOGGER.infof("Received %s for device [%s]", event, deviceId); - automationService.addDevice(deviceEvent.getDeviceId()); + ztpService.addDevice(deviceEvent.getDeviceId()); break; case REMOVE: LOGGER.infof("Received %s for device [%s]", event, deviceId); - automationService.deleteDevice(deviceEvent.getDeviceId()); + ztpService.deleteDevice(deviceEvent.getDeviceId()); break; case UPDATE: LOGGER.warnf( "Received %s for device [%s]. " - + "No automation action on an already updated device", + + "No ztp action on an already updated device", event, deviceId); break; case UNDEFINED: @@ -92,7 +90,7 @@ public class ContextSubscriber { void onStart(@Observes StartupEvent ev) { - if (automationConfiguration.shouldSubscribeToContextComponent()) { + if (ztpConfiguration.shouldSubscribeToContextComponent()) { LOGGER.info("Subscribing to Context service for device events..."); listenForDeviceEvents(); } else { diff --git a/src/automation/src/main/java/eu/teraflow/automation/Serializer.java b/src/ztp/src/main/java/eu/teraflow/ztp/Serializer.java similarity index 92% rename from src/automation/src/main/java/eu/teraflow/automation/Serializer.java rename to src/ztp/src/main/java/eu/teraflow/ztp/Serializer.java index 3d5c93b2c60da6872bca019936eba5524191ad12..e1196bb600382327295966cfe7bb4539f543b976 100644 --- a/src/automation/src/main/java/eu/teraflow/automation/Serializer.java +++ b/src/ztp/src/main/java/eu/teraflow/ztp/Serializer.java @@ -14,11 +14,9 @@ * limitations under the License. */ -package eu.teraflow.automation; +package eu.teraflow.ztp; import acl.Acl; -import automation.Automation; -import automation.Automation.ZtpDeviceState; import context.ContextOuterClass; import context.ContextOuterClass.ConfigRule_ACL; import context.ContextOuterClass.ConfigRule_Custom; @@ -27,43 +25,45 @@ import context.ContextOuterClass.DeviceId; import context.ContextOuterClass.DeviceOperationalStatusEnum; import context.ContextOuterClass.Location.LocationCase; import context.ContextOuterClass.Uuid; -import eu.teraflow.automation.acl.AclAction; -import eu.teraflow.automation.acl.AclEntry; -import eu.teraflow.automation.acl.AclForwardActionEnum; -import eu.teraflow.automation.acl.AclLogActionEnum; -import eu.teraflow.automation.acl.AclMatch; -import eu.teraflow.automation.acl.AclRuleSet; -import eu.teraflow.automation.acl.AclRuleTypeEnum; -import eu.teraflow.automation.context.model.ConfigActionEnum; -import eu.teraflow.automation.context.model.ConfigRule; -import eu.teraflow.automation.context.model.ConfigRuleAcl; -import eu.teraflow.automation.context.model.ConfigRuleCustom; -import eu.teraflow.automation.context.model.ConfigRuleTypeAcl; -import eu.teraflow.automation.context.model.ConfigRuleTypeCustom; -import eu.teraflow.automation.context.model.Device; -import eu.teraflow.automation.context.model.DeviceConfig; -import eu.teraflow.automation.context.model.DeviceDriverEnum; -import eu.teraflow.automation.context.model.DeviceEvent; -import eu.teraflow.automation.context.model.DeviceOperationalStatus; -import eu.teraflow.automation.context.model.Empty; -import eu.teraflow.automation.context.model.EndPoint; -import eu.teraflow.automation.context.model.EndPointId; -import eu.teraflow.automation.context.model.Event; -import eu.teraflow.automation.context.model.EventTypeEnum; -import eu.teraflow.automation.context.model.GpsPosition; -import eu.teraflow.automation.context.model.Location; -import eu.teraflow.automation.context.model.LocationTypeGpsPosition; -import eu.teraflow.automation.context.model.LocationTypeRegion; -import eu.teraflow.automation.context.model.TopologyId; -import eu.teraflow.automation.kpi_sample_types.model.KpiSampleType; -import eu.teraflow.automation.model.DeviceRole; -import eu.teraflow.automation.model.DeviceRoleConfig; -import eu.teraflow.automation.model.DeviceRoleId; -import eu.teraflow.automation.model.DeviceRoleType; -import eu.teraflow.automation.model.DeviceState; +import eu.teraflow.ztp.acl.AclAction; +import eu.teraflow.ztp.acl.AclEntry; +import eu.teraflow.ztp.acl.AclForwardActionEnum; +import eu.teraflow.ztp.acl.AclLogActionEnum; +import eu.teraflow.ztp.acl.AclMatch; +import eu.teraflow.ztp.acl.AclRuleSet; +import eu.teraflow.ztp.acl.AclRuleTypeEnum; +import eu.teraflow.ztp.context.model.ConfigActionEnum; +import eu.teraflow.ztp.context.model.ConfigRule; +import eu.teraflow.ztp.context.model.ConfigRuleAcl; +import eu.teraflow.ztp.context.model.ConfigRuleCustom; +import eu.teraflow.ztp.context.model.ConfigRuleTypeAcl; +import eu.teraflow.ztp.context.model.ConfigRuleTypeCustom; +import eu.teraflow.ztp.context.model.Device; +import eu.teraflow.ztp.context.model.DeviceConfig; +import eu.teraflow.ztp.context.model.DeviceDriverEnum; +import eu.teraflow.ztp.context.model.DeviceEvent; +import eu.teraflow.ztp.context.model.DeviceOperationalStatus; +import eu.teraflow.ztp.context.model.Empty; +import eu.teraflow.ztp.context.model.EndPoint; +import eu.teraflow.ztp.context.model.EndPointId; +import eu.teraflow.ztp.context.model.Event; +import eu.teraflow.ztp.context.model.EventTypeEnum; +import eu.teraflow.ztp.context.model.GpsPosition; +import eu.teraflow.ztp.context.model.Location; +import eu.teraflow.ztp.context.model.LocationTypeGpsPosition; +import eu.teraflow.ztp.context.model.LocationTypeRegion; +import eu.teraflow.ztp.context.model.TopologyId; +import eu.teraflow.ztp.kpi_sample_types.model.KpiSampleType; +import eu.teraflow.ztp.model.DeviceRole; +import eu.teraflow.ztp.model.DeviceRoleConfig; +import eu.teraflow.ztp.model.DeviceRoleId; +import eu.teraflow.ztp.model.DeviceRoleType; +import eu.teraflow.ztp.model.DeviceState; import java.util.stream.Collectors; import javax.inject.Singleton; import kpi_sample_types.KpiSampleTypes; +import ztp.Ztp; +import ztp.Ztp.ZtpDeviceState; @Singleton public class Serializer { @@ -81,8 +81,8 @@ public class Serializer { return deviceId.getDeviceUuid().getUuid(); } - public Automation.DeviceRoleId serialize(DeviceRoleId deviceRoleId) { - final var builder = Automation.DeviceRoleId.newBuilder(); + public Ztp.DeviceRoleId serialize(DeviceRoleId deviceRoleId) { + final var builder = Ztp.DeviceRoleId.newBuilder(); final var deviceRoleDevRoleId = deviceRoleId.getId(); final var deviceRoleDeviceId = deviceRoleId.getDeviceId(); @@ -98,29 +98,29 @@ public class Serializer { return builder.build(); } - public DeviceRoleId deserialize(Automation.DeviceRoleId deviceRoleId) { + public DeviceRoleId deserialize(Ztp.DeviceRoleId deviceRoleId) { final var devRoleId = deserialize(deviceRoleId.getDevRoleId()); final var devId = deserialize(deviceRoleId.getDevId()); return new DeviceRoleId(devRoleId, devId); } - public Automation.DeviceRoleType serialize(DeviceRoleType deviceRoleType) { + public Ztp.DeviceRoleType serialize(DeviceRoleType deviceRoleType) { switch (deviceRoleType) { case NONE: - return Automation.DeviceRoleType.NONE; + return Ztp.DeviceRoleType.NONE; case DEV_OPS: - return Automation.DeviceRoleType.DEV_OPS; + return Ztp.DeviceRoleType.DEV_OPS; case DEV_CONF: - return Automation.DeviceRoleType.DEV_CONF; + return Ztp.DeviceRoleType.DEV_CONF; case PIPELINE_CONF: - return Automation.DeviceRoleType.PIPELINE_CONF; + return Ztp.DeviceRoleType.PIPELINE_CONF; default: - return Automation.DeviceRoleType.UNRECOGNIZED; + return Ztp.DeviceRoleType.UNRECOGNIZED; } } - public DeviceRoleType deserialize(Automation.DeviceRoleType serializedDeviceRoleType) { + public DeviceRoleType deserialize(Ztp.DeviceRoleType serializedDeviceRoleType) { switch (serializedDeviceRoleType) { case DEV_OPS: return DeviceRoleType.DEV_OPS; @@ -135,7 +135,7 @@ public class Serializer { } } - public Automation.ZtpDeviceState serialize(DeviceState deviceState) { + public Ztp.ZtpDeviceState serialize(DeviceState deviceState) { switch (deviceState) { case CREATED: return ZtpDeviceState.ZTP_DEV_STATE_CREATED; @@ -150,7 +150,7 @@ public class Serializer { } } - public DeviceState deserialize(Automation.ZtpDeviceState serializedDeviceState) { + public DeviceState deserialize(Ztp.ZtpDeviceState serializedDeviceState) { switch (serializedDeviceState) { case ZTP_DEV_STATE_CREATED: return DeviceState.CREATED; @@ -165,8 +165,8 @@ public class Serializer { } } - public Automation.DeviceRole serialize(DeviceRole deviceRole) { - final var builder = Automation.DeviceRole.newBuilder(); + public Ztp.DeviceRole serialize(DeviceRole deviceRole) { + final var builder = Ztp.DeviceRole.newBuilder(); final var serializedDeviceRoleId = serialize(deviceRole.getDeviceRoleId()); final var serializedDeviceRoleType = serialize(deviceRole.getType()); @@ -176,15 +176,15 @@ public class Serializer { return builder.build(); } - public DeviceRole deserialize(Automation.DeviceRole deviceRole) { + public DeviceRole deserialize(Ztp.DeviceRole deviceRole) { final var deviceRoleId = deserialize(deviceRole.getDevRoleId()); final var deviceRoleType = deserialize(deviceRole.getDevRoleType()); return new DeviceRole(deviceRoleId, deviceRoleType); } - public Automation.DeviceRoleConfig serialize(DeviceRoleConfig deviceRoleConfig) { - final var builder = Automation.DeviceRoleConfig.newBuilder(); + public Ztp.DeviceRoleConfig serialize(DeviceRoleConfig deviceRoleConfig) { + final var builder = Ztp.DeviceRoleConfig.newBuilder(); final var serializedDeviceRole = serialize(deviceRoleConfig.getDeviceRole()); final var serializedDeviceConfig = serialize(deviceRoleConfig.getDeviceConfig()); @@ -194,7 +194,7 @@ public class Serializer { return builder.build(); } - public DeviceRoleConfig deserialize(Automation.DeviceRoleConfig deviceRoleConfig) { + public DeviceRoleConfig deserialize(Ztp.DeviceRoleConfig deviceRoleConfig) { final var deviceRole = deserialize(deviceRoleConfig.getDevRole()); final var deviceConfig = deserialize(deviceRoleConfig.getDevConfig()); diff --git a/src/automation/src/main/java/eu/teraflow/automation/SimpleLivenessCheck.java b/src/ztp/src/main/java/eu/teraflow/ztp/SimpleLivenessCheck.java similarity index 90% rename from src/automation/src/main/java/eu/teraflow/automation/SimpleLivenessCheck.java rename to src/ztp/src/main/java/eu/teraflow/ztp/SimpleLivenessCheck.java index 7b7a3b0753dc8591fd44d800495ec80f822a4f93..b5d40e903e585664ea9fe975a82afb6236db33a5 100644 --- a/src/automation/src/main/java/eu/teraflow/automation/SimpleLivenessCheck.java +++ b/src/ztp/src/main/java/eu/teraflow/ztp/SimpleLivenessCheck.java @@ -14,7 +14,7 @@ * limitations under the License. */ -package eu.teraflow.automation; +package eu.teraflow.ztp; import javax.enterprise.context.ApplicationScoped; import org.eclipse.microprofile.health.HealthCheck; @@ -27,6 +27,6 @@ public class SimpleLivenessCheck implements HealthCheck { @Override public HealthCheckResponse call() { - return HealthCheckResponse.up("Automation Service is live"); + return HealthCheckResponse.up("Ztp Service is live"); } } diff --git a/src/automation/src/main/java/eu/teraflow/automation/SimpleReadinessCheck.java b/src/ztp/src/main/java/eu/teraflow/ztp/SimpleReadinessCheck.java similarity index 90% rename from src/automation/src/main/java/eu/teraflow/automation/SimpleReadinessCheck.java rename to src/ztp/src/main/java/eu/teraflow/ztp/SimpleReadinessCheck.java index c9fd4855b7a2e9f5853b7cd9fbea5d896560723e..d98b3370d99c72d0ad259efc3f6d69d4ebe9f9fa 100644 --- a/src/automation/src/main/java/eu/teraflow/automation/SimpleReadinessCheck.java +++ b/src/ztp/src/main/java/eu/teraflow/ztp/SimpleReadinessCheck.java @@ -14,7 +14,7 @@ * limitations under the License. */ -package eu.teraflow.automation; +package eu.teraflow.ztp; import javax.enterprise.context.ApplicationScoped; import org.eclipse.microprofile.health.HealthCheck; @@ -28,6 +28,6 @@ public class SimpleReadinessCheck implements HealthCheck { @Override public HealthCheckResponse call() { - return HealthCheckResponse.up("Automation Service is ready"); + return HealthCheckResponse.up("Ztp Service is ready"); } } diff --git a/src/automation/src/main/java/eu/teraflow/automation/AutomationConfiguration.java b/src/ztp/src/main/java/eu/teraflow/ztp/ZtpConfiguration.java similarity index 86% rename from src/automation/src/main/java/eu/teraflow/automation/AutomationConfiguration.java rename to src/ztp/src/main/java/eu/teraflow/ztp/ZtpConfiguration.java index 071e8f152da60017d7fb5563ed5e498156a49c37..4e0ab96fa016ea26640949f7c14e5f420e289c03 100644 --- a/src/automation/src/main/java/eu/teraflow/automation/AutomationConfiguration.java +++ b/src/ztp/src/main/java/eu/teraflow/ztp/ZtpConfiguration.java @@ -14,12 +14,12 @@ * limitations under the License. */ -package eu.teraflow.automation; +package eu.teraflow.ztp; import io.smallrye.config.ConfigMapping; -@ConfigMapping(prefix = "automation") -public interface AutomationConfiguration { +@ConfigMapping(prefix = "ztp") +public interface ZtpConfiguration { boolean shouldSubscribeToContextComponent(); } diff --git a/src/automation/src/main/java/eu/teraflow/automation/AutomationGateway.java b/src/ztp/src/main/java/eu/teraflow/ztp/ZtpGateway.java similarity index 82% rename from src/automation/src/main/java/eu/teraflow/automation/AutomationGateway.java rename to src/ztp/src/main/java/eu/teraflow/ztp/ZtpGateway.java index 53803f51657d96475db8828f123cdefbb443f0ab..69b3f5550906b46acadb1de363760c843708e7ba 100644 --- a/src/automation/src/main/java/eu/teraflow/automation/AutomationGateway.java +++ b/src/ztp/src/main/java/eu/teraflow/ztp/ZtpGateway.java @@ -14,8 +14,8 @@ * limitations under the License. */ -package eu.teraflow.automation; +package eu.teraflow.ztp; -import automation.AutomationService; +import ztp.ZtpService; -public interface AutomationGateway extends AutomationService {} +public interface ZtpGateway extends ZtpService {} diff --git a/src/automation/src/main/java/eu/teraflow/automation/AutomationGatewayImpl.java b/src/ztp/src/main/java/eu/teraflow/ztp/ZtpGatewayImpl.java similarity index 53% rename from src/automation/src/main/java/eu/teraflow/automation/AutomationGatewayImpl.java rename to src/ztp/src/main/java/eu/teraflow/ztp/ZtpGatewayImpl.java index 217c76671cbb8524c7f0c0218e83fedc5e52bdb0..bc56048178cb5b301415a233af24d6d40be70605 100644 --- a/src/automation/src/main/java/eu/teraflow/automation/AutomationGatewayImpl.java +++ b/src/ztp/src/main/java/eu/teraflow/ztp/ZtpGatewayImpl.java @@ -14,102 +14,100 @@ * limitations under the License. */ -package eu.teraflow.automation; +package eu.teraflow.ztp; -import automation.Automation; -import automation.Automation.DeviceRoleConfig; -import automation.Automation.DeviceRoleState; import context.ContextOuterClass; -import eu.teraflow.automation.context.model.Device; -import eu.teraflow.automation.model.DeviceRoleId; -import eu.teraflow.automation.model.DeviceState; +import eu.teraflow.ztp.context.model.Device; +import eu.teraflow.ztp.model.DeviceRoleId; +import eu.teraflow.ztp.model.DeviceState; 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 ztp.Ztp; +import ztp.Ztp.DeviceRoleConfig; +import ztp.Ztp.DeviceRoleState; @GrpcService -public class AutomationGatewayImpl implements AutomationGateway { +public class ZtpGatewayImpl implements ZtpGateway { - private final AutomationService automationService; + private final ZtpService ztpService; private final Serializer serializer; @Inject - public AutomationGatewayImpl(AutomationService automationService, Serializer serializer) { - this.automationService = automationService; + public ZtpGatewayImpl(ZtpService ztpService, Serializer serializer) { + this.ztpService = ztpService; this.serializer = serializer; } @Override - @Counted(name = "automation_ztpGetDeviceRole_counter") - @Timed(name = "automation_ztpGetDeviceRole_histogram", unit = MetricUnits.MILLISECONDS) - public Uni ztpGetDeviceRole(Automation.DeviceRoleId request) { - return Uni.createFrom() - .item(() -> Automation.DeviceRole.newBuilder().setDevRoleId(request).build()); + @Counted(name = "ztp_ztpGetDeviceRole_counter") + @Timed(name = "ztp_ztpGetDeviceRole_histogram", unit = MetricUnits.MILLISECONDS) + public Uni ztpGetDeviceRole(Ztp.DeviceRoleId request) { + return Uni.createFrom().item(() -> Ztp.DeviceRole.newBuilder().setDevRoleId(request).build()); } @Override - @Counted(name = "automation_ztpGetDeviceRolesByDeviceId_counter") - @Timed(name = "automation_ztpGetDeviceRolesByDeviceId_histogram", unit = MetricUnits.MILLISECONDS) - public Uni ztpGetDeviceRolesByDeviceId( - ContextOuterClass.DeviceId request) { - return Uni.createFrom().item(() -> Automation.DeviceRoleList.newBuilder().build()); + @Counted(name = "ztp_ztpGetDeviceRolesByDeviceId_counter") + @Timed(name = "ztp_ztpGetDeviceRolesByDeviceId_histogram", unit = MetricUnits.MILLISECONDS) + public Uni ztpGetDeviceRolesByDeviceId(ContextOuterClass.DeviceId request) { + return Uni.createFrom().item(() -> Ztp.DeviceRoleList.newBuilder().build()); } @Override - @Counted(name = "automation_ztpAdd_counter") - @Timed(name = "automation_ztpAdd_histogram", unit = MetricUnits.MILLISECONDS) - public Uni ztpAdd(Automation.DeviceRole request) { + @Counted(name = "ztp_ztpAdd_counter") + @Timed(name = "ztp_ztpAdd_histogram", unit = MetricUnits.MILLISECONDS) + public Uni ztpAdd(Ztp.DeviceRole request) { final var devRoleId = request.getDevRoleId().getDevRoleId().getUuid(); final var deviceId = serializer.deserialize(request.getDevRoleId().getDevId()); - return automationService + return ztpService .addDevice(deviceId) .onItem() .transform(device -> transformToDeviceRoleState(device, devRoleId, DeviceState.CREATED)); } @Override - @Counted(name = "automation_ztpUpdate_counter") - @Timed(name = "automation_ztpUpdate_histogram", unit = MetricUnits.MILLISECONDS) + @Counted(name = "ztp_ztpUpdate_counter") + @Timed(name = "ztp_ztpUpdate_histogram", unit = MetricUnits.MILLISECONDS) public Uni ztpUpdate(DeviceRoleConfig request) { final var devRoleId = request.getDevRole().getDevRoleId().getDevRoleId().getUuid(); final var deviceId = serializer.deserialize(request.getDevRole().getDevRoleId().getDevId()); final var deviceConfig = serializer.deserialize(request.getDevConfig()); - return automationService + return ztpService .updateDevice(deviceId, deviceConfig) .onItem() .transform(device -> transformToDeviceRoleState(device, devRoleId, DeviceState.UPDATED)); } @Override - @Counted(name = "automation_ztpDelete_counter") - @Timed(name = "automation_ztpDelete_histogram", unit = MetricUnits.MILLISECONDS) - public Uni ztpDelete(Automation.DeviceRole request) { + @Counted(name = "ztp_ztpDelete_counter") + @Timed(name = "ztp_ztpDelete_histogram", unit = MetricUnits.MILLISECONDS) + public Uni ztpDelete(Ztp.DeviceRole request) { final var devRoleId = request.getDevRoleId().getDevRoleId().getUuid(); - return automationService + return ztpService .deleteDevice(devRoleId) .onItem() .transform(device -> transformToDeviceRoleState(device, devRoleId, DeviceState.DELETED)); } @Override - @Counted(name = "automation_ztpDeleteAll_counter") - @Timed(name = "automation_ztpDeleteAll_histogram", unit = MetricUnits.MILLISECONDS) - public Uni ztpDeleteAll(ContextOuterClass.Empty empty) { - return Uni.createFrom().item(() -> Automation.DeviceDeletionResult.newBuilder().build()); + @Counted(name = "ztp_ztpDeleteAll_counter") + @Timed(name = "ztp_ztpDeleteAll_histogram", unit = MetricUnits.MILLISECONDS) + public Uni ztpDeleteAll(ContextOuterClass.Empty empty) { + return Uni.createFrom().item(() -> Ztp.DeviceDeletionResult.newBuilder().build()); } - private Automation.DeviceRoleState transformToDeviceRoleState( + private Ztp.DeviceRoleState transformToDeviceRoleState( Device device, String devRoleId, DeviceState deviceState) { final var deviceRoleId = new DeviceRoleId(devRoleId, device.getDeviceId()); final var serializeDeviceRoleId = serializer.serialize(deviceRoleId); final var serializedDeviceState = serializer.serialize(deviceState); - return Automation.DeviceRoleState.newBuilder() + return Ztp.DeviceRoleState.newBuilder() .setDevRoleId(serializeDeviceRoleId) .setDevRoleState(serializedDeviceState) .build(); diff --git a/src/automation/src/main/java/eu/teraflow/automation/AutomationService.java b/src/ztp/src/main/java/eu/teraflow/ztp/ZtpService.java similarity index 82% rename from src/automation/src/main/java/eu/teraflow/automation/AutomationService.java rename to src/ztp/src/main/java/eu/teraflow/ztp/ZtpService.java index 9e3874eb2f97e4e47bc0b4a061a40c394eeb1ed4..a86aec75e1700022cf59fca33f917a4efd842418 100644 --- a/src/automation/src/main/java/eu/teraflow/automation/AutomationService.java +++ b/src/ztp/src/main/java/eu/teraflow/ztp/ZtpService.java @@ -14,13 +14,13 @@ * limitations under the License. */ -package eu.teraflow.automation; +package eu.teraflow.ztp; -import eu.teraflow.automation.context.model.Device; -import eu.teraflow.automation.context.model.DeviceConfig; +import eu.teraflow.ztp.context.model.Device; +import eu.teraflow.ztp.context.model.DeviceConfig; import io.smallrye.mutiny.Uni; -public interface AutomationService { +public interface ZtpService { Uni addDevice(String deviceId); diff --git a/src/automation/src/main/java/eu/teraflow/automation/AutomationServiceImpl.java b/src/ztp/src/main/java/eu/teraflow/ztp/ZtpServiceImpl.java similarity index 92% rename from src/automation/src/main/java/eu/teraflow/automation/AutomationServiceImpl.java rename to src/ztp/src/main/java/eu/teraflow/ztp/ZtpServiceImpl.java index 017a101fb1a5b35b018a775d36f24480104f586f..f4bbfc3f79ecdc73b49795ecb9dbd3efe0458f88 100644 --- a/src/automation/src/main/java/eu/teraflow/automation/AutomationServiceImpl.java +++ b/src/ztp/src/main/java/eu/teraflow/ztp/ZtpServiceImpl.java @@ -14,27 +14,27 @@ * limitations under the License. */ -package eu.teraflow.automation; +package eu.teraflow.ztp; -import eu.teraflow.automation.context.ContextService; -import eu.teraflow.automation.context.model.Device; -import eu.teraflow.automation.context.model.DeviceConfig; -import eu.teraflow.automation.device.DeviceService; +import eu.teraflow.ztp.context.ContextService; +import eu.teraflow.ztp.context.model.Device; +import eu.teraflow.ztp.context.model.DeviceConfig; +import eu.teraflow.ztp.device.DeviceService; import io.smallrye.mutiny.Uni; import javax.enterprise.context.ApplicationScoped; import javax.inject.Inject; import org.jboss.logging.Logger; @ApplicationScoped -public class AutomationServiceImpl implements AutomationService { - private static final Logger LOGGER = Logger.getLogger(AutomationServiceImpl.class); +public class ZtpServiceImpl implements ZtpService { + private static final Logger LOGGER = Logger.getLogger(ZtpServiceImpl.class); // private static final String MESSAGE = "Retrieved %s"; private final DeviceService deviceService; private final ContextService contextService; @Inject - public AutomationServiceImpl(DeviceService deviceService, ContextService contextService) { + public ZtpServiceImpl(DeviceService deviceService, ContextService contextService) { this.deviceService = deviceService; this.contextService = contextService; } diff --git a/src/automation/src/main/java/eu/teraflow/automation/acl/AclAction.java b/src/ztp/src/main/java/eu/teraflow/ztp/acl/AclAction.java similarity index 97% rename from src/automation/src/main/java/eu/teraflow/automation/acl/AclAction.java rename to src/ztp/src/main/java/eu/teraflow/ztp/acl/AclAction.java index 29109f15bbb288697b837f69d85cf5d365c83319..4f2b3c717490401392242a634d34862c540970d1 100644 --- a/src/automation/src/main/java/eu/teraflow/automation/acl/AclAction.java +++ b/src/ztp/src/main/java/eu/teraflow/ztp/acl/AclAction.java @@ -14,7 +14,7 @@ * limitations under the License. */ -package eu.teraflow.automation.acl; +package eu.teraflow.ztp.acl; public class AclAction { diff --git a/src/automation/src/main/java/eu/teraflow/automation/acl/AclEntry.java b/src/ztp/src/main/java/eu/teraflow/ztp/acl/AclEntry.java similarity index 97% rename from src/automation/src/main/java/eu/teraflow/automation/acl/AclEntry.java rename to src/ztp/src/main/java/eu/teraflow/ztp/acl/AclEntry.java index 6cecdd553d811587e9126bf323ce8019b57fc071..78ff008c8964333932a09cd32b7c4788713f2e04 100644 --- a/src/automation/src/main/java/eu/teraflow/automation/acl/AclEntry.java +++ b/src/ztp/src/main/java/eu/teraflow/ztp/acl/AclEntry.java @@ -14,7 +14,7 @@ * limitations under the License. */ -package eu.teraflow.automation.acl; +package eu.teraflow.ztp.acl; public class AclEntry { diff --git a/src/automation/src/main/java/eu/teraflow/automation/acl/AclForwardActionEnum.java b/src/ztp/src/main/java/eu/teraflow/ztp/acl/AclForwardActionEnum.java similarity index 95% rename from src/automation/src/main/java/eu/teraflow/automation/acl/AclForwardActionEnum.java rename to src/ztp/src/main/java/eu/teraflow/ztp/acl/AclForwardActionEnum.java index e136a52fe259d67df2a5f9ee2c70a4e15f9d6034..86afe71de10dd07cb27d317cc433e0d38bd02b67 100644 --- a/src/automation/src/main/java/eu/teraflow/automation/acl/AclForwardActionEnum.java +++ b/src/ztp/src/main/java/eu/teraflow/ztp/acl/AclForwardActionEnum.java @@ -14,7 +14,7 @@ * limitations under the License. */ -package eu.teraflow.automation.acl; +package eu.teraflow.ztp.acl; public enum AclForwardActionEnum { UNDEFINED, diff --git a/src/automation/src/main/java/eu/teraflow/automation/acl/AclLogActionEnum.java b/src/ztp/src/main/java/eu/teraflow/ztp/acl/AclLogActionEnum.java similarity index 95% rename from src/automation/src/main/java/eu/teraflow/automation/acl/AclLogActionEnum.java rename to src/ztp/src/main/java/eu/teraflow/ztp/acl/AclLogActionEnum.java index 1baf1c4a94a8fd806f5b05548fa0cd9fe4eaf3c5..0c7223532dbeca92e23c0734737f50c7ccf65911 100644 --- a/src/automation/src/main/java/eu/teraflow/automation/acl/AclLogActionEnum.java +++ b/src/ztp/src/main/java/eu/teraflow/ztp/acl/AclLogActionEnum.java @@ -14,7 +14,7 @@ * limitations under the License. */ -package eu.teraflow.automation.acl; +package eu.teraflow.ztp.acl; public enum AclLogActionEnum { UNDEFINED, diff --git a/src/automation/src/main/java/eu/teraflow/automation/acl/AclMatch.java b/src/ztp/src/main/java/eu/teraflow/ztp/acl/AclMatch.java similarity index 98% rename from src/automation/src/main/java/eu/teraflow/automation/acl/AclMatch.java rename to src/ztp/src/main/java/eu/teraflow/ztp/acl/AclMatch.java index fa9eecf9f46493587c7b5573cbaca71f2865da09..513bcaece0e715964c0c934118b9b251686cf99e 100644 --- a/src/automation/src/main/java/eu/teraflow/automation/acl/AclMatch.java +++ b/src/ztp/src/main/java/eu/teraflow/ztp/acl/AclMatch.java @@ -14,7 +14,7 @@ * limitations under the License. */ -package eu.teraflow.automation.acl; +package eu.teraflow.ztp.acl; public class AclMatch { diff --git a/src/automation/src/main/java/eu/teraflow/automation/acl/AclRuleSet.java b/src/ztp/src/main/java/eu/teraflow/ztp/acl/AclRuleSet.java similarity index 96% rename from src/automation/src/main/java/eu/teraflow/automation/acl/AclRuleSet.java rename to src/ztp/src/main/java/eu/teraflow/ztp/acl/AclRuleSet.java index 9cf3a08f0d2fac9eb3033accbaa31ad14dc93598..2c5efbd383092ba4b2d3153052ad586d17ee2486 100644 --- a/src/automation/src/main/java/eu/teraflow/automation/acl/AclRuleSet.java +++ b/src/ztp/src/main/java/eu/teraflow/ztp/acl/AclRuleSet.java @@ -14,9 +14,9 @@ * limitations under the License. */ -package eu.teraflow.automation.acl; +package eu.teraflow.ztp.acl; -import eu.teraflow.automation.common.Util; +import eu.teraflow.ztp.common.Util; import java.util.List; public class AclRuleSet { diff --git a/src/automation/src/main/java/eu/teraflow/automation/acl/AclRuleTypeEnum.java b/src/ztp/src/main/java/eu/teraflow/ztp/acl/AclRuleTypeEnum.java similarity index 95% rename from src/automation/src/main/java/eu/teraflow/automation/acl/AclRuleTypeEnum.java rename to src/ztp/src/main/java/eu/teraflow/ztp/acl/AclRuleTypeEnum.java index f573721470e00dcba844961d65e4c79f83be4ffc..5abf7ab9ac992b4b4ffe39160427a05eed0408f7 100644 --- a/src/automation/src/main/java/eu/teraflow/automation/acl/AclRuleTypeEnum.java +++ b/src/ztp/src/main/java/eu/teraflow/ztp/acl/AclRuleTypeEnum.java @@ -14,7 +14,7 @@ * limitations under the License. */ -package eu.teraflow.automation.acl; +package eu.teraflow.ztp.acl; public enum AclRuleTypeEnum { UNDEFINED, diff --git a/src/automation/src/main/java/eu/teraflow/automation/common/Util.java b/src/ztp/src/main/java/eu/teraflow/ztp/common/Util.java similarity index 95% rename from src/automation/src/main/java/eu/teraflow/automation/common/Util.java rename to src/ztp/src/main/java/eu/teraflow/ztp/common/Util.java index aca4654578b6644d4e0566768255dbcc64b819af..f5135113c2876956def02ac8a0d61e788d72f1f8 100644 --- a/src/automation/src/main/java/eu/teraflow/automation/common/Util.java +++ b/src/ztp/src/main/java/eu/teraflow/ztp/common/Util.java @@ -14,7 +14,7 @@ * limitations under the License. */ -package eu.teraflow.automation.common; +package eu.teraflow.ztp.common; import java.util.List; import java.util.stream.Collectors; diff --git a/src/automation/src/main/java/eu/teraflow/automation/context/ContextGateway.java b/src/ztp/src/main/java/eu/teraflow/ztp/context/ContextGateway.java similarity index 84% rename from src/automation/src/main/java/eu/teraflow/automation/context/ContextGateway.java rename to src/ztp/src/main/java/eu/teraflow/ztp/context/ContextGateway.java index 8171b2225a6703e43b752c7306c2cb837628c8fc..0d835ee7315fe031d684efaa2f8ce39be1a7f977 100644 --- a/src/automation/src/main/java/eu/teraflow/automation/context/ContextGateway.java +++ b/src/ztp/src/main/java/eu/teraflow/ztp/context/ContextGateway.java @@ -14,10 +14,10 @@ * limitations under the License. */ -package eu.teraflow.automation.context; +package eu.teraflow.ztp.context; -import eu.teraflow.automation.context.model.Device; -import eu.teraflow.automation.context.model.DeviceEvent; +import eu.teraflow.ztp.context.model.Device; +import eu.teraflow.ztp.context.model.DeviceEvent; import io.smallrye.mutiny.Multi; import io.smallrye.mutiny.Uni; diff --git a/src/automation/src/main/java/eu/teraflow/automation/context/ContextGatewayImpl.java b/src/ztp/src/main/java/eu/teraflow/ztp/context/ContextGatewayImpl.java similarity index 90% rename from src/automation/src/main/java/eu/teraflow/automation/context/ContextGatewayImpl.java rename to src/ztp/src/main/java/eu/teraflow/ztp/context/ContextGatewayImpl.java index 6868f9175cc966d1c476c3cb5ad4f2e31d3d6516..286242fe11d1302db184abc37671dc2fa8162ec8 100644 --- a/src/automation/src/main/java/eu/teraflow/automation/context/ContextGatewayImpl.java +++ b/src/ztp/src/main/java/eu/teraflow/ztp/context/ContextGatewayImpl.java @@ -14,13 +14,13 @@ * limitations under the License. */ -package eu.teraflow.automation.context; +package eu.teraflow.ztp.context; import context.ContextOuterClass; import context.MutinyContextServiceGrpc.MutinyContextServiceStub; -import eu.teraflow.automation.Serializer; -import eu.teraflow.automation.context.model.Device; -import eu.teraflow.automation.context.model.DeviceEvent; +import eu.teraflow.ztp.Serializer; +import eu.teraflow.ztp.context.model.Device; +import eu.teraflow.ztp.context.model.DeviceEvent; import io.quarkus.grpc.GrpcClient; import io.smallrye.mutiny.Multi; import io.smallrye.mutiny.Uni; diff --git a/src/automation/src/main/java/eu/teraflow/automation/context/ContextService.java b/src/ztp/src/main/java/eu/teraflow/ztp/context/ContextService.java similarity index 84% rename from src/automation/src/main/java/eu/teraflow/automation/context/ContextService.java rename to src/ztp/src/main/java/eu/teraflow/ztp/context/ContextService.java index 8c3caf27a96c0efe875b5cb04839a7a6ef4f6ec1..d9942c16018bf91a72a4baa4d395beda01d3a3f8 100644 --- a/src/automation/src/main/java/eu/teraflow/automation/context/ContextService.java +++ b/src/ztp/src/main/java/eu/teraflow/ztp/context/ContextService.java @@ -14,10 +14,10 @@ * limitations under the License. */ -package eu.teraflow.automation.context; +package eu.teraflow.ztp.context; -import eu.teraflow.automation.context.model.Device; -import eu.teraflow.automation.context.model.DeviceEvent; +import eu.teraflow.ztp.context.model.Device; +import eu.teraflow.ztp.context.model.DeviceEvent; import io.smallrye.mutiny.Multi; import io.smallrye.mutiny.Uni; diff --git a/src/automation/src/main/java/eu/teraflow/automation/context/ContextServiceImpl.java b/src/ztp/src/main/java/eu/teraflow/ztp/context/ContextServiceImpl.java similarity index 89% rename from src/automation/src/main/java/eu/teraflow/automation/context/ContextServiceImpl.java rename to src/ztp/src/main/java/eu/teraflow/ztp/context/ContextServiceImpl.java index 4ec973ac75f752174036dd65df712ec28c52306a..7a2bca7c3fe57b999a72c0831758d0f83c837bf3 100644 --- a/src/automation/src/main/java/eu/teraflow/automation/context/ContextServiceImpl.java +++ b/src/ztp/src/main/java/eu/teraflow/ztp/context/ContextServiceImpl.java @@ -14,10 +14,10 @@ * limitations under the License. */ -package eu.teraflow.automation.context; +package eu.teraflow.ztp.context; -import eu.teraflow.automation.context.model.Device; -import eu.teraflow.automation.context.model.DeviceEvent; +import eu.teraflow.ztp.context.model.Device; +import eu.teraflow.ztp.context.model.DeviceEvent; import io.smallrye.mutiny.Multi; import io.smallrye.mutiny.Uni; import javax.enterprise.context.ApplicationScoped; diff --git a/src/automation/src/main/java/eu/teraflow/automation/context/model/ConfigActionEnum.java b/src/ztp/src/main/java/eu/teraflow/ztp/context/model/ConfigActionEnum.java similarity index 93% rename from src/automation/src/main/java/eu/teraflow/automation/context/model/ConfigActionEnum.java rename to src/ztp/src/main/java/eu/teraflow/ztp/context/model/ConfigActionEnum.java index 7ec48e8896374e3d8daa918da9b4646adb6f3e41..f85dc5a89cc71c0fcc9fe84e82f24a4e90113b60 100644 --- a/src/automation/src/main/java/eu/teraflow/automation/context/model/ConfigActionEnum.java +++ b/src/ztp/src/main/java/eu/teraflow/ztp/context/model/ConfigActionEnum.java @@ -14,7 +14,7 @@ * limitations under the License. */ -package eu.teraflow.automation.context.model; +package eu.teraflow.ztp.context.model; public enum ConfigActionEnum { UNDEFINED, diff --git a/src/automation/src/main/java/eu/teraflow/automation/context/model/ConfigRule.java b/src/ztp/src/main/java/eu/teraflow/ztp/context/model/ConfigRule.java similarity index 96% rename from src/automation/src/main/java/eu/teraflow/automation/context/model/ConfigRule.java rename to src/ztp/src/main/java/eu/teraflow/ztp/context/model/ConfigRule.java index 5825bd4983ce9a8bf02b5db7eaa416245c7f4052..a375101c1a53dbcfe6709b4647a5fbcee4198ca1 100644 --- a/src/automation/src/main/java/eu/teraflow/automation/context/model/ConfigRule.java +++ b/src/ztp/src/main/java/eu/teraflow/ztp/context/model/ConfigRule.java @@ -14,7 +14,7 @@ * limitations under the License. */ -package eu.teraflow.automation.context.model; +package eu.teraflow.ztp.context.model; public class ConfigRule { diff --git a/src/automation/src/main/java/eu/teraflow/automation/context/model/ConfigRuleAcl.java b/src/ztp/src/main/java/eu/teraflow/ztp/context/model/ConfigRuleAcl.java similarity index 92% rename from src/automation/src/main/java/eu/teraflow/automation/context/model/ConfigRuleAcl.java rename to src/ztp/src/main/java/eu/teraflow/ztp/context/model/ConfigRuleAcl.java index 774427abdb230bd3c6a99250a99d986a21ce3cc3..1a8942cf913cfcc7355b35614c9a0ffd910ce886 100644 --- a/src/automation/src/main/java/eu/teraflow/automation/context/model/ConfigRuleAcl.java +++ b/src/ztp/src/main/java/eu/teraflow/ztp/context/model/ConfigRuleAcl.java @@ -14,9 +14,9 @@ * limitations under the License. */ -package eu.teraflow.automation.context.model; +package eu.teraflow.ztp.context.model; -import eu.teraflow.automation.acl.AclRuleSet; +import eu.teraflow.ztp.acl.AclRuleSet; public class ConfigRuleAcl { diff --git a/src/automation/src/main/java/eu/teraflow/automation/context/model/ConfigRuleCustom.java b/src/ztp/src/main/java/eu/teraflow/ztp/context/model/ConfigRuleCustom.java similarity index 96% rename from src/automation/src/main/java/eu/teraflow/automation/context/model/ConfigRuleCustom.java rename to src/ztp/src/main/java/eu/teraflow/ztp/context/model/ConfigRuleCustom.java index 316ebc74b72a83c93ab2c2fcf890b136043aa823..2cf6dd69fb9aad6b4e4c606d6205542bfbb90146 100644 --- a/src/automation/src/main/java/eu/teraflow/automation/context/model/ConfigRuleCustom.java +++ b/src/ztp/src/main/java/eu/teraflow/ztp/context/model/ConfigRuleCustom.java @@ -14,7 +14,7 @@ * limitations under the License. */ -package eu.teraflow.automation.context.model; +package eu.teraflow.ztp.context.model; public class ConfigRuleCustom { diff --git a/src/automation/src/main/java/eu/teraflow/automation/context/model/ConfigRuleType.java b/src/ztp/src/main/java/eu/teraflow/ztp/context/model/ConfigRuleType.java similarity index 93% rename from src/automation/src/main/java/eu/teraflow/automation/context/model/ConfigRuleType.java rename to src/ztp/src/main/java/eu/teraflow/ztp/context/model/ConfigRuleType.java index 2554709251e70ba18ae4362e7aa44933510e587f..2e11fc6b1628cc728025002595cdeb0ba4d767f5 100644 --- a/src/automation/src/main/java/eu/teraflow/automation/context/model/ConfigRuleType.java +++ b/src/ztp/src/main/java/eu/teraflow/ztp/context/model/ConfigRuleType.java @@ -14,7 +14,7 @@ * limitations under the License. */ -package eu.teraflow.automation.context.model; +package eu.teraflow.ztp.context.model; public interface ConfigRuleType { diff --git a/src/automation/src/main/java/eu/teraflow/automation/context/model/ConfigRuleTypeAcl.java b/src/ztp/src/main/java/eu/teraflow/ztp/context/model/ConfigRuleTypeAcl.java similarity index 95% rename from src/automation/src/main/java/eu/teraflow/automation/context/model/ConfigRuleTypeAcl.java rename to src/ztp/src/main/java/eu/teraflow/ztp/context/model/ConfigRuleTypeAcl.java index f10d17bc8e54458023c1588c5015586308d3c55d..5405faa7348c72bb2798ebf0b1ee24ea696fbf24 100644 --- a/src/automation/src/main/java/eu/teraflow/automation/context/model/ConfigRuleTypeAcl.java +++ b/src/ztp/src/main/java/eu/teraflow/ztp/context/model/ConfigRuleTypeAcl.java @@ -14,7 +14,7 @@ * limitations under the License. */ -package eu.teraflow.automation.context.model; +package eu.teraflow.ztp.context.model; public class ConfigRuleTypeAcl implements ConfigRuleType { diff --git a/src/automation/src/main/java/eu/teraflow/automation/context/model/ConfigRuleTypeCustom.java b/src/ztp/src/main/java/eu/teraflow/ztp/context/model/ConfigRuleTypeCustom.java similarity index 96% rename from src/automation/src/main/java/eu/teraflow/automation/context/model/ConfigRuleTypeCustom.java rename to src/ztp/src/main/java/eu/teraflow/ztp/context/model/ConfigRuleTypeCustom.java index 759bb92c7fdc3ca861be34e63f8ade5bc385584a..5cc4a17fb9a1377a88e330d49ab573bd35dfa4ea 100644 --- a/src/automation/src/main/java/eu/teraflow/automation/context/model/ConfigRuleTypeCustom.java +++ b/src/ztp/src/main/java/eu/teraflow/ztp/context/model/ConfigRuleTypeCustom.java @@ -14,7 +14,7 @@ * limitations under the License. */ -package eu.teraflow.automation.context.model; +package eu.teraflow.ztp.context.model; public class ConfigRuleTypeCustom implements ConfigRuleType { diff --git a/src/automation/src/main/java/eu/teraflow/automation/context/model/Device.java b/src/ztp/src/main/java/eu/teraflow/ztp/context/model/Device.java similarity index 97% rename from src/automation/src/main/java/eu/teraflow/automation/context/model/Device.java rename to src/ztp/src/main/java/eu/teraflow/ztp/context/model/Device.java index b3d1836e3c4f494900281ef8a4cb505fa7761dca..3bb1e7a3af1de99ccf113f02fab1df462c2c10a5 100644 --- a/src/automation/src/main/java/eu/teraflow/automation/context/model/Device.java +++ b/src/ztp/src/main/java/eu/teraflow/ztp/context/model/Device.java @@ -14,9 +14,9 @@ * limitations under the License. */ -package eu.teraflow.automation.context.model; +package eu.teraflow.ztp.context.model; -import eu.teraflow.automation.common.Util; +import eu.teraflow.ztp.common.Util; import java.util.List; public class Device { diff --git a/src/automation/src/main/java/eu/teraflow/automation/context/model/DeviceConfig.java b/src/ztp/src/main/java/eu/teraflow/ztp/context/model/DeviceConfig.java similarity index 96% rename from src/automation/src/main/java/eu/teraflow/automation/context/model/DeviceConfig.java rename to src/ztp/src/main/java/eu/teraflow/ztp/context/model/DeviceConfig.java index 0341ab0720c3fe22257575b6151086b5c908c437..0775248428c5de66fecb0757fc944efce38597a9 100644 --- a/src/automation/src/main/java/eu/teraflow/automation/context/model/DeviceConfig.java +++ b/src/ztp/src/main/java/eu/teraflow/ztp/context/model/DeviceConfig.java @@ -14,7 +14,7 @@ * limitations under the License. */ -package eu.teraflow.automation.context.model; +package eu.teraflow.ztp.context.model; import java.util.List; import java.util.stream.Collectors; diff --git a/src/automation/src/main/java/eu/teraflow/automation/context/model/DeviceDriverEnum.java b/src/ztp/src/main/java/eu/teraflow/ztp/context/model/DeviceDriverEnum.java similarity index 94% rename from src/automation/src/main/java/eu/teraflow/automation/context/model/DeviceDriverEnum.java rename to src/ztp/src/main/java/eu/teraflow/ztp/context/model/DeviceDriverEnum.java index c1e1491c93a6aaa8b094b1e65a556c3908a08dc0..fe623175a791517846d329de6c83571a3a043a26 100644 --- a/src/automation/src/main/java/eu/teraflow/automation/context/model/DeviceDriverEnum.java +++ b/src/ztp/src/main/java/eu/teraflow/ztp/context/model/DeviceDriverEnum.java @@ -14,7 +14,7 @@ * limitations under the License. */ -package eu.teraflow.automation.context.model; +package eu.teraflow.ztp.context.model; public enum DeviceDriverEnum { UNDEFINED, diff --git a/src/automation/src/main/java/eu/teraflow/automation/context/model/DeviceEvent.java b/src/ztp/src/main/java/eu/teraflow/ztp/context/model/DeviceEvent.java similarity index 97% rename from src/automation/src/main/java/eu/teraflow/automation/context/model/DeviceEvent.java rename to src/ztp/src/main/java/eu/teraflow/ztp/context/model/DeviceEvent.java index 891d6916272608aae6bc78bd86a84703b34478fe..8ab56ec7c7dd5e079f000ab64003f12f6080f099 100644 --- a/src/automation/src/main/java/eu/teraflow/automation/context/model/DeviceEvent.java +++ b/src/ztp/src/main/java/eu/teraflow/ztp/context/model/DeviceEvent.java @@ -14,7 +14,7 @@ * limitations under the License. */ -package eu.teraflow.automation.context.model; +package eu.teraflow.ztp.context.model; import java.util.Optional; diff --git a/src/automation/src/main/java/eu/teraflow/automation/context/model/DeviceOperationalStatus.java b/src/ztp/src/main/java/eu/teraflow/ztp/context/model/DeviceOperationalStatus.java similarity index 93% rename from src/automation/src/main/java/eu/teraflow/automation/context/model/DeviceOperationalStatus.java rename to src/ztp/src/main/java/eu/teraflow/ztp/context/model/DeviceOperationalStatus.java index 0a5afaf2455acf28fa5591feb6c23d5f3d33692c..b171d31e1d30c768c3ae4d3f7bf5160170784285 100644 --- a/src/automation/src/main/java/eu/teraflow/automation/context/model/DeviceOperationalStatus.java +++ b/src/ztp/src/main/java/eu/teraflow/ztp/context/model/DeviceOperationalStatus.java @@ -14,7 +14,7 @@ * limitations under the License. */ -package eu.teraflow.automation.context.model; +package eu.teraflow.ztp.context.model; public enum DeviceOperationalStatus { UNDEFINED, diff --git a/src/automation/src/main/java/eu/teraflow/automation/context/model/Empty.java b/src/ztp/src/main/java/eu/teraflow/ztp/context/model/Empty.java similarity index 94% rename from src/automation/src/main/java/eu/teraflow/automation/context/model/Empty.java rename to src/ztp/src/main/java/eu/teraflow/ztp/context/model/Empty.java index e503665e4146d5966b75979b9b0133b41d65e421..adeaaaafc3e940f366b9ee84c08f931197ab5658 100644 --- a/src/automation/src/main/java/eu/teraflow/automation/context/model/Empty.java +++ b/src/ztp/src/main/java/eu/teraflow/ztp/context/model/Empty.java @@ -14,7 +14,7 @@ * limitations under the License. */ -package eu.teraflow.automation.context.model; +package eu.teraflow.ztp.context.model; public class Empty { diff --git a/src/automation/src/main/java/eu/teraflow/automation/context/model/EndPoint.java b/src/ztp/src/main/java/eu/teraflow/ztp/context/model/EndPoint.java similarity index 95% rename from src/automation/src/main/java/eu/teraflow/automation/context/model/EndPoint.java rename to src/ztp/src/main/java/eu/teraflow/ztp/context/model/EndPoint.java index c91f1d9c56967ea3a7b31e66193c0d0dbb9541d3..51378048e2e7387542ae59b7cd1909dd8ec6e8a7 100644 --- a/src/automation/src/main/java/eu/teraflow/automation/context/model/EndPoint.java +++ b/src/ztp/src/main/java/eu/teraflow/ztp/context/model/EndPoint.java @@ -14,10 +14,10 @@ * limitations under the License. */ -package eu.teraflow.automation.context.model; +package eu.teraflow.ztp.context.model; -import eu.teraflow.automation.common.Util; -import eu.teraflow.automation.kpi_sample_types.model.KpiSampleType; +import eu.teraflow.ztp.common.Util; +import eu.teraflow.ztp.kpi_sample_types.model.KpiSampleType; import java.util.List; public class EndPoint { diff --git a/src/automation/src/main/java/eu/teraflow/automation/context/model/EndPointId.java b/src/ztp/src/main/java/eu/teraflow/ztp/context/model/EndPointId.java similarity index 96% rename from src/automation/src/main/java/eu/teraflow/automation/context/model/EndPointId.java rename to src/ztp/src/main/java/eu/teraflow/ztp/context/model/EndPointId.java index 516c8289246565a86e2a59fe80dbe4b1505c5463..ddda2eb439301f8d77533974a337851ad2186ce9 100644 --- a/src/automation/src/main/java/eu/teraflow/automation/context/model/EndPointId.java +++ b/src/ztp/src/main/java/eu/teraflow/ztp/context/model/EndPointId.java @@ -14,7 +14,7 @@ * limitations under the License. */ -package eu.teraflow.automation.context.model; +package eu.teraflow.ztp.context.model; public class EndPointId { diff --git a/src/automation/src/main/java/eu/teraflow/automation/context/model/Event.java b/src/ztp/src/main/java/eu/teraflow/ztp/context/model/Event.java similarity index 96% rename from src/automation/src/main/java/eu/teraflow/automation/context/model/Event.java rename to src/ztp/src/main/java/eu/teraflow/ztp/context/model/Event.java index 9e4ca9abc0b1062c951aa7170dd83bc046bc8514..045b8482bc45bf29460aedbbe1d9771afde8d948 100644 --- a/src/automation/src/main/java/eu/teraflow/automation/context/model/Event.java +++ b/src/ztp/src/main/java/eu/teraflow/ztp/context/model/Event.java @@ -14,7 +14,7 @@ * limitations under the License. */ -package eu.teraflow.automation.context.model; +package eu.teraflow.ztp.context.model; public class Event { diff --git a/src/automation/src/main/java/eu/teraflow/automation/context/model/EventTypeEnum.java b/src/ztp/src/main/java/eu/teraflow/ztp/context/model/EventTypeEnum.java similarity index 93% rename from src/automation/src/main/java/eu/teraflow/automation/context/model/EventTypeEnum.java rename to src/ztp/src/main/java/eu/teraflow/ztp/context/model/EventTypeEnum.java index c20f9dfd59de812096a1b85e7dc908e5059eb246..b732a26cd7a6d3609f8e1d670c5e8b501e971f18 100644 --- a/src/automation/src/main/java/eu/teraflow/automation/context/model/EventTypeEnum.java +++ b/src/ztp/src/main/java/eu/teraflow/ztp/context/model/EventTypeEnum.java @@ -14,7 +14,7 @@ * limitations under the License. */ -package eu.teraflow.automation.context.model; +package eu.teraflow.ztp.context.model; public enum EventTypeEnum { UNDEFINED, diff --git a/src/automation/src/main/java/eu/teraflow/automation/context/model/GpsPosition.java b/src/ztp/src/main/java/eu/teraflow/ztp/context/model/GpsPosition.java similarity index 96% rename from src/automation/src/main/java/eu/teraflow/automation/context/model/GpsPosition.java rename to src/ztp/src/main/java/eu/teraflow/ztp/context/model/GpsPosition.java index 38a111f89fc79e0d11f15eedf2a8ca5a0ba35e89..c0dc6e3e788d1a1df8336ca97fc068857fc56495 100644 --- a/src/automation/src/main/java/eu/teraflow/automation/context/model/GpsPosition.java +++ b/src/ztp/src/main/java/eu/teraflow/ztp/context/model/GpsPosition.java @@ -14,7 +14,7 @@ * limitations under the License. */ -package eu.teraflow.automation.context.model; +package eu.teraflow.ztp.context.model; public class GpsPosition { diff --git a/src/automation/src/main/java/eu/teraflow/automation/context/model/Location.java b/src/ztp/src/main/java/eu/teraflow/ztp/context/model/Location.java similarity index 95% rename from src/automation/src/main/java/eu/teraflow/automation/context/model/Location.java rename to src/ztp/src/main/java/eu/teraflow/ztp/context/model/Location.java index a16715e13cbb2b70f3c729b03ec164f9f52142ce..fa937d91cae6796594028d313d85509c6df5cd09 100644 --- a/src/automation/src/main/java/eu/teraflow/automation/context/model/Location.java +++ b/src/ztp/src/main/java/eu/teraflow/ztp/context/model/Location.java @@ -14,7 +14,7 @@ * limitations under the License. */ -package eu.teraflow.automation.context.model; +package eu.teraflow.ztp.context.model; public class Location { diff --git a/src/automation/src/main/java/eu/teraflow/automation/context/model/LocationType.java b/src/ztp/src/main/java/eu/teraflow/ztp/context/model/LocationType.java similarity index 93% rename from src/automation/src/main/java/eu/teraflow/automation/context/model/LocationType.java rename to src/ztp/src/main/java/eu/teraflow/ztp/context/model/LocationType.java index a50594a511005c67ee206f84f9c840324cb2bac6..e4338c42b7855223db39ad58a7f0e1076a3d4823 100644 --- a/src/automation/src/main/java/eu/teraflow/automation/context/model/LocationType.java +++ b/src/ztp/src/main/java/eu/teraflow/ztp/context/model/LocationType.java @@ -14,7 +14,7 @@ * limitations under the License. */ -package eu.teraflow.automation.context.model; +package eu.teraflow.ztp.context.model; public interface LocationType { diff --git a/src/automation/src/main/java/eu/teraflow/automation/context/model/LocationTypeGpsPosition.java b/src/ztp/src/main/java/eu/teraflow/ztp/context/model/LocationTypeGpsPosition.java similarity index 95% rename from src/automation/src/main/java/eu/teraflow/automation/context/model/LocationTypeGpsPosition.java rename to src/ztp/src/main/java/eu/teraflow/ztp/context/model/LocationTypeGpsPosition.java index e512444aa7b7a4575936e3a00a2a9c4a8a051f1a..f4d510e65e7cba97243df295755080f8d876e7ab 100644 --- a/src/automation/src/main/java/eu/teraflow/automation/context/model/LocationTypeGpsPosition.java +++ b/src/ztp/src/main/java/eu/teraflow/ztp/context/model/LocationTypeGpsPosition.java @@ -14,7 +14,7 @@ * limitations under the License. */ -package eu.teraflow.automation.context.model; +package eu.teraflow.ztp.context.model; public class LocationTypeGpsPosition implements LocationType { private final GpsPosition gpsPosition; diff --git a/src/automation/src/main/java/eu/teraflow/automation/context/model/LocationTypeRegion.java b/src/ztp/src/main/java/eu/teraflow/ztp/context/model/LocationTypeRegion.java similarity index 95% rename from src/automation/src/main/java/eu/teraflow/automation/context/model/LocationTypeRegion.java rename to src/ztp/src/main/java/eu/teraflow/ztp/context/model/LocationTypeRegion.java index 28b448ca3e8682f39a140e7d347e6dbe20f7db35..8691de64238c4c947335bfc834ef0a9ce194763e 100644 --- a/src/automation/src/main/java/eu/teraflow/automation/context/model/LocationTypeRegion.java +++ b/src/ztp/src/main/java/eu/teraflow/ztp/context/model/LocationTypeRegion.java @@ -14,7 +14,7 @@ * limitations under the License. */ -package eu.teraflow.automation.context.model; +package eu.teraflow.ztp.context.model; public class LocationTypeRegion implements LocationType { private final String region; diff --git a/src/automation/src/main/java/eu/teraflow/automation/context/model/TopologyId.java b/src/ztp/src/main/java/eu/teraflow/ztp/context/model/TopologyId.java similarity index 96% rename from src/automation/src/main/java/eu/teraflow/automation/context/model/TopologyId.java rename to src/ztp/src/main/java/eu/teraflow/ztp/context/model/TopologyId.java index 07e8daed7fce328b5ea31ab2f9f3cb17abbd9525..574c075d59bb801317aa67a9e22ccef05725a77a 100644 --- a/src/automation/src/main/java/eu/teraflow/automation/context/model/TopologyId.java +++ b/src/ztp/src/main/java/eu/teraflow/ztp/context/model/TopologyId.java @@ -14,7 +14,7 @@ * limitations under the License. */ -package eu.teraflow.automation.context.model; +package eu.teraflow.ztp.context.model; public class TopologyId { diff --git a/src/automation/src/main/java/eu/teraflow/automation/device/DeviceGateway.java b/src/ztp/src/main/java/eu/teraflow/ztp/device/DeviceGateway.java similarity index 81% rename from src/automation/src/main/java/eu/teraflow/automation/device/DeviceGateway.java rename to src/ztp/src/main/java/eu/teraflow/ztp/device/DeviceGateway.java index c25c96c97ca5bb31b0125b9df3210a181a2ea0fb..7302abf48edd2588af41dce32ea0946f40acc070 100644 --- a/src/automation/src/main/java/eu/teraflow/automation/device/DeviceGateway.java +++ b/src/ztp/src/main/java/eu/teraflow/ztp/device/DeviceGateway.java @@ -14,11 +14,11 @@ * limitations under the License. */ -package eu.teraflow.automation.device; +package eu.teraflow.ztp.device; -import eu.teraflow.automation.context.model.Device; -import eu.teraflow.automation.context.model.DeviceConfig; -import eu.teraflow.automation.context.model.Empty; +import eu.teraflow.ztp.context.model.Device; +import eu.teraflow.ztp.context.model.DeviceConfig; +import eu.teraflow.ztp.context.model.Empty; import io.smallrye.mutiny.Uni; public interface DeviceGateway { diff --git a/src/automation/src/main/java/eu/teraflow/automation/device/DeviceGatewayImpl.java b/src/ztp/src/main/java/eu/teraflow/ztp/device/DeviceGatewayImpl.java similarity index 89% rename from src/automation/src/main/java/eu/teraflow/automation/device/DeviceGatewayImpl.java rename to src/ztp/src/main/java/eu/teraflow/ztp/device/DeviceGatewayImpl.java index 5e3d63f86477c11dbc6bbaa314172912b9b31da3..aea3368a0a242413bdd1791d181441076bc6474b 100644 --- a/src/automation/src/main/java/eu/teraflow/automation/device/DeviceGatewayImpl.java +++ b/src/ztp/src/main/java/eu/teraflow/ztp/device/DeviceGatewayImpl.java @@ -14,13 +14,13 @@ * limitations under the License. */ -package eu.teraflow.automation.device; +package eu.teraflow.ztp.device; import device.DeviceService; -import eu.teraflow.automation.Serializer; -import eu.teraflow.automation.context.model.Device; -import eu.teraflow.automation.context.model.DeviceConfig; -import eu.teraflow.automation.context.model.Empty; +import eu.teraflow.ztp.Serializer; +import eu.teraflow.ztp.context.model.Device; +import eu.teraflow.ztp.context.model.DeviceConfig; +import eu.teraflow.ztp.context.model.Empty; import io.quarkus.grpc.GrpcClient; import io.smallrye.mutiny.Uni; import javax.enterprise.context.ApplicationScoped; diff --git a/src/automation/src/main/java/eu/teraflow/automation/device/DeviceService.java b/src/ztp/src/main/java/eu/teraflow/ztp/device/DeviceService.java similarity index 81% rename from src/automation/src/main/java/eu/teraflow/automation/device/DeviceService.java rename to src/ztp/src/main/java/eu/teraflow/ztp/device/DeviceService.java index b41257d4a360f47f9a037a462726b31eba11f127..1f2e6d9ad8de852f9cb929df580cdc24ecbb538e 100644 --- a/src/automation/src/main/java/eu/teraflow/automation/device/DeviceService.java +++ b/src/ztp/src/main/java/eu/teraflow/ztp/device/DeviceService.java @@ -14,11 +14,11 @@ * limitations under the License. */ -package eu.teraflow.automation.device; +package eu.teraflow.ztp.device; -import eu.teraflow.automation.context.model.Device; -import eu.teraflow.automation.context.model.DeviceConfig; -import eu.teraflow.automation.context.model.Empty; +import eu.teraflow.ztp.context.model.Device; +import eu.teraflow.ztp.context.model.DeviceConfig; +import eu.teraflow.ztp.context.model.Empty; import io.smallrye.mutiny.Uni; public interface DeviceService { diff --git a/src/automation/src/main/java/eu/teraflow/automation/device/DeviceServiceImpl.java b/src/ztp/src/main/java/eu/teraflow/ztp/device/DeviceServiceImpl.java similarity index 87% rename from src/automation/src/main/java/eu/teraflow/automation/device/DeviceServiceImpl.java rename to src/ztp/src/main/java/eu/teraflow/ztp/device/DeviceServiceImpl.java index 97b142427988d08ff56025e29b6e7ec6c17cd7b7..67446b8c20fb65cba6242547967d3adc714f96d0 100644 --- a/src/automation/src/main/java/eu/teraflow/automation/device/DeviceServiceImpl.java +++ b/src/ztp/src/main/java/eu/teraflow/ztp/device/DeviceServiceImpl.java @@ -14,11 +14,11 @@ * limitations under the License. */ -package eu.teraflow.automation.device; +package eu.teraflow.ztp.device; -import eu.teraflow.automation.context.model.Device; -import eu.teraflow.automation.context.model.DeviceConfig; -import eu.teraflow.automation.context.model.Empty; +import eu.teraflow.ztp.context.model.Device; +import eu.teraflow.ztp.context.model.DeviceConfig; +import eu.teraflow.ztp.context.model.Empty; import io.smallrye.mutiny.Uni; import javax.enterprise.context.ApplicationScoped; import javax.inject.Inject; diff --git a/src/automation/src/main/java/eu/teraflow/automation/kpi_sample_types/model/KpiSampleType.java b/src/ztp/src/main/java/eu/teraflow/ztp/kpi_sample_types/model/KpiSampleType.java similarity index 93% rename from src/automation/src/main/java/eu/teraflow/automation/kpi_sample_types/model/KpiSampleType.java rename to src/ztp/src/main/java/eu/teraflow/ztp/kpi_sample_types/model/KpiSampleType.java index 49c7e0559b4b34635c347002417a7f19e43d91b7..701fd9021c5d72c817b8a374742c268233037ffd 100644 --- a/src/automation/src/main/java/eu/teraflow/automation/kpi_sample_types/model/KpiSampleType.java +++ b/src/ztp/src/main/java/eu/teraflow/ztp/kpi_sample_types/model/KpiSampleType.java @@ -14,7 +14,7 @@ * limitations under the License. */ -package eu.teraflow.automation.kpi_sample_types.model; +package eu.teraflow.ztp.kpi_sample_types.model; public enum KpiSampleType { UNKNOWN, diff --git a/src/automation/src/main/java/eu/teraflow/automation/model/DeviceRole.java b/src/ztp/src/main/java/eu/teraflow/ztp/model/DeviceRole.java similarity index 96% rename from src/automation/src/main/java/eu/teraflow/automation/model/DeviceRole.java rename to src/ztp/src/main/java/eu/teraflow/ztp/model/DeviceRole.java index 8398d5a27ca53d958e7c2fc5cfc4289bae5b79f9..061d500bee94dd77279f8bcf0bf5be1194900022 100644 --- a/src/automation/src/main/java/eu/teraflow/automation/model/DeviceRole.java +++ b/src/ztp/src/main/java/eu/teraflow/ztp/model/DeviceRole.java @@ -14,7 +14,7 @@ * limitations under the License. */ -package eu.teraflow.automation.model; +package eu.teraflow.ztp.model; public class DeviceRole { diff --git a/src/automation/src/main/java/eu/teraflow/automation/model/DeviceRoleConfig.java b/src/ztp/src/main/java/eu/teraflow/ztp/model/DeviceRoleConfig.java similarity index 92% rename from src/automation/src/main/java/eu/teraflow/automation/model/DeviceRoleConfig.java rename to src/ztp/src/main/java/eu/teraflow/ztp/model/DeviceRoleConfig.java index 8b9e5e9f605e6078838cca77d50db7044c85f6d2..badcf05889a2338d602e8dddda1435aaface0b40 100644 --- a/src/automation/src/main/java/eu/teraflow/automation/model/DeviceRoleConfig.java +++ b/src/ztp/src/main/java/eu/teraflow/ztp/model/DeviceRoleConfig.java @@ -14,9 +14,9 @@ * limitations under the License. */ -package eu.teraflow.automation.model; +package eu.teraflow.ztp.model; -import eu.teraflow.automation.context.model.DeviceConfig; +import eu.teraflow.ztp.context.model.DeviceConfig; public class DeviceRoleConfig { diff --git a/src/automation/src/main/java/eu/teraflow/automation/model/DeviceRoleId.java b/src/ztp/src/main/java/eu/teraflow/ztp/model/DeviceRoleId.java similarity index 96% rename from src/automation/src/main/java/eu/teraflow/automation/model/DeviceRoleId.java rename to src/ztp/src/main/java/eu/teraflow/ztp/model/DeviceRoleId.java index 6a57ae0aacb009e764019af38af1ea16edd8a09b..dd482fb05e0fe0f5f3770df15c4161c9dae4c70f 100644 --- a/src/automation/src/main/java/eu/teraflow/automation/model/DeviceRoleId.java +++ b/src/ztp/src/main/java/eu/teraflow/ztp/model/DeviceRoleId.java @@ -14,7 +14,7 @@ * limitations under the License. */ -package eu.teraflow.automation.model; +package eu.teraflow.ztp.model; public class DeviceRoleId { diff --git a/src/automation/src/main/java/eu/teraflow/automation/model/DeviceRoleType.java b/src/ztp/src/main/java/eu/teraflow/ztp/model/DeviceRoleType.java similarity index 94% rename from src/automation/src/main/java/eu/teraflow/automation/model/DeviceRoleType.java rename to src/ztp/src/main/java/eu/teraflow/ztp/model/DeviceRoleType.java index 2d9ba668444f96a970bc2055db39716d72e4e7e9..7db0cab714cf493c46288ad1056fc6c1db974df2 100644 --- a/src/automation/src/main/java/eu/teraflow/automation/model/DeviceRoleType.java +++ b/src/ztp/src/main/java/eu/teraflow/ztp/model/DeviceRoleType.java @@ -14,7 +14,7 @@ * limitations under the License. */ -package eu.teraflow.automation.model; +package eu.teraflow.ztp.model; public enum DeviceRoleType { NONE, diff --git a/src/automation/src/main/java/eu/teraflow/automation/model/DeviceState.java b/src/ztp/src/main/java/eu/teraflow/ztp/model/DeviceState.java similarity index 94% rename from src/automation/src/main/java/eu/teraflow/automation/model/DeviceState.java rename to src/ztp/src/main/java/eu/teraflow/ztp/model/DeviceState.java index 01e5a131b1db7fef88cb0aa215ee87560963d281..ee953862cf64707ba656d6cbe224fc83592367de 100644 --- a/src/automation/src/main/java/eu/teraflow/automation/model/DeviceState.java +++ b/src/ztp/src/main/java/eu/teraflow/ztp/model/DeviceState.java @@ -14,7 +14,7 @@ * limitations under the License. */ -package eu.teraflow.automation.model; +package eu.teraflow.ztp.model; public enum DeviceState { UNDEFINED, diff --git a/src/automation/src/main/proto/acl.proto b/src/ztp/src/main/proto/acl.proto similarity index 100% rename from src/automation/src/main/proto/acl.proto rename to src/ztp/src/main/proto/acl.proto diff --git a/src/automation/src/main/proto/context.proto b/src/ztp/src/main/proto/context.proto similarity index 100% rename from src/automation/src/main/proto/context.proto rename to src/ztp/src/main/proto/context.proto diff --git a/src/automation/src/main/proto/device.proto b/src/ztp/src/main/proto/device.proto similarity index 100% rename from src/automation/src/main/proto/device.proto rename to src/ztp/src/main/proto/device.proto diff --git a/src/automation/src/main/proto/kpi_sample_types.proto b/src/ztp/src/main/proto/kpi_sample_types.proto similarity index 100% rename from src/automation/src/main/proto/kpi_sample_types.proto rename to src/ztp/src/main/proto/kpi_sample_types.proto diff --git a/src/automation/src/main/proto/monitoring.proto b/src/ztp/src/main/proto/monitoring.proto similarity index 100% rename from src/automation/src/main/proto/monitoring.proto rename to src/ztp/src/main/proto/monitoring.proto diff --git a/src/ztp/src/main/proto/ztp.proto b/src/ztp/src/main/proto/ztp.proto new file mode 120000 index 0000000000000000000000000000000000000000..9183ce531e28ade191ea9a9659feb97bf8bc7bf5 --- /dev/null +++ b/src/ztp/src/main/proto/ztp.proto @@ -0,0 +1 @@ +../../../../../proto/ztp.proto \ No newline at end of file diff --git a/src/automation/src/main/resources/application.yml b/src/ztp/src/main/resources/application.yml similarity index 91% rename from src/automation/src/main/resources/application.yml rename to src/ztp/src/main/resources/application.yml index bf638039daf3460c2f4ef374a380b37d01de1f1c..c551759efb3645f9c307c20a8988fc8ee9a89e0a 100644 --- a/src/automation/src/main/resources/application.yml +++ b/src/ztp/src/main/resources/application.yml @@ -12,11 +12,11 @@ # See the License for the specific language governing permissions and # limitations under the License. -automation: +ztp: should-subscribe-to-context-component: true quarkus: banner: - path: teraflow-automation-banner.txt + path: teraflow-ztp-banner.txt grpc: server: port: 5050 @@ -34,15 +34,15 @@ quarkus: container-image: group: tfs - name: controller/automation + name: controller/ztp registry: labs.etsi.org:5050 tag: 0.2.0 kubernetes: - name: automationservice + name: ztpservice image-pull-policy: Always labels: - app: automationservice + app: ztpservice add-version-to-label-selectors: false readiness-probe: initial-delay: 2s diff --git a/src/ztp/src/main/resources/teraflow-ztp-banner.txt b/src/ztp/src/main/resources/teraflow-ztp-banner.txt new file mode 100644 index 0000000000000000000000000000000000000000..5c0d4d634a15c63b4543e4ded95534675f738add --- /dev/null +++ b/src/ztp/src/main/resources/teraflow-ztp-banner.txt @@ -0,0 +1,8 @@ + _______ ______ _ _____________ _____ + |__ __| | ____| | |___ /__ __| __ \ + | | ___ _ __ __ _| |__ | | _____ __ / / | | | |__) | + | |/ _ \ '__/ _` | __| | |/ _ \ \ /\ / / / / | | | ___/ + | | __/ | | (_| | | | | (_) \ V V / / /__ | | | | + |_|\___|_| \__,_|_| |_|\___/ \_/\_/ /_____| |_| |_| + + \ No newline at end of file diff --git a/src/automation/src/test/java/eu/teraflow/automation/ConfigRuleTypeTest.java b/src/ztp/src/test/java/eu/teraflow/ztp/ConfigRuleTypeTest.java similarity index 79% rename from src/automation/src/test/java/eu/teraflow/automation/ConfigRuleTypeTest.java rename to src/ztp/src/test/java/eu/teraflow/ztp/ConfigRuleTypeTest.java index 67d4b204499fd93324bba07895149dba890b77c1..435164a35350623ec50fea406585100c01f48bc6 100644 --- a/src/automation/src/test/java/eu/teraflow/automation/ConfigRuleTypeTest.java +++ b/src/ztp/src/test/java/eu/teraflow/ztp/ConfigRuleTypeTest.java @@ -14,23 +14,23 @@ * limitations under the License. */ -package eu.teraflow.automation; +package eu.teraflow.ztp; import static org.assertj.core.api.Assertions.assertThat; -import eu.teraflow.automation.acl.AclAction; -import eu.teraflow.automation.acl.AclEntry; -import eu.teraflow.automation.acl.AclForwardActionEnum; -import eu.teraflow.automation.acl.AclLogActionEnum; -import eu.teraflow.automation.acl.AclMatch; -import eu.teraflow.automation.acl.AclRuleSet; -import eu.teraflow.automation.acl.AclRuleTypeEnum; -import eu.teraflow.automation.context.model.ConfigRuleAcl; -import eu.teraflow.automation.context.model.ConfigRuleCustom; -import eu.teraflow.automation.context.model.ConfigRuleTypeAcl; -import eu.teraflow.automation.context.model.ConfigRuleTypeCustom; -import eu.teraflow.automation.context.model.EndPointId; -import eu.teraflow.automation.context.model.TopologyId; +import eu.teraflow.ztp.acl.AclAction; +import eu.teraflow.ztp.acl.AclEntry; +import eu.teraflow.ztp.acl.AclForwardActionEnum; +import eu.teraflow.ztp.acl.AclLogActionEnum; +import eu.teraflow.ztp.acl.AclMatch; +import eu.teraflow.ztp.acl.AclRuleSet; +import eu.teraflow.ztp.acl.AclRuleTypeEnum; +import eu.teraflow.ztp.context.model.ConfigRuleAcl; +import eu.teraflow.ztp.context.model.ConfigRuleCustom; +import eu.teraflow.ztp.context.model.ConfigRuleTypeAcl; +import eu.teraflow.ztp.context.model.ConfigRuleTypeCustom; +import eu.teraflow.ztp.context.model.EndPointId; +import eu.teraflow.ztp.context.model.TopologyId; import io.quarkus.test.junit.QuarkusTest; import java.util.List; import org.junit.jupiter.api.Test; diff --git a/src/automation/src/test/java/eu/teraflow/automation/ContextSubscriberTest.java b/src/ztp/src/test/java/eu/teraflow/ztp/ContextSubscriberTest.java similarity index 82% rename from src/automation/src/test/java/eu/teraflow/automation/ContextSubscriberTest.java rename to src/ztp/src/test/java/eu/teraflow/ztp/ContextSubscriberTest.java index eb5f63e25d0f83417bcd461ce3aa9313a7eb417f..9d3d6956c4b466456b8a148b7d3996d7ae1e5132 100644 --- a/src/automation/src/test/java/eu/teraflow/automation/ContextSubscriberTest.java +++ b/src/ztp/src/test/java/eu/teraflow/ztp/ContextSubscriberTest.java @@ -14,17 +14,16 @@ * limitations under the License. */ -package eu.teraflow.automation; +package eu.teraflow.ztp; import static org.mockito.Mockito.times; import static org.mockito.Mockito.verify; -import automation.Automation; import context.ContextOuterClass; -import eu.teraflow.automation.context.ContextGateway; -import eu.teraflow.automation.context.model.DeviceEvent; -import eu.teraflow.automation.context.model.Event; -import eu.teraflow.automation.context.model.EventTypeEnum; +import eu.teraflow.ztp.context.ContextGateway; +import eu.teraflow.ztp.context.model.DeviceEvent; +import eu.teraflow.ztp.context.model.Event; +import eu.teraflow.ztp.context.model.EventTypeEnum; import io.quarkus.runtime.StartupEvent; import io.quarkus.test.junit.QuarkusTest; import io.quarkus.test.junit.mockito.InjectMock; @@ -33,6 +32,7 @@ import java.util.UUID; import javax.inject.Inject; import org.junit.jupiter.api.Test; import org.mockito.Mockito; +import ztp.Ztp; @QuarkusTest class ContextSubscriberTest { @@ -46,9 +46,9 @@ class ContextSubscriberTest { @InjectMock ContextGateway contextGateway; - @InjectMock AutomationService automationService; + @InjectMock ZtpService ztpService; - @InjectMock AutomationConfiguration automationConfiguration; + @InjectMock ZtpConfiguration ztpConfiguration; @Test void shouldCallAddDeviceUponCreateEvent() { @@ -62,7 +62,7 @@ class ContextSubscriberTest { ContextOuterClass.DeviceId.newBuilder().setDeviceUuid(uuidForDeviceId).build(); final var outDeviceRoleId = - Automation.DeviceRoleId.newBuilder() + Ztp.DeviceRoleId.newBuilder() .setDevRoleId(uuidForDeviceRoleId) .setDevId(outDeviceId) .build(); @@ -77,8 +77,8 @@ class ContextSubscriberTest { contextSubscriber.listenForDeviceEvents(); - verify(automationService, times(0)).deleteDevice(deviceId); - verify(automationService, times(1)).addDevice(deviceId); + verify(ztpService, times(0)).deleteDevice(deviceId); + verify(ztpService, times(1)).addDevice(deviceId); } @Test @@ -93,7 +93,7 @@ class ContextSubscriberTest { ContextOuterClass.DeviceId.newBuilder().setDeviceUuid(uuidForDeviceId).build(); final var outDeviceRoleId = - Automation.DeviceRoleId.newBuilder() + Ztp.DeviceRoleId.newBuilder() .setDevRoleId(uuidForDeviceRoleId) .setDevId(outDeviceId) .build(); @@ -108,7 +108,7 @@ class ContextSubscriberTest { contextSubscriber.listenForDeviceEvents(); - // verify(automationService, times(0)).addDevice(deviceId); + // verify(ztpService, times(0)).addDevice(deviceId); } @Test @@ -123,7 +123,7 @@ class ContextSubscriberTest { ContextOuterClass.DeviceId.newBuilder().setDeviceUuid(uuidForDeviceId).build(); final var outDeviceRoleId = - Automation.DeviceRoleId.newBuilder() + Ztp.DeviceRoleId.newBuilder() .setDevRoleId(uuidForDeviceRoleId) .setDevId(outDeviceId) .build(); @@ -138,8 +138,8 @@ class ContextSubscriberTest { contextSubscriber.listenForDeviceEvents(); - verify(automationService, times(0)).addDevice(deviceId); - verify(automationService, times(1)).deleteDevice(deviceId); + verify(ztpService, times(0)).addDevice(deviceId); + verify(ztpService, times(1)).deleteDevice(deviceId); } @Test @@ -154,7 +154,7 @@ class ContextSubscriberTest { ContextOuterClass.DeviceId.newBuilder().setDeviceUuid(uuidForDeviceId).build(); final var outDeviceRoleId = - Automation.DeviceRoleId.newBuilder() + Ztp.DeviceRoleId.newBuilder() .setDevRoleId(uuidForDeviceRoleId) .setDevId(outDeviceId) .build(); @@ -168,7 +168,7 @@ class ContextSubscriberTest { contextSubscriber.listenForDeviceEvents(); - verify(automationService, times(0)).addDevice(deviceId); + verify(ztpService, times(0)).addDevice(deviceId); } @Test @@ -183,7 +183,7 @@ class ContextSubscriberTest { ContextOuterClass.DeviceId.newBuilder().setDeviceUuid(uuidForDeviceId).build(); final var outDeviceRoleId = - Automation.DeviceRoleId.newBuilder() + Ztp.DeviceRoleId.newBuilder() .setDevRoleId(uuidForDeviceRoleId) .setDevId(outDeviceId) .build(); @@ -195,19 +195,19 @@ class ContextSubscriberTest { final var deviceEventsMulti = Multi.createFrom().item(deviceEvent); Mockito.when(contextGateway.getDeviceEvents()).thenReturn(deviceEventsMulti); - Mockito.when(automationConfiguration.shouldSubscribeToContextComponent()).thenReturn(true); + Mockito.when(ztpConfiguration.shouldSubscribeToContextComponent()).thenReturn(true); StartupEvent y = new StartupEvent(); contextSubscriber.onStart(y); verify(contextGateway, times(1)).getDeviceEvents(); - verify(automationService, times(1)).addDevice(deviceId); + verify(ztpService, times(1)).addDevice(deviceId); } @Test void shouldNotCallListenForDeviceEventsUponStart() { - final var automationConfiguration = Mockito.mock(AutomationConfiguration.class); - Mockito.when(automationConfiguration.shouldSubscribeToContextComponent()).thenReturn(false); + final var ztpConfiguration = Mockito.mock(ZtpConfiguration.class); + Mockito.when(ztpConfiguration.shouldSubscribeToContextComponent()).thenReturn(false); StartupEvent y = new StartupEvent(); contextSubscriber.onStart(y); diff --git a/src/automation/src/test/java/eu/teraflow/automation/EndPointCreationTest.java b/src/ztp/src/test/java/eu/teraflow/ztp/EndPointCreationTest.java similarity index 93% rename from src/automation/src/test/java/eu/teraflow/automation/EndPointCreationTest.java rename to src/ztp/src/test/java/eu/teraflow/ztp/EndPointCreationTest.java index 7f3d749d1aae851bf2cb446e1309384242b031d7..cb935cd4a9f24245e801341102649c3a5ffba5d7 100644 --- a/src/automation/src/test/java/eu/teraflow/automation/EndPointCreationTest.java +++ b/src/ztp/src/test/java/eu/teraflow/ztp/EndPointCreationTest.java @@ -14,17 +14,17 @@ * limitations under the License. */ -package eu.teraflow.automation; +package eu.teraflow.ztp; import static org.assertj.core.api.Assertions.assertThat; import static org.assertj.core.api.Assertions.assertThatExceptionOfType; -import eu.teraflow.automation.context.model.EndPoint; -import eu.teraflow.automation.context.model.EndPointId; -import eu.teraflow.automation.context.model.Location; -import eu.teraflow.automation.context.model.LocationTypeRegion; -import eu.teraflow.automation.context.model.TopologyId; -import eu.teraflow.automation.kpi_sample_types.model.KpiSampleType; +import eu.teraflow.ztp.context.model.EndPoint; +import eu.teraflow.ztp.context.model.EndPointId; +import eu.teraflow.ztp.context.model.Location; +import eu.teraflow.ztp.context.model.LocationTypeRegion; +import eu.teraflow.ztp.context.model.TopologyId; +import eu.teraflow.ztp.kpi_sample_types.model.KpiSampleType; import io.quarkus.test.junit.QuarkusTest; import java.util.List; import org.junit.jupiter.api.Test; diff --git a/src/automation/src/test/java/eu/teraflow/automation/LocationTypeTest.java b/src/ztp/src/test/java/eu/teraflow/ztp/LocationTypeTest.java similarity index 87% rename from src/automation/src/test/java/eu/teraflow/automation/LocationTypeTest.java rename to src/ztp/src/test/java/eu/teraflow/ztp/LocationTypeTest.java index 8cc2c06126f5cf0e92fd59680390719ff425f411..4f038a6adafacfc5a4b8beea8f83195501c86fb9 100644 --- a/src/automation/src/test/java/eu/teraflow/automation/LocationTypeTest.java +++ b/src/ztp/src/test/java/eu/teraflow/ztp/LocationTypeTest.java @@ -14,13 +14,13 @@ * limitations under the License. */ -package eu.teraflow.automation; +package eu.teraflow.ztp; import static org.assertj.core.api.Assertions.assertThat; -import eu.teraflow.automation.context.model.GpsPosition; -import eu.teraflow.automation.context.model.LocationTypeGpsPosition; -import eu.teraflow.automation.context.model.LocationTypeRegion; +import eu.teraflow.ztp.context.model.GpsPosition; +import eu.teraflow.ztp.context.model.LocationTypeGpsPosition; +import eu.teraflow.ztp.context.model.LocationTypeRegion; import io.quarkus.test.junit.QuarkusTest; import org.junit.jupiter.api.Test; diff --git a/src/automation/src/test/java/eu/teraflow/automation/MockAutomationConfiguration.java b/src/ztp/src/test/java/eu/teraflow/ztp/MockZtpConfiguration.java similarity index 85% rename from src/automation/src/test/java/eu/teraflow/automation/MockAutomationConfiguration.java rename to src/ztp/src/test/java/eu/teraflow/ztp/MockZtpConfiguration.java index 94110ebbcd8826b6fd73f451c799f3d8d79521f7..aa554cbc3b76e73fa1952fb95a3d9045692eb0d9 100644 --- a/src/automation/src/test/java/eu/teraflow/automation/MockAutomationConfiguration.java +++ b/src/ztp/src/test/java/eu/teraflow/ztp/MockZtpConfiguration.java @@ -14,7 +14,7 @@ * limitations under the License. */ -package eu.teraflow.automation; +package eu.teraflow.ztp; import io.smallrye.config.SmallRyeConfig; import javax.enterprise.context.ApplicationScoped; @@ -22,13 +22,13 @@ import javax.inject.Inject; import javax.ws.rs.Produces; import org.eclipse.microprofile.config.Config; -public class MockAutomationConfiguration { +public class MockZtpConfiguration { @Inject Config config; @Produces @ApplicationScoped @io.quarkus.test.Mock - AutomationConfiguration automationConfiguration() { - return config.unwrap(SmallRyeConfig.class).getConfigMapping(AutomationConfiguration.class); + ZtpConfiguration ztpConfiguration() { + return config.unwrap(SmallRyeConfig.class).getConfigMapping(ZtpConfiguration.class); } } diff --git a/src/automation/src/test/java/eu/teraflow/automation/SerializerTest.java b/src/ztp/src/test/java/eu/teraflow/ztp/SerializerTest.java similarity index 96% rename from src/automation/src/test/java/eu/teraflow/automation/SerializerTest.java rename to src/ztp/src/test/java/eu/teraflow/ztp/SerializerTest.java index 7351d16a90db438bad4535fd3d413c5c48e91b17..7d6bb54c3806641f83b45818a4ba132ff9195d73 100644 --- a/src/automation/src/test/java/eu/teraflow/automation/SerializerTest.java +++ b/src/ztp/src/test/java/eu/teraflow/ztp/SerializerTest.java @@ -14,52 +14,50 @@ * limitations under the License. */ -package eu.teraflow.automation; +package eu.teraflow.ztp; import static org.assertj.core.api.Assertions.assertThat; import static org.assertj.core.api.Assertions.assertThatExceptionOfType; import acl.Acl; -import automation.Automation; -import automation.Automation.ZtpDeviceState; import context.ContextOuterClass; import context.ContextOuterClass.DeviceId; import context.ContextOuterClass.DeviceOperationalStatusEnum; import context.ContextOuterClass.Uuid; -import eu.teraflow.automation.acl.AclAction; -import eu.teraflow.automation.acl.AclEntry; -import eu.teraflow.automation.acl.AclForwardActionEnum; -import eu.teraflow.automation.acl.AclLogActionEnum; -import eu.teraflow.automation.acl.AclMatch; -import eu.teraflow.automation.acl.AclRuleSet; -import eu.teraflow.automation.acl.AclRuleTypeEnum; -import eu.teraflow.automation.context.model.ConfigActionEnum; -import eu.teraflow.automation.context.model.ConfigRule; -import eu.teraflow.automation.context.model.ConfigRuleAcl; -import eu.teraflow.automation.context.model.ConfigRuleCustom; -import eu.teraflow.automation.context.model.ConfigRuleTypeAcl; -import eu.teraflow.automation.context.model.ConfigRuleTypeCustom; -import eu.teraflow.automation.context.model.Device; -import eu.teraflow.automation.context.model.DeviceConfig; -import eu.teraflow.automation.context.model.DeviceDriverEnum; -import eu.teraflow.automation.context.model.DeviceEvent; -import eu.teraflow.automation.context.model.DeviceOperationalStatus; -import eu.teraflow.automation.context.model.Empty; -import eu.teraflow.automation.context.model.EndPoint.EndPointBuilder; -import eu.teraflow.automation.context.model.EndPointId; -import eu.teraflow.automation.context.model.Event; -import eu.teraflow.automation.context.model.EventTypeEnum; -import eu.teraflow.automation.context.model.GpsPosition; -import eu.teraflow.automation.context.model.Location; -import eu.teraflow.automation.context.model.LocationTypeGpsPosition; -import eu.teraflow.automation.context.model.LocationTypeRegion; -import eu.teraflow.automation.context.model.TopologyId; -import eu.teraflow.automation.kpi_sample_types.model.KpiSampleType; -import eu.teraflow.automation.model.DeviceRole; -import eu.teraflow.automation.model.DeviceRoleConfig; -import eu.teraflow.automation.model.DeviceRoleId; -import eu.teraflow.automation.model.DeviceRoleType; -import eu.teraflow.automation.model.DeviceState; +import eu.teraflow.ztp.acl.AclAction; +import eu.teraflow.ztp.acl.AclEntry; +import eu.teraflow.ztp.acl.AclForwardActionEnum; +import eu.teraflow.ztp.acl.AclLogActionEnum; +import eu.teraflow.ztp.acl.AclMatch; +import eu.teraflow.ztp.acl.AclRuleSet; +import eu.teraflow.ztp.acl.AclRuleTypeEnum; +import eu.teraflow.ztp.context.model.ConfigActionEnum; +import eu.teraflow.ztp.context.model.ConfigRule; +import eu.teraflow.ztp.context.model.ConfigRuleAcl; +import eu.teraflow.ztp.context.model.ConfigRuleCustom; +import eu.teraflow.ztp.context.model.ConfigRuleTypeAcl; +import eu.teraflow.ztp.context.model.ConfigRuleTypeCustom; +import eu.teraflow.ztp.context.model.Device; +import eu.teraflow.ztp.context.model.DeviceConfig; +import eu.teraflow.ztp.context.model.DeviceDriverEnum; +import eu.teraflow.ztp.context.model.DeviceEvent; +import eu.teraflow.ztp.context.model.DeviceOperationalStatus; +import eu.teraflow.ztp.context.model.Empty; +import eu.teraflow.ztp.context.model.EndPoint.EndPointBuilder; +import eu.teraflow.ztp.context.model.EndPointId; +import eu.teraflow.ztp.context.model.Event; +import eu.teraflow.ztp.context.model.EventTypeEnum; +import eu.teraflow.ztp.context.model.GpsPosition; +import eu.teraflow.ztp.context.model.Location; +import eu.teraflow.ztp.context.model.LocationTypeGpsPosition; +import eu.teraflow.ztp.context.model.LocationTypeRegion; +import eu.teraflow.ztp.context.model.TopologyId; +import eu.teraflow.ztp.kpi_sample_types.model.KpiSampleType; +import eu.teraflow.ztp.model.DeviceRole; +import eu.teraflow.ztp.model.DeviceRoleConfig; +import eu.teraflow.ztp.model.DeviceRoleId; +import eu.teraflow.ztp.model.DeviceRoleType; +import eu.teraflow.ztp.model.DeviceState; import io.quarkus.test.junit.QuarkusTest; import java.util.List; import java.util.stream.Collectors; @@ -70,6 +68,8 @@ import org.junit.jupiter.api.Test; import org.junit.jupiter.params.ParameterizedTest; import org.junit.jupiter.params.provider.Arguments; import org.junit.jupiter.params.provider.MethodSource; +import ztp.Ztp; +import ztp.Ztp.ZtpDeviceState; @QuarkusTest class SerializerTest { @@ -141,7 +141,7 @@ class SerializerTest { .build(); final var expectedDeviceRoleId = - Automation.DeviceRoleId.newBuilder() + Ztp.DeviceRoleId.newBuilder() .setDevRoleId(serializedDeviceRoleIdUuid) .setDevId(serializedDeviceRoleDeviceId) .build(); @@ -166,16 +166,16 @@ class SerializerTest { private static Stream provideDeviceRoleType() { return Stream.of( - Arguments.of(DeviceRoleType.DEV_OPS, Automation.DeviceRoleType.DEV_OPS), - Arguments.of(DeviceRoleType.DEV_CONF, Automation.DeviceRoleType.DEV_CONF), - Arguments.of(DeviceRoleType.NONE, Automation.DeviceRoleType.NONE), - Arguments.of(DeviceRoleType.PIPELINE_CONF, Automation.DeviceRoleType.PIPELINE_CONF)); + Arguments.of(DeviceRoleType.DEV_OPS, Ztp.DeviceRoleType.DEV_OPS), + Arguments.of(DeviceRoleType.DEV_CONF, Ztp.DeviceRoleType.DEV_CONF), + Arguments.of(DeviceRoleType.NONE, Ztp.DeviceRoleType.NONE), + Arguments.of(DeviceRoleType.PIPELINE_CONF, Ztp.DeviceRoleType.PIPELINE_CONF)); } @ParameterizedTest @MethodSource("provideDeviceRoleType") void shouldSerializeDeviceRoleType( - DeviceRoleType deviceRoleType, Automation.DeviceRoleType expectedSerializedType) { + DeviceRoleType deviceRoleType, Ztp.DeviceRoleType expectedSerializedType) { final var serializedType = serializer.serialize(deviceRoleType); assertThat(serializedType.getNumber()).isEqualTo(expectedSerializedType.getNumber()); } @@ -183,8 +183,7 @@ class SerializerTest { @ParameterizedTest @MethodSource("provideDeviceRoleType") void shouldDeserializeDeviceRoleType( - DeviceRoleType expectedDeviceRoleType, - Automation.DeviceRoleType serializedDeviceRoleTypeType) { + DeviceRoleType expectedDeviceRoleType, Ztp.DeviceRoleType serializedDeviceRoleTypeType) { final var deviceRoleType = serializer.deserialize(serializedDeviceRoleTypeType); @@ -200,15 +199,15 @@ class SerializerTest { final var serializedDeviceRoleDeviceId = serializer.serializeDeviceId(expectedDeviceId); final var expectedDeviceRoleId = - Automation.DeviceRoleId.newBuilder() + Ztp.DeviceRoleId.newBuilder() .setDevRoleId(serializedDeviceRoleDevRoleIdUuid) .setDevId(serializedDeviceRoleDeviceId) .build(); - final var expectedDeviceRoleType = Automation.DeviceRoleType.PIPELINE_CONF; + final var expectedDeviceRoleType = Ztp.DeviceRoleType.PIPELINE_CONF; final var expectedDeviceRole = - Automation.DeviceRole.newBuilder() + Ztp.DeviceRole.newBuilder() .setDevRoleId(expectedDeviceRoleId) .setDevRoleType(expectedDeviceRoleType) .build(); @@ -236,7 +235,7 @@ class SerializerTest { final var serializedDeviceRoleType = serializer.serialize(expectedDeviceRoleType); final var serializedDeviceRole = - Automation.DeviceRole.newBuilder() + Ztp.DeviceRole.newBuilder() .setDevRoleId(serializedDeviceRoleId) .setDevRoleType(serializedDeviceRoleType) .build(); @@ -261,7 +260,7 @@ class SerializerTest { final var serializedDeviceConfig = serializer.serialize(deviceConfig); final var expectedDeviceRoleConfig = - Automation.DeviceRoleConfig.newBuilder() + Ztp.DeviceRoleConfig.newBuilder() .setDevRole(serializedDeviceRole) .setDevConfig(serializedDeviceConfig) .build(); @@ -291,7 +290,7 @@ class SerializerTest { final var expectedDeviceRoleConfig = new DeviceRoleConfig(deviceRole, deviceConfig); final var serializedDeviceRoleConfig = - Automation.DeviceRoleConfig.newBuilder() + Ztp.DeviceRoleConfig.newBuilder() .setDevRole(serializedDeviceRole) .setDevConfig(serializedDeviceConfig) .build(); @@ -1031,7 +1030,7 @@ class SerializerTest { final var aclRuleSet = new AclRuleSet( "aclRuleName", - eu.teraflow.automation.acl.AclRuleTypeEnum.IPV4, + eu.teraflow.ztp.acl.AclRuleTypeEnum.IPV4, "AclRuleDescription", "userId", List.of(aclEntry)); @@ -1117,7 +1116,7 @@ class SerializerTest { final var aclRuleSet = new AclRuleSet( "aclRuleName", - eu.teraflow.automation.acl.AclRuleTypeEnum.IPV4, + eu.teraflow.ztp.acl.AclRuleTypeEnum.IPV4, "AclRuleDescription", "userId", List.of(aclEntry)); diff --git a/src/automation/src/test/java/eu/teraflow/automation/AutomationFunctionalServiceTest.java b/src/ztp/src/test/java/eu/teraflow/ztp/ZtpFunctionalServiceTest.java similarity index 91% rename from src/automation/src/test/java/eu/teraflow/automation/AutomationFunctionalServiceTest.java rename to src/ztp/src/test/java/eu/teraflow/ztp/ZtpFunctionalServiceTest.java index d7e3917fc84537ebd2256262e148e1762ef0c96c..83b9f6f7f332e50e7d01fe6317b2623beafe0100 100644 --- a/src/automation/src/test/java/eu/teraflow/automation/AutomationFunctionalServiceTest.java +++ b/src/ztp/src/test/java/eu/teraflow/ztp/ZtpFunctionalServiceTest.java @@ -14,28 +14,27 @@ * limitations under the License. */ -package eu.teraflow.automation; +package eu.teraflow.ztp; import static org.assertj.core.api.AssertionsForClassTypes.assertThat; -import automation.Automation; import context.ContextOuterClass; -import eu.teraflow.automation.context.ContextGateway; -import eu.teraflow.automation.context.model.ConfigActionEnum; -import eu.teraflow.automation.context.model.ConfigRule; -import eu.teraflow.automation.context.model.ConfigRuleCustom; -import eu.teraflow.automation.context.model.ConfigRuleTypeCustom; -import eu.teraflow.automation.context.model.Device; -import eu.teraflow.automation.context.model.DeviceConfig; -import eu.teraflow.automation.context.model.DeviceDriverEnum; -import eu.teraflow.automation.context.model.DeviceOperationalStatus; -import eu.teraflow.automation.context.model.EndPoint.EndPointBuilder; -import eu.teraflow.automation.context.model.EndPointId; -import eu.teraflow.automation.context.model.Location; -import eu.teraflow.automation.context.model.LocationTypeRegion; -import eu.teraflow.automation.context.model.TopologyId; -import eu.teraflow.automation.device.DeviceGateway; -import eu.teraflow.automation.kpi_sample_types.model.KpiSampleType; +import eu.teraflow.ztp.context.ContextGateway; +import eu.teraflow.ztp.context.model.ConfigActionEnum; +import eu.teraflow.ztp.context.model.ConfigRule; +import eu.teraflow.ztp.context.model.ConfigRuleCustom; +import eu.teraflow.ztp.context.model.ConfigRuleTypeCustom; +import eu.teraflow.ztp.context.model.Device; +import eu.teraflow.ztp.context.model.DeviceConfig; +import eu.teraflow.ztp.context.model.DeviceDriverEnum; +import eu.teraflow.ztp.context.model.DeviceOperationalStatus; +import eu.teraflow.ztp.context.model.EndPoint.EndPointBuilder; +import eu.teraflow.ztp.context.model.EndPointId; +import eu.teraflow.ztp.context.model.Location; +import eu.teraflow.ztp.context.model.LocationTypeRegion; +import eu.teraflow.ztp.context.model.TopologyId; +import eu.teraflow.ztp.device.DeviceGateway; +import eu.teraflow.ztp.kpi_sample_types.model.KpiSampleType; import io.quarkus.test.junit.QuarkusTest; import io.quarkus.test.junit.mockito.InjectMock; import io.smallrye.mutiny.Uni; @@ -47,12 +46,13 @@ import org.assertj.core.api.Assertions; import org.jboss.logging.Logger; import org.junit.jupiter.api.Test; import org.mockito.Mockito; +import ztp.Ztp; @QuarkusTest -class AutomationFunctionalServiceTest { - private static final Logger LOGGER = Logger.getLogger(AutomationFunctionalServiceTest.class); +class ZtpFunctionalServiceTest { + private static final Logger LOGGER = Logger.getLogger(ZtpFunctionalServiceTest.class); - @Inject AutomationService automationService; + @Inject ZtpService ztpService; @InjectMock DeviceGateway deviceGateway; @InjectMock ContextGateway contextGateway; @@ -73,7 +73,7 @@ class AutomationFunctionalServiceTest { ContextOuterClass.DeviceId.newBuilder().setDeviceUuid(uuidForDeviceId).build(); final var outDeviceRoleId = - Automation.DeviceRoleId.newBuilder() + Ztp.DeviceRoleId.newBuilder() .setDevRoleId(uuidForDeviceRoleId) .setDevId(outDeviceId) .build(); @@ -146,7 +146,7 @@ class AutomationFunctionalServiceTest { .thenReturn(expectedDeviceConfigUni); Mockito.when(deviceGateway.configureDevice(Mockito.any())).thenReturn(expectedDeviceId); - final var currentDevice = automationService.addDevice(deviceId); + final var currentDevice = ztpService.addDevice(deviceId); Assertions.assertThat(currentDevice).isNotNull(); currentDevice @@ -199,7 +199,7 @@ class AutomationFunctionalServiceTest { ContextOuterClass.DeviceId.newBuilder().setDeviceUuid(uuidForDeviceId).build(); final var outDeviceRoleId = - Automation.DeviceRoleId.newBuilder() + Ztp.DeviceRoleId.newBuilder() .setDevRoleId(uuidForDeviceRoleId) .setDevId(outDeviceId) .build(); @@ -265,7 +265,7 @@ class AutomationFunctionalServiceTest { Mockito.when(contextGateway.getDevice(Mockito.any())).thenReturn(deviceUni); - final var currentDevice = automationService.addDevice(deviceId); + final var currentDevice = ztpService.addDevice(deviceId); Assertions.assertThat(currentDevice).isNotNull(); @@ -325,7 +325,7 @@ class AutomationFunctionalServiceTest { ContextOuterClass.DeviceId.newBuilder().setDeviceUuid(uuidForDeviceId).build(); final var outDeviceRoleId = - Automation.DeviceRoleId.newBuilder() + Ztp.DeviceRoleId.newBuilder() .setDevRoleId(uuidForDeviceRoleId) .setDevId(outDeviceId) .build(); @@ -379,7 +379,7 @@ class AutomationFunctionalServiceTest { Mockito.when(contextGateway.getDevice(Mockito.any())).thenReturn(deviceUni); - final var deletedDevice = automationService.deleteDevice(deviceId); + final var deletedDevice = ztpService.deleteDevice(deviceId); Assertions.assertThat(deletedDevice).isNotNull(); diff --git a/src/automation/src/test/java/eu/teraflow/automation/AutomationServiceTest.java b/src/ztp/src/test/java/eu/teraflow/ztp/ZtpServiceTest.java similarity index 89% rename from src/automation/src/test/java/eu/teraflow/automation/AutomationServiceTest.java rename to src/ztp/src/test/java/eu/teraflow/ztp/ZtpServiceTest.java index 7cdca9aed92baaeadfd01a499863d52912dde6c0..f4c38f1fc0eb214db3f6cea120fe783bb5c03c5f 100644 --- a/src/automation/src/test/java/eu/teraflow/automation/AutomationServiceTest.java +++ b/src/ztp/src/test/java/eu/teraflow/ztp/ZtpServiceTest.java @@ -14,33 +14,31 @@ * limitations under the License. */ -package eu.teraflow.automation; +package eu.teraflow.ztp; import static org.assertj.core.api.Assertions.assertThat; -import automation.Automation; -import automation.AutomationService; import context.ContextOuterClass; -import eu.teraflow.automation.context.ContextGateway; -import eu.teraflow.automation.context.model.ConfigActionEnum; -import eu.teraflow.automation.context.model.ConfigRule; -import eu.teraflow.automation.context.model.ConfigRuleCustom; -import eu.teraflow.automation.context.model.ConfigRuleTypeCustom; -import eu.teraflow.automation.context.model.Device; -import eu.teraflow.automation.context.model.DeviceConfig; -import eu.teraflow.automation.context.model.DeviceDriverEnum; -import eu.teraflow.automation.context.model.DeviceOperationalStatus; -import eu.teraflow.automation.context.model.EndPoint.EndPointBuilder; -import eu.teraflow.automation.context.model.EndPointId; -import eu.teraflow.automation.context.model.Location; -import eu.teraflow.automation.context.model.LocationTypeRegion; -import eu.teraflow.automation.context.model.TopologyId; -import eu.teraflow.automation.device.DeviceGateway; -import eu.teraflow.automation.kpi_sample_types.model.KpiSampleType; -import eu.teraflow.automation.model.DeviceRole; -import eu.teraflow.automation.model.DeviceRoleConfig; -import eu.teraflow.automation.model.DeviceRoleId; -import eu.teraflow.automation.model.DeviceRoleType; +import eu.teraflow.ztp.context.ContextGateway; +import eu.teraflow.ztp.context.model.ConfigActionEnum; +import eu.teraflow.ztp.context.model.ConfigRule; +import eu.teraflow.ztp.context.model.ConfigRuleCustom; +import eu.teraflow.ztp.context.model.ConfigRuleTypeCustom; +import eu.teraflow.ztp.context.model.Device; +import eu.teraflow.ztp.context.model.DeviceConfig; +import eu.teraflow.ztp.context.model.DeviceDriverEnum; +import eu.teraflow.ztp.context.model.DeviceOperationalStatus; +import eu.teraflow.ztp.context.model.EndPoint.EndPointBuilder; +import eu.teraflow.ztp.context.model.EndPointId; +import eu.teraflow.ztp.context.model.Location; +import eu.teraflow.ztp.context.model.LocationTypeRegion; +import eu.teraflow.ztp.context.model.TopologyId; +import eu.teraflow.ztp.device.DeviceGateway; +import eu.teraflow.ztp.kpi_sample_types.model.KpiSampleType; +import eu.teraflow.ztp.model.DeviceRole; +import eu.teraflow.ztp.model.DeviceRoleConfig; +import eu.teraflow.ztp.model.DeviceRoleId; +import eu.teraflow.ztp.model.DeviceRoleType; import io.quarkus.grpc.GrpcClient; import io.quarkus.test.junit.QuarkusTest; import io.quarkus.test.junit.mockito.InjectMock; @@ -54,19 +52,21 @@ import javax.inject.Inject; import org.jboss.logging.Logger; import org.junit.jupiter.api.Test; import org.mockito.Mockito; +import ztp.Ztp; +import ztp.ZtpService; @QuarkusTest -class AutomationServiceTest { - private static final Logger LOGGER = Logger.getLogger(AutomationServiceTest.class); +class ZtpServiceTest { + private static final Logger LOGGER = Logger.getLogger(ZtpServiceTest.class); - @GrpcClient AutomationService client; + @GrpcClient ZtpService client; private final Serializer serializer; @InjectMock DeviceGateway deviceGateway; @InjectMock ContextGateway contextGateway; @Inject - AutomationServiceTest(Serializer serializer) { + ZtpServiceTest(Serializer serializer) { this.serializer = serializer; } @@ -282,8 +282,8 @@ class AutomationServiceTest { final var UUID_VALUE = "0f14d0ab-9605-7862-a9e4-5ed26688389b"; final var uuid = serializer.serializeUuid(UUID_VALUE); - final var deviceRoleId = Automation.DeviceRoleId.newBuilder().setDevRoleId(uuid).build(); - final var deviceRole = Automation.DeviceRole.newBuilder().setDevRoleId(deviceRoleId).build(); + final var deviceRoleId = Ztp.DeviceRoleId.newBuilder().setDevRoleId(uuid).build(); + final var deviceRole = Ztp.DeviceRole.newBuilder().setDevRoleId(deviceRoleId).build(); final var DEVICE_ID = "0f14d0ab-9608-7862-a9e4-5ed26688389b"; final var DEVICE_ROLE_ID = "0f14d0ab-9608-7862-a9e4-5ed26688389a"; final var DEVICE_NAME = "deviceNameA"; diff --git a/src/automation/target/generated-sources/grpc/acl/Acl.java b/src/ztp/target/generated-sources/grpc/acl/Acl.java similarity index 100% rename from src/automation/target/generated-sources/grpc/acl/Acl.java rename to src/ztp/target/generated-sources/grpc/acl/Acl.java diff --git a/src/automation/target/generated-sources/grpc/context/ContextOuterClass.java b/src/ztp/target/generated-sources/grpc/context/ContextOuterClass.java similarity index 97% rename from src/automation/target/generated-sources/grpc/context/ContextOuterClass.java rename to src/ztp/target/generated-sources/grpc/context/ContextOuterClass.java index be75963507751fbf5a8a1c92101de4023fd50e63..85bc0d278365971bbf1bcb135d05fd8523392716 100644 --- a/src/automation/target/generated-sources/grpc/context/ContextOuterClass.java +++ b/src/ztp/target/generated-sources/grpc/context/ContextOuterClass.java @@ -457,6 +457,10 @@ public final class ContextOuterClass { * SERVICETYPE_TAPI_CONNECTIVITY_SERVICE = 3; */ SERVICETYPE_TAPI_CONNECTIVITY_SERVICE(3), + /** + * SERVICETYPE_TE = 4; + */ + SERVICETYPE_TE(4), UNRECOGNIZED(-1), ; @@ -476,6 +480,10 @@ public final class ContextOuterClass { * SERVICETYPE_TAPI_CONNECTIVITY_SERVICE = 3; */ public static final int SERVICETYPE_TAPI_CONNECTIVITY_SERVICE_VALUE = 3; + /** + * SERVICETYPE_TE = 4; + */ + public static final int SERVICETYPE_TE_VALUE = 4; public final int getNumber() { @@ -506,6 +514,7 @@ public final class ContextOuterClass { case 1: return SERVICETYPE_L3NM; case 2: return SERVICETYPE_L2NM; case 3: return SERVICETYPE_TAPI_CONNECTIVITY_SERVICE; + case 4: return SERVICETYPE_TE; default: return null; } } @@ -15641,43 +15650,43 @@ public final class ContextOuterClass { * Used for inventory * * - * repeated .context.Component component = 8; + * repeated .context.Component components = 8; */ java.util.List - getComponentList(); + getComponentsList(); /** *
      * Used for inventory
      * 
* - * repeated .context.Component component = 8; + * repeated .context.Component components = 8; */ - context.ContextOuterClass.Component getComponent(int index); + context.ContextOuterClass.Component getComponents(int index); /** *
      * Used for inventory
      * 
* - * repeated .context.Component component = 8; + * repeated .context.Component components = 8; */ - int getComponentCount(); + int getComponentsCount(); /** *
      * Used for inventory
      * 
* - * repeated .context.Component component = 8; + * repeated .context.Component components = 8; */ java.util.List - getComponentOrBuilderList(); + getComponentsOrBuilderList(); /** *
      * Used for inventory
      * 
* - * repeated .context.Component component = 8; + * repeated .context.Component components = 8; */ - context.ContextOuterClass.ComponentOrBuilder getComponentOrBuilder( + context.ContextOuterClass.ComponentOrBuilder getComponentsOrBuilder( int index); /** @@ -15725,7 +15734,7 @@ public final class ContextOuterClass { deviceOperationalStatus_ = 0; deviceDrivers_ = java.util.Collections.emptyList(); deviceEndpoints_ = java.util.Collections.emptyList(); - component_ = java.util.Collections.emptyList(); + components_ = java.util.Collections.emptyList(); } @java.lang.Override @@ -15837,10 +15846,10 @@ public final class ContextOuterClass { } case 66: { if (!((mutable_bitField0_ & 0x00000004) != 0)) { - component_ = new java.util.ArrayList(); + components_ = new java.util.ArrayList(); mutable_bitField0_ |= 0x00000004; } - component_.add( + components_.add( input.readMessage(context.ContextOuterClass.Component.parser(), extensionRegistry)); break; } @@ -15879,7 +15888,7 @@ public final class ContextOuterClass { deviceEndpoints_ = java.util.Collections.unmodifiableList(deviceEndpoints_); } if (((mutable_bitField0_ & 0x00000004) != 0)) { - component_ = java.util.Collections.unmodifiableList(component_); + components_ = java.util.Collections.unmodifiableList(components_); } this.unknownFields = unknownFields.build(); makeExtensionsImmutable(); @@ -16143,64 +16152,64 @@ public final class ContextOuterClass { return deviceEndpoints_.get(index); } - public static final int COMPONENT_FIELD_NUMBER = 8; - private java.util.List component_; + public static final int COMPONENTS_FIELD_NUMBER = 8; + private java.util.List components_; /** *
      * Used for inventory
      * 
* - * repeated .context.Component component = 8; + * repeated .context.Component components = 8; */ @java.lang.Override - public java.util.List getComponentList() { - return component_; + public java.util.List getComponentsList() { + return components_; } /** *
      * Used for inventory
      * 
* - * repeated .context.Component component = 8; + * repeated .context.Component components = 8; */ @java.lang.Override public java.util.List - getComponentOrBuilderList() { - return component_; + getComponentsOrBuilderList() { + return components_; } /** *
      * Used for inventory
      * 
* - * repeated .context.Component component = 8; + * repeated .context.Component components = 8; */ @java.lang.Override - public int getComponentCount() { - return component_.size(); + public int getComponentsCount() { + return components_.size(); } /** *
      * Used for inventory
      * 
* - * repeated .context.Component component = 8; + * repeated .context.Component components = 8; */ @java.lang.Override - public context.ContextOuterClass.Component getComponent(int index) { - return component_.get(index); + public context.ContextOuterClass.Component getComponents(int index) { + return components_.get(index); } /** *
      * Used for inventory
      * 
* - * repeated .context.Component component = 8; + * repeated .context.Component components = 8; */ @java.lang.Override - public context.ContextOuterClass.ComponentOrBuilder getComponentOrBuilder( + public context.ContextOuterClass.ComponentOrBuilder getComponentsOrBuilder( int index) { - return component_.get(index); + return components_.get(index); } public static final int CONTROLLER_ID_FIELD_NUMBER = 9; @@ -16281,8 +16290,8 @@ public final class ContextOuterClass { for (int i = 0; i < deviceEndpoints_.size(); i++) { output.writeMessage(7, deviceEndpoints_.get(i)); } - for (int i = 0; i < component_.size(); i++) { - output.writeMessage(8, component_.get(i)); + for (int i = 0; i < components_.size(); i++) { + output.writeMessage(8, components_.get(i)); } if (controllerId_ != null) { output.writeMessage(9, getControllerId()); @@ -16330,9 +16339,9 @@ public final class ContextOuterClass { size += com.google.protobuf.CodedOutputStream .computeMessageSize(7, deviceEndpoints_.get(i)); } - for (int i = 0; i < component_.size(); i++) { + for (int i = 0; i < components_.size(); i++) { size += com.google.protobuf.CodedOutputStream - .computeMessageSize(8, component_.get(i)); + .computeMessageSize(8, components_.get(i)); } if (controllerId_ != null) { size += com.google.protobuf.CodedOutputStream @@ -16371,8 +16380,8 @@ public final class ContextOuterClass { if (!deviceDrivers_.equals(other.deviceDrivers_)) return false; if (!getDeviceEndpointsList() .equals(other.getDeviceEndpointsList())) return false; - if (!getComponentList() - .equals(other.getComponentList())) return false; + if (!getComponentsList() + .equals(other.getComponentsList())) return false; if (hasControllerId() != other.hasControllerId()) return false; if (hasControllerId()) { if (!getControllerId() @@ -16411,9 +16420,9 @@ public final class ContextOuterClass { hash = (37 * hash) + DEVICE_ENDPOINTS_FIELD_NUMBER; hash = (53 * hash) + getDeviceEndpointsList().hashCode(); } - if (getComponentCount() > 0) { - hash = (37 * hash) + COMPONENT_FIELD_NUMBER; - hash = (53 * hash) + getComponentList().hashCode(); + if (getComponentsCount() > 0) { + hash = (37 * hash) + COMPONENTS_FIELD_NUMBER; + hash = (53 * hash) + getComponentsList().hashCode(); } if (hasControllerId()) { hash = (37 * hash) + CONTROLLER_ID_FIELD_NUMBER; @@ -16548,7 +16557,7 @@ public final class ContextOuterClass { if (com.google.protobuf.GeneratedMessageV3 .alwaysUseFieldBuilders) { getDeviceEndpointsFieldBuilder(); - getComponentFieldBuilder(); + getComponentsFieldBuilder(); } } @java.lang.Override @@ -16580,11 +16589,11 @@ public final class ContextOuterClass { } else { deviceEndpointsBuilder_.clear(); } - if (componentBuilder_ == null) { - component_ = java.util.Collections.emptyList(); + if (componentsBuilder_ == null) { + components_ = java.util.Collections.emptyList(); bitField0_ = (bitField0_ & ~0x00000004); } else { - componentBuilder_.clear(); + componentsBuilder_.clear(); } if (controllerIdBuilder_ == null) { controllerId_ = null; @@ -16646,14 +16655,14 @@ public final class ContextOuterClass { } else { result.deviceEndpoints_ = deviceEndpointsBuilder_.build(); } - if (componentBuilder_ == null) { + if (componentsBuilder_ == null) { if (((bitField0_ & 0x00000004) != 0)) { - component_ = java.util.Collections.unmodifiableList(component_); + components_ = java.util.Collections.unmodifiableList(components_); bitField0_ = (bitField0_ & ~0x00000004); } - result.component_ = component_; + result.components_ = components_; } else { - result.component_ = componentBuilder_.build(); + result.components_ = componentsBuilder_.build(); } if (controllerIdBuilder_ == null) { result.controllerId_ = controllerId_; @@ -16761,29 +16770,29 @@ public final class ContextOuterClass { } } } - if (componentBuilder_ == null) { - if (!other.component_.isEmpty()) { - if (component_.isEmpty()) { - component_ = other.component_; + if (componentsBuilder_ == null) { + if (!other.components_.isEmpty()) { + if (components_.isEmpty()) { + components_ = other.components_; bitField0_ = (bitField0_ & ~0x00000004); } else { - ensureComponentIsMutable(); - component_.addAll(other.component_); + ensureComponentsIsMutable(); + components_.addAll(other.components_); } onChanged(); } } else { - if (!other.component_.isEmpty()) { - if (componentBuilder_.isEmpty()) { - componentBuilder_.dispose(); - componentBuilder_ = null; - component_ = other.component_; + if (!other.components_.isEmpty()) { + if (componentsBuilder_.isEmpty()) { + componentsBuilder_.dispose(); + componentsBuilder_ = null; + components_ = other.components_; bitField0_ = (bitField0_ & ~0x00000004); - componentBuilder_ = + componentsBuilder_ = com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders ? - getComponentFieldBuilder() : null; + getComponentsFieldBuilder() : null; } else { - componentBuilder_.addAllMessages(other.component_); + componentsBuilder_.addAllMessages(other.components_); } } } @@ -17644,30 +17653,30 @@ public final class ContextOuterClass { return deviceEndpointsBuilder_; } - private java.util.List component_ = + private java.util.List components_ = java.util.Collections.emptyList(); - private void ensureComponentIsMutable() { + private void ensureComponentsIsMutable() { if (!((bitField0_ & 0x00000004) != 0)) { - component_ = new java.util.ArrayList(component_); + components_ = new java.util.ArrayList(components_); bitField0_ |= 0x00000004; } } private com.google.protobuf.RepeatedFieldBuilderV3< - context.ContextOuterClass.Component, context.ContextOuterClass.Component.Builder, context.ContextOuterClass.ComponentOrBuilder> componentBuilder_; + context.ContextOuterClass.Component, context.ContextOuterClass.Component.Builder, context.ContextOuterClass.ComponentOrBuilder> componentsBuilder_; /** *
        * Used for inventory
        * 
* - * repeated .context.Component component = 8; + * repeated .context.Component components = 8; */ - public java.util.List getComponentList() { - if (componentBuilder_ == null) { - return java.util.Collections.unmodifiableList(component_); + public java.util.List getComponentsList() { + if (componentsBuilder_ == null) { + return java.util.Collections.unmodifiableList(components_); } else { - return componentBuilder_.getMessageList(); + return componentsBuilder_.getMessageList(); } } /** @@ -17675,13 +17684,13 @@ public final class ContextOuterClass { * Used for inventory * * - * repeated .context.Component component = 8; + * repeated .context.Component components = 8; */ - public int getComponentCount() { - if (componentBuilder_ == null) { - return component_.size(); + public int getComponentsCount() { + if (componentsBuilder_ == null) { + return components_.size(); } else { - return componentBuilder_.getCount(); + return componentsBuilder_.getCount(); } } /** @@ -17689,13 +17698,13 @@ public final class ContextOuterClass { * Used for inventory * * - * repeated .context.Component component = 8; + * repeated .context.Component components = 8; */ - public context.ContextOuterClass.Component getComponent(int index) { - if (componentBuilder_ == null) { - return component_.get(index); + public context.ContextOuterClass.Component getComponents(int index) { + if (componentsBuilder_ == null) { + return components_.get(index); } else { - return componentBuilder_.getMessage(index); + return componentsBuilder_.getMessage(index); } } /** @@ -17703,19 +17712,19 @@ public final class ContextOuterClass { * Used for inventory * * - * repeated .context.Component component = 8; + * repeated .context.Component components = 8; */ - public Builder setComponent( + public Builder setComponents( int index, context.ContextOuterClass.Component value) { - if (componentBuilder_ == null) { + if (componentsBuilder_ == null) { if (value == null) { throw new NullPointerException(); } - ensureComponentIsMutable(); - component_.set(index, value); + ensureComponentsIsMutable(); + components_.set(index, value); onChanged(); } else { - componentBuilder_.setMessage(index, value); + componentsBuilder_.setMessage(index, value); } return this; } @@ -17724,16 +17733,16 @@ public final class ContextOuterClass { * Used for inventory * * - * repeated .context.Component component = 8; + * repeated .context.Component components = 8; */ - public Builder setComponent( + public Builder setComponents( int index, context.ContextOuterClass.Component.Builder builderForValue) { - if (componentBuilder_ == null) { - ensureComponentIsMutable(); - component_.set(index, builderForValue.build()); + if (componentsBuilder_ == null) { + ensureComponentsIsMutable(); + components_.set(index, builderForValue.build()); onChanged(); } else { - componentBuilder_.setMessage(index, builderForValue.build()); + componentsBuilder_.setMessage(index, builderForValue.build()); } return this; } @@ -17742,18 +17751,18 @@ public final class ContextOuterClass { * Used for inventory * * - * repeated .context.Component component = 8; + * repeated .context.Component components = 8; */ - public Builder addComponent(context.ContextOuterClass.Component value) { - if (componentBuilder_ == null) { + public Builder addComponents(context.ContextOuterClass.Component value) { + if (componentsBuilder_ == null) { if (value == null) { throw new NullPointerException(); } - ensureComponentIsMutable(); - component_.add(value); + ensureComponentsIsMutable(); + components_.add(value); onChanged(); } else { - componentBuilder_.addMessage(value); + componentsBuilder_.addMessage(value); } return this; } @@ -17762,19 +17771,19 @@ public final class ContextOuterClass { * Used for inventory * * - * repeated .context.Component component = 8; + * repeated .context.Component components = 8; */ - public Builder addComponent( + public Builder addComponents( int index, context.ContextOuterClass.Component value) { - if (componentBuilder_ == null) { + if (componentsBuilder_ == null) { if (value == null) { throw new NullPointerException(); } - ensureComponentIsMutable(); - component_.add(index, value); + ensureComponentsIsMutable(); + components_.add(index, value); onChanged(); } else { - componentBuilder_.addMessage(index, value); + componentsBuilder_.addMessage(index, value); } return this; } @@ -17783,16 +17792,16 @@ public final class ContextOuterClass { * Used for inventory * * - * repeated .context.Component component = 8; + * repeated .context.Component components = 8; */ - public Builder addComponent( + public Builder addComponents( context.ContextOuterClass.Component.Builder builderForValue) { - if (componentBuilder_ == null) { - ensureComponentIsMutable(); - component_.add(builderForValue.build()); + if (componentsBuilder_ == null) { + ensureComponentsIsMutable(); + components_.add(builderForValue.build()); onChanged(); } else { - componentBuilder_.addMessage(builderForValue.build()); + componentsBuilder_.addMessage(builderForValue.build()); } return this; } @@ -17801,16 +17810,16 @@ public final class ContextOuterClass { * Used for inventory * * - * repeated .context.Component component = 8; + * repeated .context.Component components = 8; */ - public Builder addComponent( + public Builder addComponents( int index, context.ContextOuterClass.Component.Builder builderForValue) { - if (componentBuilder_ == null) { - ensureComponentIsMutable(); - component_.add(index, builderForValue.build()); + if (componentsBuilder_ == null) { + ensureComponentsIsMutable(); + components_.add(index, builderForValue.build()); onChanged(); } else { - componentBuilder_.addMessage(index, builderForValue.build()); + componentsBuilder_.addMessage(index, builderForValue.build()); } return this; } @@ -17819,17 +17828,17 @@ public final class ContextOuterClass { * Used for inventory * * - * repeated .context.Component component = 8; + * repeated .context.Component components = 8; */ - public Builder addAllComponent( + public Builder addAllComponents( java.lang.Iterable values) { - if (componentBuilder_ == null) { - ensureComponentIsMutable(); + if (componentsBuilder_ == null) { + ensureComponentsIsMutable(); com.google.protobuf.AbstractMessageLite.Builder.addAll( - values, component_); + values, components_); onChanged(); } else { - componentBuilder_.addAllMessages(values); + componentsBuilder_.addAllMessages(values); } return this; } @@ -17838,15 +17847,15 @@ public final class ContextOuterClass { * Used for inventory * * - * repeated .context.Component component = 8; + * repeated .context.Component components = 8; */ - public Builder clearComponent() { - if (componentBuilder_ == null) { - component_ = java.util.Collections.emptyList(); + public Builder clearComponents() { + if (componentsBuilder_ == null) { + components_ = java.util.Collections.emptyList(); bitField0_ = (bitField0_ & ~0x00000004); onChanged(); } else { - componentBuilder_.clear(); + componentsBuilder_.clear(); } return this; } @@ -17855,15 +17864,15 @@ public final class ContextOuterClass { * Used for inventory * * - * repeated .context.Component component = 8; + * repeated .context.Component components = 8; */ - public Builder removeComponent(int index) { - if (componentBuilder_ == null) { - ensureComponentIsMutable(); - component_.remove(index); + public Builder removeComponents(int index) { + if (componentsBuilder_ == null) { + ensureComponentsIsMutable(); + components_.remove(index); onChanged(); } else { - componentBuilder_.remove(index); + componentsBuilder_.remove(index); } return this; } @@ -17872,24 +17881,24 @@ public final class ContextOuterClass { * Used for inventory * * - * repeated .context.Component component = 8; + * repeated .context.Component components = 8; */ - public context.ContextOuterClass.Component.Builder getComponentBuilder( + public context.ContextOuterClass.Component.Builder getComponentsBuilder( int index) { - return getComponentFieldBuilder().getBuilder(index); + return getComponentsFieldBuilder().getBuilder(index); } /** *
        * Used for inventory
        * 
* - * repeated .context.Component component = 8; + * repeated .context.Component components = 8; */ - public context.ContextOuterClass.ComponentOrBuilder getComponentOrBuilder( + public context.ContextOuterClass.ComponentOrBuilder getComponentsOrBuilder( int index) { - if (componentBuilder_ == null) { - return component_.get(index); } else { - return componentBuilder_.getMessageOrBuilder(index); + if (componentsBuilder_ == null) { + return components_.get(index); } else { + return componentsBuilder_.getMessageOrBuilder(index); } } /** @@ -17897,14 +17906,14 @@ public final class ContextOuterClass { * Used for inventory * * - * repeated .context.Component component = 8; + * repeated .context.Component components = 8; */ public java.util.List - getComponentOrBuilderList() { - if (componentBuilder_ != null) { - return componentBuilder_.getMessageOrBuilderList(); + getComponentsOrBuilderList() { + if (componentsBuilder_ != null) { + return componentsBuilder_.getMessageOrBuilderList(); } else { - return java.util.Collections.unmodifiableList(component_); + return java.util.Collections.unmodifiableList(components_); } } /** @@ -17912,10 +17921,10 @@ public final class ContextOuterClass { * Used for inventory * * - * repeated .context.Component component = 8; + * repeated .context.Component components = 8; */ - public context.ContextOuterClass.Component.Builder addComponentBuilder() { - return getComponentFieldBuilder().addBuilder( + public context.ContextOuterClass.Component.Builder addComponentsBuilder() { + return getComponentsFieldBuilder().addBuilder( context.ContextOuterClass.Component.getDefaultInstance()); } /** @@ -17923,11 +17932,11 @@ public final class ContextOuterClass { * Used for inventory * * - * repeated .context.Component component = 8; + * repeated .context.Component components = 8; */ - public context.ContextOuterClass.Component.Builder addComponentBuilder( + public context.ContextOuterClass.Component.Builder addComponentsBuilder( int index) { - return getComponentFieldBuilder().addBuilder( + return getComponentsFieldBuilder().addBuilder( index, context.ContextOuterClass.Component.getDefaultInstance()); } /** @@ -17935,25 +17944,25 @@ public final class ContextOuterClass { * Used for inventory * * - * repeated .context.Component component = 8; + * repeated .context.Component components = 8; */ public java.util.List - getComponentBuilderList() { - return getComponentFieldBuilder().getBuilderList(); + getComponentsBuilderList() { + return getComponentsFieldBuilder().getBuilderList(); } private com.google.protobuf.RepeatedFieldBuilderV3< context.ContextOuterClass.Component, context.ContextOuterClass.Component.Builder, context.ContextOuterClass.ComponentOrBuilder> - getComponentFieldBuilder() { - if (componentBuilder_ == null) { - componentBuilder_ = new com.google.protobuf.RepeatedFieldBuilderV3< + getComponentsFieldBuilder() { + if (componentsBuilder_ == null) { + componentsBuilder_ = new com.google.protobuf.RepeatedFieldBuilderV3< context.ContextOuterClass.Component, context.ContextOuterClass.Component.Builder, context.ContextOuterClass.ComponentOrBuilder>( - component_, + components_, ((bitField0_ & 0x00000004) != 0), getParentForChildren(), isClean()); - component_ = null; + components_ = null; } - return componentBuilder_; + return componentsBuilder_; } private context.ContextOuterClass.DeviceId controllerId_; @@ -18168,31 +18177,115 @@ public final class ContextOuterClass { com.google.protobuf.MessageOrBuilder { /** - * repeated string comp_string = 1; - * @return A list containing the compString. + * .context.Uuid component_uuid = 1; + * @return Whether the componentUuid field is set. */ - java.util.List - getCompStringList(); + boolean hasComponentUuid(); /** - * repeated string comp_string = 1; - * @return The count of compString. + * .context.Uuid component_uuid = 1; + * @return The componentUuid. */ - int getCompStringCount(); + context.ContextOuterClass.Uuid getComponentUuid(); /** - * repeated string comp_string = 1; - * @param index The index of the element to return. - * @return The compString at the given index. + * .context.Uuid component_uuid = 1; */ - java.lang.String getCompString(int index); + context.ContextOuterClass.UuidOrBuilder getComponentUuidOrBuilder(); + /** - * repeated string comp_string = 1; - * @param index The index of the value to return. - * @return The bytes of the compString at the given index. + * string name = 2; + * @return The name. + */ + java.lang.String getName(); + /** + * string name = 2; + * @return The bytes for name. + */ + com.google.protobuf.ByteString + getNameBytes(); + + /** + * string type = 3; + * @return The type. + */ + java.lang.String getType(); + /** + * string type = 3; + * @return The bytes for type. + */ + com.google.protobuf.ByteString + getTypeBytes(); + + /** + *
+     * dict[attr.name => json.dumps(attr.value)]
+     * 
+ * + * map<string, string> attributes = 4; + */ + int getAttributesCount(); + /** + *
+     * dict[attr.name => json.dumps(attr.value)]
+     * 
+ * + * map<string, string> attributes = 4; + */ + boolean containsAttributes( + java.lang.String key); + /** + * Use {@link #getAttributesMap()} instead. + */ + @java.lang.Deprecated + java.util.Map + getAttributes(); + /** + *
+     * dict[attr.name => json.dumps(attr.value)]
+     * 
+ * + * map<string, string> attributes = 4; + */ + java.util.Map + getAttributesMap(); + /** + *
+     * dict[attr.name => json.dumps(attr.value)]
+     * 
+ * + * map<string, string> attributes = 4; + */ + + java.lang.String getAttributesOrDefault( + java.lang.String key, + java.lang.String defaultValue); + /** + *
+     * dict[attr.name => json.dumps(attr.value)]
+     * 
+ * + * map<string, string> attributes = 4; + */ + + java.lang.String getAttributesOrThrow( + java.lang.String key); + + /** + * string parent = 5; + * @return The parent. + */ + java.lang.String getParent(); + /** + * string parent = 5; + * @return The bytes for parent. */ com.google.protobuf.ByteString - getCompStringBytes(int index); + getParentBytes(); } /** + *
+   *Defined previously to this section - Tested OK
+   * 
+ * * Protobuf type {@code context.Component} */ public static final class Component extends @@ -18205,7 +18298,9 @@ public final class ContextOuterClass { super(builder); } private Component() { - compString_ = com.google.protobuf.LazyStringArrayList.EMPTY; + name_ = ""; + type_ = ""; + parent_ = ""; } @java.lang.Override @@ -18240,12 +18335,47 @@ public final class ContextOuterClass { done = true; break; case 10: { + context.ContextOuterClass.Uuid.Builder subBuilder = null; + if (componentUuid_ != null) { + subBuilder = componentUuid_.toBuilder(); + } + componentUuid_ = input.readMessage(context.ContextOuterClass.Uuid.parser(), extensionRegistry); + if (subBuilder != null) { + subBuilder.mergeFrom(componentUuid_); + componentUuid_ = subBuilder.buildPartial(); + } + + break; + } + case 18: { java.lang.String s = input.readStringRequireUtf8(); + + name_ = s; + break; + } + case 26: { + java.lang.String s = input.readStringRequireUtf8(); + + type_ = s; + break; + } + case 34: { if (!((mutable_bitField0_ & 0x00000001) != 0)) { - compString_ = new com.google.protobuf.LazyStringArrayList(); + attributes_ = com.google.protobuf.MapField.newMapField( + AttributesDefaultEntryHolder.defaultEntry); mutable_bitField0_ |= 0x00000001; } - compString_.add(s); + com.google.protobuf.MapEntry + attributes__ = input.readMessage( + AttributesDefaultEntryHolder.defaultEntry.getParserForType(), extensionRegistry); + attributes_.getMutableMap().put( + attributes__.getKey(), attributes__.getValue()); + break; + } + case 42: { + java.lang.String s = input.readStringRequireUtf8(); + + parent_ = s; break; } default: { @@ -18263,9 +18393,6 @@ public final class ContextOuterClass { throw new com.google.protobuf.InvalidProtocolBufferException( e).setUnfinishedMessage(this); } finally { - if (((mutable_bitField0_ & 0x00000001) != 0)) { - compString_ = compString_.getUnmodifiableView(); - } this.unknownFields = unknownFields.build(); makeExtensionsImmutable(); } @@ -18275,6 +18402,18 @@ public final class ContextOuterClass { return context.ContextOuterClass.internal_static_context_Component_descriptor; } + @SuppressWarnings({"rawtypes"}) + @java.lang.Override + protected com.google.protobuf.MapField internalGetMapField( + int number) { + switch (number) { + case 4: + return internalGetAttributes(); + default: + throw new RuntimeException( + "Invalid map field number: " + number); + } + } @java.lang.Override protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable internalGetFieldAccessorTable() { @@ -18283,39 +18422,241 @@ public final class ContextOuterClass { context.ContextOuterClass.Component.class, context.ContextOuterClass.Component.Builder.class); } - public static final int COMP_STRING_FIELD_NUMBER = 1; - private com.google.protobuf.LazyStringList compString_; + public static final int COMPONENT_UUID_FIELD_NUMBER = 1; + private context.ContextOuterClass.Uuid componentUuid_; /** - * repeated string comp_string = 1; - * @return A list containing the compString. + * .context.Uuid component_uuid = 1; + * @return Whether the componentUuid field is set. */ - public com.google.protobuf.ProtocolStringList - getCompStringList() { - return compString_; + @java.lang.Override + public boolean hasComponentUuid() { + return componentUuid_ != null; } /** - * repeated string comp_string = 1; - * @return The count of compString. + * .context.Uuid component_uuid = 1; + * @return The componentUuid. */ - public int getCompStringCount() { - return compString_.size(); + @java.lang.Override + public context.ContextOuterClass.Uuid getComponentUuid() { + return componentUuid_ == null ? context.ContextOuterClass.Uuid.getDefaultInstance() : componentUuid_; } /** - * repeated string comp_string = 1; - * @param index The index of the element to return. - * @return The compString at the given index. + * .context.Uuid component_uuid = 1; + */ + @java.lang.Override + public context.ContextOuterClass.UuidOrBuilder getComponentUuidOrBuilder() { + return getComponentUuid(); + } + + public static final int NAME_FIELD_NUMBER = 2; + private volatile java.lang.Object name_; + /** + * string name = 2; + * @return The name. */ - public java.lang.String getCompString(int index) { - return compString_.get(index); + @java.lang.Override + public java.lang.String getName() { + java.lang.Object ref = name_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + name_ = s; + return s; + } } /** - * repeated string comp_string = 1; - * @param index The index of the value to return. - * @return The bytes of the compString at the given index. + * string name = 2; + * @return The bytes for name. */ + @java.lang.Override public com.google.protobuf.ByteString - getCompStringBytes(int index) { - return compString_.getByteString(index); + getNameBytes() { + java.lang.Object ref = name_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + name_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int TYPE_FIELD_NUMBER = 3; + private volatile java.lang.Object type_; + /** + * string type = 3; + * @return The type. + */ + @java.lang.Override + public java.lang.String getType() { + java.lang.Object ref = type_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + type_ = s; + return s; + } + } + /** + * string type = 3; + * @return The bytes for type. + */ + @java.lang.Override + public com.google.protobuf.ByteString + getTypeBytes() { + java.lang.Object ref = type_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + type_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int ATTRIBUTES_FIELD_NUMBER = 4; + private static final class AttributesDefaultEntryHolder { + static final com.google.protobuf.MapEntry< + java.lang.String, java.lang.String> defaultEntry = + com.google.protobuf.MapEntry + .newDefaultInstance( + context.ContextOuterClass.internal_static_context_Component_AttributesEntry_descriptor, + com.google.protobuf.WireFormat.FieldType.STRING, + "", + com.google.protobuf.WireFormat.FieldType.STRING, + ""); + } + private com.google.protobuf.MapField< + java.lang.String, java.lang.String> attributes_; + private com.google.protobuf.MapField + internalGetAttributes() { + if (attributes_ == null) { + return com.google.protobuf.MapField.emptyMapField( + AttributesDefaultEntryHolder.defaultEntry); + } + return attributes_; + } + + public int getAttributesCount() { + return internalGetAttributes().getMap().size(); + } + /** + *
+     * dict[attr.name => json.dumps(attr.value)]
+     * 
+ * + * map<string, string> attributes = 4; + */ + + @java.lang.Override + public boolean containsAttributes( + java.lang.String key) { + if (key == null) { throw new java.lang.NullPointerException(); } + return internalGetAttributes().getMap().containsKey(key); + } + /** + * Use {@link #getAttributesMap()} instead. + */ + @java.lang.Override + @java.lang.Deprecated + public java.util.Map getAttributes() { + return getAttributesMap(); + } + /** + *
+     * dict[attr.name => json.dumps(attr.value)]
+     * 
+ * + * map<string, string> attributes = 4; + */ + @java.lang.Override + + public java.util.Map getAttributesMap() { + return internalGetAttributes().getMap(); + } + /** + *
+     * dict[attr.name => json.dumps(attr.value)]
+     * 
+ * + * map<string, string> attributes = 4; + */ + @java.lang.Override + + public java.lang.String getAttributesOrDefault( + java.lang.String key, + java.lang.String defaultValue) { + if (key == null) { throw new java.lang.NullPointerException(); } + java.util.Map map = + internalGetAttributes().getMap(); + return map.containsKey(key) ? map.get(key) : defaultValue; + } + /** + *
+     * dict[attr.name => json.dumps(attr.value)]
+     * 
+ * + * map<string, string> attributes = 4; + */ + @java.lang.Override + + public java.lang.String getAttributesOrThrow( + java.lang.String key) { + if (key == null) { throw new java.lang.NullPointerException(); } + java.util.Map map = + internalGetAttributes().getMap(); + if (!map.containsKey(key)) { + throw new java.lang.IllegalArgumentException(); + } + return map.get(key); + } + + public static final int PARENT_FIELD_NUMBER = 5; + private volatile java.lang.Object parent_; + /** + * string parent = 5; + * @return The parent. + */ + @java.lang.Override + public java.lang.String getParent() { + java.lang.Object ref = parent_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + parent_ = s; + return s; + } + } + /** + * string parent = 5; + * @return The bytes for parent. + */ + @java.lang.Override + public com.google.protobuf.ByteString + getParentBytes() { + java.lang.Object ref = parent_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + parent_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } } private byte memoizedIsInitialized = -1; @@ -18332,8 +18673,23 @@ public final class ContextOuterClass { @java.lang.Override public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { - for (int i = 0; i < compString_.size(); i++) { - com.google.protobuf.GeneratedMessageV3.writeString(output, 1, compString_.getRaw(i)); + if (componentUuid_ != null) { + output.writeMessage(1, getComponentUuid()); + } + if (!getNameBytes().isEmpty()) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 2, name_); + } + if (!getTypeBytes().isEmpty()) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 3, type_); + } + com.google.protobuf.GeneratedMessageV3 + .serializeStringMapTo( + output, + internalGetAttributes(), + AttributesDefaultEntryHolder.defaultEntry, + 4); + if (!getParentBytes().isEmpty()) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 5, parent_); } unknownFields.writeTo(output); } @@ -18344,13 +18700,28 @@ public final class ContextOuterClass { if (size != -1) return size; size = 0; - { - int dataSize = 0; - for (int i = 0; i < compString_.size(); i++) { - dataSize += computeStringSizeNoTag(compString_.getRaw(i)); - } - size += dataSize; - size += 1 * getCompStringList().size(); + if (componentUuid_ != null) { + size += com.google.protobuf.CodedOutputStream + .computeMessageSize(1, getComponentUuid()); + } + if (!getNameBytes().isEmpty()) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(2, name_); + } + if (!getTypeBytes().isEmpty()) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(3, type_); + } + for (java.util.Map.Entry entry + : internalGetAttributes().getMap().entrySet()) { + com.google.protobuf.MapEntry + attributes__ = AttributesDefaultEntryHolder.defaultEntry.newBuilderForType() + .setKey(entry.getKey()) + .setValue(entry.getValue()) + .build(); + size += com.google.protobuf.CodedOutputStream + .computeMessageSize(4, attributes__); + } + if (!getParentBytes().isEmpty()) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(5, parent_); } size += unknownFields.getSerializedSize(); memoizedSize = size; @@ -18367,8 +18738,19 @@ public final class ContextOuterClass { } context.ContextOuterClass.Component other = (context.ContextOuterClass.Component) obj; - if (!getCompStringList() - .equals(other.getCompStringList())) return false; + if (hasComponentUuid() != other.hasComponentUuid()) return false; + if (hasComponentUuid()) { + if (!getComponentUuid() + .equals(other.getComponentUuid())) return false; + } + if (!getName() + .equals(other.getName())) return false; + if (!getType() + .equals(other.getType())) return false; + if (!internalGetAttributes().equals( + other.internalGetAttributes())) return false; + if (!getParent() + .equals(other.getParent())) return false; if (!unknownFields.equals(other.unknownFields)) return false; return true; } @@ -18380,10 +18762,20 @@ public final class ContextOuterClass { } int hash = 41; hash = (19 * hash) + getDescriptor().hashCode(); - if (getCompStringCount() > 0) { - hash = (37 * hash) + COMP_STRING_FIELD_NUMBER; - hash = (53 * hash) + getCompStringList().hashCode(); + if (hasComponentUuid()) { + hash = (37 * hash) + COMPONENT_UUID_FIELD_NUMBER; + hash = (53 * hash) + getComponentUuid().hashCode(); } + hash = (37 * hash) + NAME_FIELD_NUMBER; + hash = (53 * hash) + getName().hashCode(); + hash = (37 * hash) + TYPE_FIELD_NUMBER; + hash = (53 * hash) + getType().hashCode(); + if (!internalGetAttributes().getMap().isEmpty()) { + hash = (37 * hash) + ATTRIBUTES_FIELD_NUMBER; + hash = (53 * hash) + internalGetAttributes().hashCode(); + } + hash = (37 * hash) + PARENT_FIELD_NUMBER; + hash = (53 * hash) + getParent().hashCode(); hash = (29 * hash) + unknownFields.hashCode(); memoizedHashCode = hash; return hash; @@ -18480,6 +18872,10 @@ public final class ContextOuterClass { return builder; } /** + *
+     *Defined previously to this section - Tested OK
+     * 
+ * * Protobuf type {@code context.Component} */ public static final class Builder extends @@ -18491,6 +18887,28 @@ public final class ContextOuterClass { return context.ContextOuterClass.internal_static_context_Component_descriptor; } + @SuppressWarnings({"rawtypes"}) + protected com.google.protobuf.MapField internalGetMapField( + int number) { + switch (number) { + case 4: + return internalGetAttributes(); + default: + throw new RuntimeException( + "Invalid map field number: " + number); + } + } + @SuppressWarnings({"rawtypes"}) + protected com.google.protobuf.MapField internalGetMutableMapField( + int number) { + switch (number) { + case 4: + return internalGetMutableAttributes(); + default: + throw new RuntimeException( + "Invalid map field number: " + number); + } + } @java.lang.Override protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable internalGetFieldAccessorTable() { @@ -18517,8 +18935,19 @@ public final class ContextOuterClass { @java.lang.Override public Builder clear() { super.clear(); - compString_ = com.google.protobuf.LazyStringArrayList.EMPTY; - bitField0_ = (bitField0_ & ~0x00000001); + if (componentUuidBuilder_ == null) { + componentUuid_ = null; + } else { + componentUuid_ = null; + componentUuidBuilder_ = null; + } + name_ = ""; + + type_ = ""; + + internalGetMutableAttributes().clear(); + parent_ = ""; + return this; } @@ -18546,11 +18975,16 @@ public final class ContextOuterClass { public context.ContextOuterClass.Component buildPartial() { context.ContextOuterClass.Component result = new context.ContextOuterClass.Component(this); int from_bitField0_ = bitField0_; - if (((bitField0_ & 0x00000001) != 0)) { - compString_ = compString_.getUnmodifiableView(); - bitField0_ = (bitField0_ & ~0x00000001); + if (componentUuidBuilder_ == null) { + result.componentUuid_ = componentUuid_; + } else { + result.componentUuid_ = componentUuidBuilder_.build(); } - result.compString_ = compString_; + result.name_ = name_; + result.type_ = type_; + result.attributes_ = internalGetAttributes(); + result.attributes_.makeImmutable(); + result.parent_ = parent_; onBuilt(); return result; } @@ -18599,14 +19033,21 @@ public final class ContextOuterClass { public Builder mergeFrom(context.ContextOuterClass.Component other) { if (other == context.ContextOuterClass.Component.getDefaultInstance()) return this; - if (!other.compString_.isEmpty()) { - if (compString_.isEmpty()) { - compString_ = other.compString_; - bitField0_ = (bitField0_ & ~0x00000001); - } else { - ensureCompStringIsMutable(); - compString_.addAll(other.compString_); - } + if (other.hasComponentUuid()) { + mergeComponentUuid(other.getComponentUuid()); + } + if (!other.getName().isEmpty()) { + name_ = other.name_; + onChanged(); + } + if (!other.getType().isEmpty()) { + type_ = other.type_; + onChanged(); + } + internalGetMutableAttributes().mergeFrom( + other.internalGetAttributes()); + if (!other.getParent().isEmpty()) { + parent_ = other.parent_; onChanged(); } this.mergeUnknownFields(other.unknownFields); @@ -18639,112 +19080,505 @@ public final class ContextOuterClass { } private int bitField0_; - private com.google.protobuf.LazyStringList compString_ = com.google.protobuf.LazyStringArrayList.EMPTY; - private void ensureCompStringIsMutable() { - if (!((bitField0_ & 0x00000001) != 0)) { - compString_ = new com.google.protobuf.LazyStringArrayList(compString_); - bitField0_ |= 0x00000001; - } + private context.ContextOuterClass.Uuid componentUuid_; + private com.google.protobuf.SingleFieldBuilderV3< + context.ContextOuterClass.Uuid, context.ContextOuterClass.Uuid.Builder, context.ContextOuterClass.UuidOrBuilder> componentUuidBuilder_; + /** + * .context.Uuid component_uuid = 1; + * @return Whether the componentUuid field is set. + */ + public boolean hasComponentUuid() { + return componentUuidBuilder_ != null || componentUuid_ != null; } /** - * repeated string comp_string = 1; - * @return A list containing the compString. + * .context.Uuid component_uuid = 1; + * @return The componentUuid. */ - public com.google.protobuf.ProtocolStringList - getCompStringList() { - return compString_.getUnmodifiableView(); + public context.ContextOuterClass.Uuid getComponentUuid() { + if (componentUuidBuilder_ == null) { + return componentUuid_ == null ? context.ContextOuterClass.Uuid.getDefaultInstance() : componentUuid_; + } else { + return componentUuidBuilder_.getMessage(); + } } /** - * repeated string comp_string = 1; - * @return The count of compString. + * .context.Uuid component_uuid = 1; */ - public int getCompStringCount() { - return compString_.size(); + public Builder setComponentUuid(context.ContextOuterClass.Uuid value) { + if (componentUuidBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + componentUuid_ = value; + onChanged(); + } else { + componentUuidBuilder_.setMessage(value); + } + + return this; } /** - * repeated string comp_string = 1; - * @param index The index of the element to return. - * @return The compString at the given index. + * .context.Uuid component_uuid = 1; */ - public java.lang.String getCompString(int index) { - return compString_.get(index); + public Builder setComponentUuid( + context.ContextOuterClass.Uuid.Builder builderForValue) { + if (componentUuidBuilder_ == null) { + componentUuid_ = builderForValue.build(); + onChanged(); + } else { + componentUuidBuilder_.setMessage(builderForValue.build()); + } + + return this; } /** - * repeated string comp_string = 1; - * @param index The index of the value to return. - * @return The bytes of the compString at the given index. + * .context.Uuid component_uuid = 1; + */ + public Builder mergeComponentUuid(context.ContextOuterClass.Uuid value) { + if (componentUuidBuilder_ == null) { + if (componentUuid_ != null) { + componentUuid_ = + context.ContextOuterClass.Uuid.newBuilder(componentUuid_).mergeFrom(value).buildPartial(); + } else { + componentUuid_ = value; + } + onChanged(); + } else { + componentUuidBuilder_.mergeFrom(value); + } + + return this; + } + /** + * .context.Uuid component_uuid = 1; + */ + public Builder clearComponentUuid() { + if (componentUuidBuilder_ == null) { + componentUuid_ = null; + onChanged(); + } else { + componentUuid_ = null; + componentUuidBuilder_ = null; + } + + return this; + } + /** + * .context.Uuid component_uuid = 1; + */ + public context.ContextOuterClass.Uuid.Builder getComponentUuidBuilder() { + + onChanged(); + return getComponentUuidFieldBuilder().getBuilder(); + } + /** + * .context.Uuid component_uuid = 1; + */ + public context.ContextOuterClass.UuidOrBuilder getComponentUuidOrBuilder() { + if (componentUuidBuilder_ != null) { + return componentUuidBuilder_.getMessageOrBuilder(); + } else { + return componentUuid_ == null ? + context.ContextOuterClass.Uuid.getDefaultInstance() : componentUuid_; + } + } + /** + * .context.Uuid component_uuid = 1; + */ + private com.google.protobuf.SingleFieldBuilderV3< + context.ContextOuterClass.Uuid, context.ContextOuterClass.Uuid.Builder, context.ContextOuterClass.UuidOrBuilder> + getComponentUuidFieldBuilder() { + if (componentUuidBuilder_ == null) { + componentUuidBuilder_ = new com.google.protobuf.SingleFieldBuilderV3< + context.ContextOuterClass.Uuid, context.ContextOuterClass.Uuid.Builder, context.ContextOuterClass.UuidOrBuilder>( + getComponentUuid(), + getParentForChildren(), + isClean()); + componentUuid_ = null; + } + return componentUuidBuilder_; + } + + private java.lang.Object name_ = ""; + /** + * string name = 2; + * @return The name. + */ + public java.lang.String getName() { + java.lang.Object ref = name_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + name_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * string name = 2; + * @return The bytes for name. */ public com.google.protobuf.ByteString - getCompStringBytes(int index) { - return compString_.getByteString(index); + getNameBytes() { + java.lang.Object ref = name_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + name_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } } /** - * repeated string comp_string = 1; - * @param index The index to set the value at. - * @param value The compString to set. + * string name = 2; + * @param value The name to set. * @return This builder for chaining. */ - public Builder setCompString( - int index, java.lang.String value) { + public Builder setName( + java.lang.String value) { if (value == null) { throw new NullPointerException(); } - ensureCompStringIsMutable(); - compString_.set(index, value); + + name_ = value; onChanged(); return this; } /** - * repeated string comp_string = 1; - * @param value The compString to add. + * string name = 2; * @return This builder for chaining. */ - public Builder addCompString( + public Builder clearName() { + + name_ = getDefaultInstance().getName(); + onChanged(); + return this; + } + /** + * string name = 2; + * @param value The bytes for name to set. + * @return This builder for chaining. + */ + public Builder setNameBytes( + com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + + name_ = value; + onChanged(); + return this; + } + + private java.lang.Object type_ = ""; + /** + * string type = 3; + * @return The type. + */ + public java.lang.String getType() { + java.lang.Object ref = type_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + type_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * string type = 3; + * @return The bytes for type. + */ + public com.google.protobuf.ByteString + getTypeBytes() { + java.lang.Object ref = type_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + type_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * string type = 3; + * @param value The type to set. + * @return This builder for chaining. + */ + public Builder setType( java.lang.String value) { if (value == null) { throw new NullPointerException(); } - ensureCompStringIsMutable(); - compString_.add(value); + + type_ = value; onChanged(); return this; } /** - * repeated string comp_string = 1; - * @param values The compString to add. + * string type = 3; * @return This builder for chaining. */ - public Builder addAllCompString( - java.lang.Iterable values) { - ensureCompStringIsMutable(); - com.google.protobuf.AbstractMessageLite.Builder.addAll( - values, compString_); + public Builder clearType() { + + type_ = getDefaultInstance().getType(); onChanged(); return this; } /** - * repeated string comp_string = 1; + * string type = 3; + * @param value The bytes for type to set. * @return This builder for chaining. */ - public Builder clearCompString() { - compString_ = com.google.protobuf.LazyStringArrayList.EMPTY; - bitField0_ = (bitField0_ & ~0x00000001); + public Builder setTypeBytes( + com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + + type_ = value; + onChanged(); + return this; + } + + private com.google.protobuf.MapField< + java.lang.String, java.lang.String> attributes_; + private com.google.protobuf.MapField + internalGetAttributes() { + if (attributes_ == null) { + return com.google.protobuf.MapField.emptyMapField( + AttributesDefaultEntryHolder.defaultEntry); + } + return attributes_; + } + private com.google.protobuf.MapField + internalGetMutableAttributes() { + onChanged();; + if (attributes_ == null) { + attributes_ = com.google.protobuf.MapField.newMapField( + AttributesDefaultEntryHolder.defaultEntry); + } + if (!attributes_.isMutable()) { + attributes_ = attributes_.copy(); + } + return attributes_; + } + + public int getAttributesCount() { + return internalGetAttributes().getMap().size(); + } + /** + *
+       * dict[attr.name => json.dumps(attr.value)]
+       * 
+ * + * map<string, string> attributes = 4; + */ + + @java.lang.Override + public boolean containsAttributes( + java.lang.String key) { + if (key == null) { throw new java.lang.NullPointerException(); } + return internalGetAttributes().getMap().containsKey(key); + } + /** + * Use {@link #getAttributesMap()} instead. + */ + @java.lang.Override + @java.lang.Deprecated + public java.util.Map getAttributes() { + return getAttributesMap(); + } + /** + *
+       * dict[attr.name => json.dumps(attr.value)]
+       * 
+ * + * map<string, string> attributes = 4; + */ + @java.lang.Override + + public java.util.Map getAttributesMap() { + return internalGetAttributes().getMap(); + } + /** + *
+       * dict[attr.name => json.dumps(attr.value)]
+       * 
+ * + * map<string, string> attributes = 4; + */ + @java.lang.Override + + public java.lang.String getAttributesOrDefault( + java.lang.String key, + java.lang.String defaultValue) { + if (key == null) { throw new java.lang.NullPointerException(); } + java.util.Map map = + internalGetAttributes().getMap(); + return map.containsKey(key) ? map.get(key) : defaultValue; + } + /** + *
+       * dict[attr.name => json.dumps(attr.value)]
+       * 
+ * + * map<string, string> attributes = 4; + */ + @java.lang.Override + + public java.lang.String getAttributesOrThrow( + java.lang.String key) { + if (key == null) { throw new java.lang.NullPointerException(); } + java.util.Map map = + internalGetAttributes().getMap(); + if (!map.containsKey(key)) { + throw new java.lang.IllegalArgumentException(); + } + return map.get(key); + } + + public Builder clearAttributes() { + internalGetMutableAttributes().getMutableMap() + .clear(); + return this; + } + /** + *
+       * dict[attr.name => json.dumps(attr.value)]
+       * 
+ * + * map<string, string> attributes = 4; + */ + + public Builder removeAttributes( + java.lang.String key) { + if (key == null) { throw new java.lang.NullPointerException(); } + internalGetMutableAttributes().getMutableMap() + .remove(key); + return this; + } + /** + * Use alternate mutation accessors instead. + */ + @java.lang.Deprecated + public java.util.Map + getMutableAttributes() { + return internalGetMutableAttributes().getMutableMap(); + } + /** + *
+       * dict[attr.name => json.dumps(attr.value)]
+       * 
+ * + * map<string, string> attributes = 4; + */ + public Builder putAttributes( + java.lang.String key, + java.lang.String value) { + if (key == null) { throw new java.lang.NullPointerException(); } + if (value == null) { throw new java.lang.NullPointerException(); } + internalGetMutableAttributes().getMutableMap() + .put(key, value); + return this; + } + /** + *
+       * dict[attr.name => json.dumps(attr.value)]
+       * 
+ * + * map<string, string> attributes = 4; + */ + + public Builder putAllAttributes( + java.util.Map values) { + internalGetMutableAttributes().getMutableMap() + .putAll(values); + return this; + } + + private java.lang.Object parent_ = ""; + /** + * string parent = 5; + * @return The parent. + */ + public java.lang.String getParent() { + java.lang.Object ref = parent_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + parent_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * string parent = 5; + * @return The bytes for parent. + */ + public com.google.protobuf.ByteString + getParentBytes() { + java.lang.Object ref = parent_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + parent_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * string parent = 5; + * @param value The parent to set. + * @return This builder for chaining. + */ + public Builder setParent( + java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + + parent_ = value; + onChanged(); + return this; + } + /** + * string parent = 5; + * @return This builder for chaining. + */ + public Builder clearParent() { + + parent_ = getDefaultInstance().getParent(); onChanged(); return this; } /** - * repeated string comp_string = 1; - * @param value The bytes of the compString to add. + * string parent = 5; + * @param value The bytes for parent to set. * @return This builder for chaining. */ - public Builder addCompStringBytes( + public Builder setParentBytes( com.google.protobuf.ByteString value) { if (value == null) { throw new NullPointerException(); } checkByteStringIsUtf8(value); - ensureCompStringIsMutable(); - compString_.add(value); + + parent_ = value; onChanged(); return this; } @@ -73697,6 +74531,11 @@ public final class ContextOuterClass { private static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable internal_static_context_Component_fieldAccessorTable; + private static final com.google.protobuf.Descriptors.Descriptor + internal_static_context_Component_AttributesEntry_descriptor; + private static final + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_context_Component_AttributesEntry_fieldAccessorTable; private static final com.google.protobuf.Descriptors.Descriptor internal_static_context_DeviceConfig_descriptor; private static final @@ -74034,290 +74873,294 @@ public final class ContextOuterClass { "vent\022\035\n\005event\030\001 \001(\0132\016.context.Event\022(\n\013t" + "opology_id\030\002 \001(\0132\023.context.TopologyId\".\n" + "\010DeviceId\022\"\n\013device_uuid\030\001 \001(\0132\r.context" + - ".Uuid\"\371\002\n\006Device\022$\n\tdevice_id\030\001 \001(\0132\021.co" + + ".Uuid\"\372\002\n\006Device\022$\n\tdevice_id\030\001 \001(\0132\021.co" + "ntext.DeviceId\022\014\n\004name\030\002 \001(\t\022\023\n\013device_t" + "ype\030\003 \001(\t\022,\n\rdevice_config\030\004 \001(\0132\025.conte" + "xt.DeviceConfig\022G\n\031device_operational_st" + "atus\030\005 \001(\0162$.context.DeviceOperationalSt" + "atusEnum\0221\n\016device_drivers\030\006 \003(\0162\031.conte" + "xt.DeviceDriverEnum\022+\n\020device_endpoints\030" + - "\007 \003(\0132\021.context.EndPoint\022%\n\tcomponent\030\010 " + - "\003(\0132\022.context.Component\022(\n\rcontroller_id" + - "\030\t \001(\0132\021.context.DeviceId\" \n\tComponent\022\023" + - "\n\013comp_string\030\001 \003(\t\"9\n\014DeviceConfig\022)\n\014c" + - "onfig_rules\030\001 \003(\0132\023.context.ConfigRule\"5" + - "\n\014DeviceIdList\022%\n\ndevice_ids\030\001 \003(\0132\021.con" + - "text.DeviceId\".\n\nDeviceList\022 \n\007devices\030\001" + - " \003(\0132\017.context.Device\"\216\001\n\014DeviceFilter\022)" + - "\n\ndevice_ids\030\001 \001(\0132\025.context.DeviceIdLis" + - "t\022\031\n\021include_endpoints\030\002 \001(\010\022\034\n\024include_" + - "config_rules\030\003 \001(\010\022\032\n\022include_components" + - "\030\004 \001(\010\"\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\"f\n\004Link\022 \n\007link_id" + - "\030\001 \001(\0132\017.context.LinkId\022\014\n\004name\030\002 \001(\t\022.\n" + - "\021link_endpoint_ids\030\003 \003(\0132\023.context.EndPo" + - "intId\"/\n\nLinkIdList\022!\n\010link_ids\030\001 \003(\0132\017." + - "context.LinkId\"(\n\010LinkList\022\034\n\005links\030\001 \003(" + - "\0132\r.context.Link\"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_i" + - "d\030\001 \001(\0132\022.context.ContextId\022#\n\014service_u" + - "uid\030\002 \001(\0132\r.context.Uuid\"\333\002\n\007Service\022&\n\n" + - "service_id\030\001 \001(\0132\022.context.ServiceId\022\014\n\004" + - "name\030\002 \001(\t\022.\n\014service_type\030\003 \001(\0162\030.conte" + - "xt.ServiceTypeEnum\0221\n\024service_endpoint_i" + - "ds\030\004 \003(\0132\023.context.EndPointId\0220\n\023service" + - "_constraints\030\005 \003(\0132\023.context.Constraint\022" + - ".\n\016service_status\030\006 \001(\0132\026.context.Servic" + - "eStatus\022.\n\016service_config\030\007 \001(\0132\026.contex" + - "t.ServiceConfig\022%\n\ttimestamp\030\010 \001(\0132\022.con" + - "text.Timestamp\"C\n\rServiceStatus\0222\n\016servi" + - "ce_status\030\001 \001(\0162\032.context.ServiceStatusE" + - "num\":\n\rServiceConfig\022)\n\014config_rules\030\001 \003" + - "(\0132\023.context.ConfigRule\"8\n\rServiceIdList" + - "\022\'\n\013service_ids\030\001 \003(\0132\022.context.ServiceI" + - "d\"1\n\013ServiceList\022\"\n\010services\030\001 \003(\0132\020.con" + - "text.Service\"\225\001\n\rServiceFilter\022+\n\013servic" + - "e_ids\030\001 \001(\0132\026.context.ServiceIdList\022\034\n\024i" + - "nclude_endpoint_ids\030\002 \001(\010\022\033\n\023include_con" + - "straints\030\003 \001(\010\022\034\n\024include_config_rules\030\004" + - " \001(\010\"U\n\014ServiceEvent\022\035\n\005event\030\001 \001(\0132\016.co" + - "ntext.Event\022&\n\nservice_id\030\002 \001(\0132\022.contex" + - "t.ServiceId\"T\n\007SliceId\022&\n\ncontext_id\030\001 \001" + - "(\0132\022.context.ContextId\022!\n\nslice_uuid\030\002 \001" + - "(\0132\r.context.Uuid\"\240\003\n\005Slice\022\"\n\010slice_id\030" + - "\001 \001(\0132\020.context.SliceId\022\014\n\004name\030\002 \001(\t\022/\n" + - "\022slice_endpoint_ids\030\003 \003(\0132\023.context.EndP" + - "ointId\022.\n\021slice_constraints\030\004 \003(\0132\023.cont" + - "ext.Constraint\022-\n\021slice_service_ids\030\005 \003(" + - "\0132\022.context.ServiceId\022,\n\022slice_subslice_" + - "ids\030\006 \003(\0132\020.context.SliceId\022*\n\014slice_sta" + - "tus\030\007 \001(\0132\024.context.SliceStatus\022*\n\014slice" + - "_config\030\010 \001(\0132\024.context.SliceConfig\022(\n\013s" + - "lice_owner\030\t \001(\0132\023.context.SliceOwner\022%\n" + - "\ttimestamp\030\n \001(\0132\022.context.Timestamp\"E\n\n" + - "SliceOwner\022!\n\nowner_uuid\030\001 \001(\0132\r.context" + - ".Uuid\022\024\n\014owner_string\030\002 \001(\t\"=\n\013SliceStat" + - "us\022.\n\014slice_status\030\001 \001(\0162\030.context.Slice" + - "StatusEnum\"8\n\013SliceConfig\022)\n\014config_rule" + - "s\030\001 \003(\0132\023.context.ConfigRule\"2\n\013SliceIdL" + - "ist\022#\n\tslice_ids\030\001 \003(\0132\020.context.SliceId" + - "\"+\n\tSliceList\022\036\n\006slices\030\001 \003(\0132\016.context." + - "Slice\"\312\001\n\013SliceFilter\022\'\n\tslice_ids\030\001 \001(\013" + - "2\024.context.SliceIdList\022\034\n\024include_endpoi" + - "nt_ids\030\002 \001(\010\022\033\n\023include_constraints\030\003 \001(" + - "\010\022\033\n\023include_service_ids\030\004 \001(\010\022\034\n\024includ" + - "e_subslice_ids\030\005 \001(\010\022\034\n\024include_config_r" + - "ules\030\006 \001(\010\"O\n\nSliceEvent\022\035\n\005event\030\001 \001(\0132" + - "\016.context.Event\022\"\n\010slice_id\030\002 \001(\0132\020.cont" + - "ext.SliceId\"6\n\014ConnectionId\022&\n\017connectio" + - "n_uuid\030\001 \001(\0132\r.context.Uuid\"2\n\025Connectio" + - "nSettings_L0\022\031\n\021lsp_symbolic_name\030\001 \001(\t\"" + - "\236\001\n\025ConnectionSettings_L2\022\027\n\017src_mac_add" + - "ress\030\001 \001(\t\022\027\n\017dst_mac_address\030\002 \001(\t\022\022\n\ne" + - "ther_type\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\025ConnectionSettings_L3\022\026\n\016src_ip_addr" + - "ess\030\001 \001(\t\022\026\n\016dst_ip_address\030\002 \001(\t\022\014\n\004dsc" + - "p\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\002l0" + - "\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.ConnectionSetti" + - "ngs_L3\022*\n\002l4\030\004 \001(\0132\036.context.ConnectionS" + - "ettings_L4\"\363\001\n\nConnection\022,\n\rconnection_" + - "id\030\001 \001(\0132\025.context.ConnectionId\022&\n\nservi" + - "ce_id\030\002 \001(\0132\022.context.ServiceId\0223\n\026path_" + - "hops_endpoint_ids\030\003 \003(\0132\023.context.EndPoi" + - "ntId\022+\n\017sub_service_ids\030\004 \003(\0132\022.context." + - "ServiceId\022-\n\010settings\030\005 \001(\0132\033.context.Co" + - "nnectionSettings\"A\n\020ConnectionIdList\022-\n\016" + - "connection_ids\030\001 \003(\0132\025.context.Connectio" + - "nId\":\n\016ConnectionList\022(\n\013connections\030\001 \003" + - "(\0132\023.context.Connection\"^\n\017ConnectionEve" + - "nt\022\035\n\005event\030\001 \001(\0132\016.context.Event\022,\n\rcon" + - "nection_id\030\002 \001(\0132\025.context.ConnectionId\"" + - "\202\001\n\nEndPointId\022(\n\013topology_id\030\001 \001(\0132\023.co" + - "ntext.TopologyId\022$\n\tdevice_id\030\002 \001(\0132\021.co" + - "ntext.DeviceId\022$\n\rendpoint_uuid\030\003 \001(\0132\r." + - "context.Uuid\"\302\001\n\010EndPoint\022(\n\013endpoint_id" + - "\030\001 \001(\0132\023.context.EndPointId\022\014\n\004name\030\002 \001(" + - "\t\022\025\n\rendpoint_type\030\003 \001(\t\0229\n\020kpi_sample_t" + - "ypes\030\004 \003(\0162\037.kpi_sample_types.KpiSampleT" + - "ype\022,\n\021endpoint_location\030\005 \001(\0132\021.context" + - ".Location\"{\n\014EndPointName\022(\n\013endpoint_id" + - "\030\001 \001(\0132\023.context.EndPointId\022\023\n\013device_na" + - "me\030\002 \001(\t\022\025\n\rendpoint_name\030\003 \001(\t\022\025\n\rendpo" + - "int_type\030\004 \001(\t\";\n\016EndPointIdList\022)\n\014endp" + - "oint_ids\030\001 \003(\0132\023.context.EndPointId\"A\n\020E" + - "ndPointNameList\022-\n\016endpoint_names\030\001 \003(\0132" + - "\025.context.EndPointName\"A\n\021ConfigRule_Cus" + - "tom\022\024\n\014resource_key\030\001 \001(\t\022\026\n\016resource_va" + - "lue\030\002 \001(\t\"]\n\016ConfigRule_ACL\022(\n\013endpoint_" + - "id\030\001 \001(\0132\023.context.EndPointId\022!\n\010rule_se" + - "t\030\002 \001(\0132\017.acl.AclRuleSet\"\234\001\n\nConfigRule\022" + - ")\n\006action\030\001 \001(\0162\031.context.ConfigActionEn" + - "um\022,\n\006custom\030\002 \001(\0132\032.context.ConfigRule_" + - "CustomH\000\022&\n\003acl\030\003 \001(\0132\027.context.ConfigRu" + - "le_ACLH\000B\r\n\013config_rule\"F\n\021Constraint_Cu" + - "stom\022\027\n\017constraint_type\030\001 \001(\t\022\030\n\020constra" + - "int_value\030\002 \001(\t\"E\n\023Constraint_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\010latitude\030\001 \001(\002" + - "\022\021\n\tlongitude\030\002 \001(\002\"W\n\010Location\022\020\n\006regio" + - "n\030\001 \001(\tH\000\022-\n\014gps_position\030\002 \001(\0132\025.contex" + - "t.GPS_PositionH\000B\n\n\010location\"l\n\033Constrai" + - "nt_EndPointLocation\022(\n\013endpoint_id\030\001 \001(\013" + - "2\023.context.EndPointId\022#\n\010location\030\002 \001(\0132" + - "\021.context.Location\"Y\n\033Constraint_EndPoin" + - "tPriority\022(\n\013endpoint_id\030\001 \001(\0132\023.context" + - ".EndPointId\022\020\n\010priority\030\002 \001(\r\"0\n\026Constra" + - "int_SLA_Latency\022\026\n\016e2e_latency_ms\030\001 \001(\002\"" + - "0\n\027Constraint_SLA_Capacity\022\025\n\rcapacity_g" + - "bps\030\001 \001(\002\"c\n\033Constraint_SLA_Availability" + - "\022\032\n\022num_disjoint_paths\030\001 \001(\r\022\022\n\nall_acti" + - "ve\030\002 \001(\010\022\024\n\014availability\030\003 \001(\002\"V\n\036Constr" + - "aint_SLA_Isolation_level\0224\n\017isolation_le" + - "vel\030\001 \003(\0162\033.context.IsolationLevelEnum\"\242" + - "\001\n\025Constraint_Exclusions\022\024\n\014is_permanent" + - "\030\001 \001(\010\022%\n\ndevice_ids\030\002 \003(\0132\021.context.Dev" + - "iceId\022)\n\014endpoint_ids\030\003 \003(\0132\023.context.En" + - "dPointId\022!\n\010link_ids\030\004 \003(\0132\017.context.Lin" + - "kId\"\333\004\n\nConstraint\022-\n\006action\030\001 \001(\0162\035.con" + - "text.ConstraintActionEnum\022,\n\006custom\030\002 \001(" + - "\0132\032.context.Constraint_CustomH\000\0220\n\010sched" + - "ule\030\003 \001(\0132\034.context.Constraint_ScheduleH" + - "\000\022A\n\021endpoint_location\030\004 \001(\0132$.context.C" + - "onstraint_EndPointLocationH\000\022A\n\021endpoint" + - "_priority\030\005 \001(\0132$.context.Constraint_End" + - "PointPriorityH\000\0228\n\014sla_capacity\030\006 \001(\0132 ." + - "context.Constraint_SLA_CapacityH\000\0226\n\013sla" + - "_latency\030\007 \001(\0132\037.context.Constraint_SLA_" + - "LatencyH\000\022@\n\020sla_availability\030\010 \001(\0132$.co" + - "ntext.Constraint_SLA_AvailabilityH\000\022@\n\rs" + - "la_isolation\030\t \001(\0132\'.context.Constraint_" + - "SLA_Isolation_levelH\000\0224\n\nexclusions\030\n \001(" + - "\0132\036.context.Constraint_ExclusionsH\000B\014\n\nc" + - "onstraint\"^\n\022TeraFlowController\022&\n\nconte" + - "xt_id\030\001 \001(\0132\022.context.ContextId\022\022\n\nip_ad" + - "dress\030\002 \001(\t\022\014\n\004port\030\003 \001(\r\"U\n\024Authenticat" + - "ionResult\022&\n\ncontext_id\030\001 \001(\0132\022.context." + - "ContextId\022\025\n\rauthenticated\030\002 \001(\010*j\n\rEven" + - "tTypeEnum\022\027\n\023EVENTTYPE_UNDEFINED\020\000\022\024\n\020EV" + - "ENTTYPE_CREATE\020\001\022\024\n\020EVENTTYPE_UPDATE\020\002\022\024" + - "\n\020EVENTTYPE_REMOVE\020\003*\231\002\n\020DeviceDriverEnu" + - "m\022\032\n\026DEVICEDRIVER_UNDEFINED\020\000\022\033\n\027DEVICED" + - "RIVER_OPENCONFIG\020\001\022\036\n\032DEVICEDRIVER_TRANS" + - "PORT_API\020\002\022\023\n\017DEVICEDRIVER_P4\020\003\022&\n\"DEVIC" + - "EDRIVER_IETF_NETWORK_TOPOLOGY\020\004\022\033\n\027DEVIC" + - "EDRIVER_ONF_TR_532\020\005\022\023\n\017DEVICEDRIVER_XR\020" + - "\006\022\033\n\027DEVICEDRIVER_IETF_L2VPN\020\007\022 \n\034DEVICE" + - "DRIVER_GNMI_OPENCONFIG\020\010*\217\001\n\033DeviceOpera" + - "tionalStatusEnum\022%\n!DEVICEOPERATIONALSTA" + - "TUS_UNDEFINED\020\000\022$\n DEVICEOPERATIONALSTAT" + - "US_DISABLED\020\001\022#\n\037DEVICEOPERATIONALSTATUS" + - "_ENABLED\020\002*\201\001\n\017ServiceTypeEnum\022\027\n\023SERVIC" + - "ETYPE_UNKNOWN\020\000\022\024\n\020SERVICETYPE_L3NM\020\001\022\024\n" + - "\020SERVICETYPE_L2NM\020\002\022)\n%SERVICETYPE_TAPI_" + - "CONNECTIVITY_SERVICE\020\003*\304\001\n\021ServiceStatus" + - "Enum\022\033\n\027SERVICESTATUS_UNDEFINED\020\000\022\031\n\025SER" + - "VICESTATUS_PLANNED\020\001\022\030\n\024SERVICESTATUS_AC" + - "TIVE\020\002\022\032\n\026SERVICESTATUS_UPDATING\020\003\022!\n\035SE" + - "RVICESTATUS_PENDING_REMOVAL\020\004\022\036\n\032SERVICE" + - "STATUS_SLA_VIOLATED\020\005*\251\001\n\017SliceStatusEnu" + - "m\022\031\n\025SLICESTATUS_UNDEFINED\020\000\022\027\n\023SLICESTA" + - "TUS_PLANNED\020\001\022\024\n\020SLICESTATUS_INIT\020\002\022\026\n\022S" + - "LICESTATUS_ACTIVE\020\003\022\026\n\022SLICESTATUS_DEINI" + - "T\020\004\022\034\n\030SLICESTATUS_SLA_VIOLATED\020\005*]\n\020Con" + - "figActionEnum\022\032\n\026CONFIGACTION_UNDEFINED\020" + - "\000\022\024\n\020CONFIGACTION_SET\020\001\022\027\n\023CONFIGACTION_" + - "DELETE\020\002*m\n\024ConstraintActionEnum\022\036\n\032CONS" + - "TRAINTACTION_UNDEFINED\020\000\022\030\n\024CONSTRAINTAC" + - "TION_SET\020\001\022\033\n\027CONSTRAINTACTION_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_ISOL" + - "ATION\020\002\022\025\n\021PROCESS_ISOLATION\020\003\022\035\n\031PHYSIC" + - "AL_MEMORY_ISOLATION\020\004\022\036\n\032PHYSICAL_NETWOR" + - "K_ISOLATION\020\005\022\036\n\032VIRTUAL_RESOURCE_ISOLAT" + - "ION\020\006\022\037\n\033NETWORK_FUNCTIONS_ISOLATION\020\007\022\025" + - "\n\021SERVICE_ISOLATION\020\0102\245\026\n\016ContextService" + - "\022:\n\016ListContextIds\022\016.context.Empty\032\026.con" + - "text.ContextIdList\"\000\0226\n\014ListContexts\022\016.c" + - "ontext.Empty\032\024.context.ContextList\"\000\0224\n\n" + - "GetContext\022\022.context.ContextId\032\020.context" + - ".Context\"\000\0224\n\nSetContext\022\020.context.Conte" + - "xt\032\022.context.ContextId\"\000\0225\n\rRemoveContex" + - "t\022\022.context.ContextId\032\016.context.Empty\"\000\022" + - "=\n\020GetContextEvents\022\016.context.Empty\032\025.co" + - "ntext.ContextEvent\"\0000\001\022@\n\017ListTopologyId" + - "s\022\022.context.ContextId\032\027.context.Topology" + - "IdList\"\000\022=\n\016ListTopologies\022\022.context.Con" + - "textId\032\025.context.TopologyList\"\000\0227\n\013GetTo" + - "pology\022\023.context.TopologyId\032\021.context.To" + - "pology\"\000\022E\n\022GetTopologyDetails\022\023.context" + - ".TopologyId\032\030.context.TopologyDetails\"\000\022" + - "7\n\013SetTopology\022\021.context.Topology\032\023.cont" + - "ext.TopologyId\"\000\0227\n\016RemoveTopology\022\023.con" + - "text.TopologyId\032\016.context.Empty\"\000\022?\n\021Get" + - "TopologyEvents\022\016.context.Empty\032\026.context" + - ".TopologyEvent\"\0000\001\0228\n\rListDeviceIds\022\016.co" + - "ntext.Empty\032\025.context.DeviceIdList\"\000\0224\n\013" + - "ListDevices\022\016.context.Empty\032\023.context.De" + - "viceList\"\000\0221\n\tGetDevice\022\021.context.Device" + - "Id\032\017.context.Device\"\000\0221\n\tSetDevice\022\017.con" + - "text.Device\032\021.context.DeviceId\"\000\0223\n\014Remo" + - "veDevice\022\021.context.DeviceId\032\016.context.Em" + - "pty\"\000\022;\n\017GetDeviceEvents\022\016.context.Empty" + - "\032\024.context.DeviceEvent\"\0000\001\022<\n\014SelectDevi" + - "ce\022\025.context.DeviceFilter\032\023.context.Devi" + - "ceList\"\000\022I\n\021ListEndPointNames\022\027.context." + - "EndPointIdList\032\031.context.EndPointNameLis" + - "t\"\000\0224\n\013ListLinkIds\022\016.context.Empty\032\023.con" + - "text.LinkIdList\"\000\0220\n\tListLinks\022\016.context" + - ".Empty\032\021.context.LinkList\"\000\022+\n\007GetLink\022\017" + - ".context.LinkId\032\r.context.Link\"\000\022+\n\007SetL" + - "ink\022\r.context.Link\032\017.context.LinkId\"\000\022/\n" + - "\nRemoveLink\022\017.context.LinkId\032\016.context.E" + - "mpty\"\000\0227\n\rGetLinkEvents\022\016.context.Empty\032" + - "\022.context.LinkEvent\"\0000\001\022>\n\016ListServiceId" + - "s\022\022.context.ContextId\032\026.context.ServiceI" + - "dList\"\000\022:\n\014ListServices\022\022.context.Contex" + - "tId\032\024.context.ServiceList\"\000\0224\n\nGetServic" + - "e\022\022.context.ServiceId\032\020.context.Service\"" + - "\000\0224\n\nSetService\022\020.context.Service\032\022.cont" + - "ext.ServiceId\"\000\0226\n\014UnsetService\022\020.contex" + - "t.Service\032\022.context.ServiceId\"\000\0225\n\rRemov" + - "eService\022\022.context.ServiceId\032\016.context.E" + - "mpty\"\000\022=\n\020GetServiceEvents\022\016.context.Emp" + - "ty\032\025.context.ServiceEvent\"\0000\001\022?\n\rSelectS" + - "ervice\022\026.context.ServiceFilter\032\024.context" + - ".ServiceList\"\000\022:\n\014ListSliceIds\022\022.context" + - ".ContextId\032\024.context.SliceIdList\"\000\0226\n\nLi" + - "stSlices\022\022.context.ContextId\032\022.context.S" + - "liceList\"\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\0220\n\nUnsetSlice" + - "\022\016.context.Slice\032\020.context.SliceId\"\000\0221\n\013" + - "RemoveSlice\022\020.context.SliceId\032\016.context." + - "Empty\"\000\0229\n\016GetSliceEvents\022\016.context.Empt" + - "y\032\023.context.SliceEvent\"\0000\001\0229\n\013SelectSlic" + - "e\022\024.context.SliceFilter\032\022.context.SliceL" + - "ist\"\000\022D\n\021ListConnectionIds\022\022.context.Ser" + - "viceId\032\031.context.ConnectionIdList\"\000\022@\n\017L" + - "istConnections\022\022.context.ServiceId\032\027.con" + - "text.ConnectionList\"\000\022=\n\rGetConnection\022\025" + - ".context.ConnectionId\032\023.context.Connecti" + - "on\"\000\022=\n\rSetConnection\022\023.context.Connecti" + - "on\032\025.context.ConnectionId\"\000\022;\n\020RemoveCon" + - "nection\022\025.context.ConnectionId\032\016.context" + - ".Empty\"\000\022C\n\023GetConnectionEvents\022\016.contex" + - "t.Empty\032\030.context.ConnectionEvent\"\0000\001b\006p" + - "roto3" + "\007 \003(\0132\021.context.EndPoint\022&\n\ncomponents\030\010" + + " \003(\0132\022.context.Component\022(\n\rcontroller_i" + + "d\030\t \001(\0132\021.context.DeviceId\"\311\001\n\tComponent" + + "\022%\n\016component_uuid\030\001 \001(\0132\r.context.Uuid\022" + + "\014\n\004name\030\002 \001(\t\022\014\n\004type\030\003 \001(\t\0226\n\nattribute" + + "s\030\004 \003(\0132\".context.Component.AttributesEn" + + "try\022\016\n\006parent\030\005 \001(\t\0321\n\017AttributesEntry\022\013" + + "\n\003key\030\001 \001(\t\022\r\n\005value\030\002 \001(\t:\0028\001\"9\n\014Device" + + "Config\022)\n\014config_rules\030\001 \003(\0132\023.context.C" + + "onfigRule\"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\"\216\001\n\014Dev" + + "iceFilter\022)\n\ndevice_ids\030\001 \001(\0132\025.context." + + "DeviceIdList\022\031\n\021include_endpoints\030\002 \001(\010\022" + + "\034\n\024include_config_rules\030\003 \001(\010\022\032\n\022include" + + "_components\030\004 \001(\010\"\200\001\n\013DeviceEvent\022\035\n\005eve" + + "nt\030\001 \001(\0132\016.context.Event\022$\n\tdevice_id\030\002 " + + "\001(\0132\021.context.DeviceId\022,\n\rdevice_config\030" + + "\003 \001(\0132\025.context.DeviceConfig\"*\n\006LinkId\022 " + + "\n\tlink_uuid\030\001 \001(\0132\r.context.Uuid\"f\n\004Link" + + "\022 \n\007link_id\030\001 \001(\0132\017.context.LinkId\022\014\n\004na" + + "me\030\002 \001(\t\022.\n\021link_endpoint_ids\030\003 \003(\0132\023.co" + + "ntext.EndPointId\"/\n\nLinkIdList\022!\n\010link_i" + + "ds\030\001 \003(\0132\017.context.LinkId\"(\n\010LinkList\022\034\n" + + "\005links\030\001 \003(\0132\r.context.Link\"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.context.ContextId\022#" + + "\n\014service_uuid\030\002 \001(\0132\r.context.Uuid\"\333\002\n\007" + + "Service\022&\n\nservice_id\030\001 \001(\0132\022.context.Se" + + "rviceId\022\014\n\004name\030\002 \001(\t\022.\n\014service_type\030\003 " + + "\001(\0162\030.context.ServiceTypeEnum\0221\n\024service" + + "_endpoint_ids\030\004 \003(\0132\023.context.EndPointId" + + "\0220\n\023service_constraints\030\005 \003(\0132\023.context." + + "Constraint\022.\n\016service_status\030\006 \001(\0132\026.con" + + "text.ServiceStatus\022.\n\016service_config\030\007 \001" + + "(\0132\026.context.ServiceConfig\022%\n\ttimestamp\030" + + "\010 \001(\0132\022.context.Timestamp\"C\n\rServiceStat" + + "us\0222\n\016service_status\030\001 \001(\0162\032.context.Ser" + + "viceStatusEnum\":\n\rServiceConfig\022)\n\014confi" + + "g_rules\030\001 \003(\0132\023.context.ConfigRule\"8\n\rSe" + + "rviceIdList\022\'\n\013service_ids\030\001 \003(\0132\022.conte" + + "xt.ServiceId\"1\n\013ServiceList\022\"\n\010services\030" + + "\001 \003(\0132\020.context.Service\"\225\001\n\rServiceFilte" + + "r\022+\n\013service_ids\030\001 \001(\0132\026.context.Service" + + "IdList\022\034\n\024include_endpoint_ids\030\002 \001(\010\022\033\n\023" + + "include_constraints\030\003 \001(\010\022\034\n\024include_con" + + "fig_rules\030\004 \001(\010\"U\n\014ServiceEvent\022\035\n\005event" + + "\030\001 \001(\0132\016.context.Event\022&\n\nservice_id\030\002 \001" + + "(\0132\022.context.ServiceId\"T\n\007SliceId\022&\n\ncon" + + "text_id\030\001 \001(\0132\022.context.ContextId\022!\n\nsli" + + "ce_uuid\030\002 \001(\0132\r.context.Uuid\"\240\003\n\005Slice\022\"" + + "\n\010slice_id\030\001 \001(\0132\020.context.SliceId\022\014\n\004na" + + "me\030\002 \001(\t\022/\n\022slice_endpoint_ids\030\003 \003(\0132\023.c" + + "ontext.EndPointId\022.\n\021slice_constraints\030\004" + + " \003(\0132\023.context.Constraint\022-\n\021slice_servi" + + "ce_ids\030\005 \003(\0132\022.context.ServiceId\022,\n\022slic" + + "e_subslice_ids\030\006 \003(\0132\020.context.SliceId\022*" + + "\n\014slice_status\030\007 \001(\0132\024.context.SliceStat" + + "us\022*\n\014slice_config\030\010 \001(\0132\024.context.Slice" + + "Config\022(\n\013slice_owner\030\t \001(\0132\023.context.Sl" + + "iceOwner\022%\n\ttimestamp\030\n \001(\0132\022.context.Ti" + + "mestamp\"E\n\nSliceOwner\022!\n\nowner_uuid\030\001 \001(" + + "\0132\r.context.Uuid\022\024\n\014owner_string\030\002 \001(\t\"=" + + "\n\013SliceStatus\022.\n\014slice_status\030\001 \001(\0162\030.co" + + "ntext.SliceStatusEnum\"8\n\013SliceConfig\022)\n\014" + + "config_rules\030\001 \003(\0132\023.context.ConfigRule\"" + + "2\n\013SliceIdList\022#\n\tslice_ids\030\001 \003(\0132\020.cont" + + "ext.SliceId\"+\n\tSliceList\022\036\n\006slices\030\001 \003(\013" + + "2\016.context.Slice\"\312\001\n\013SliceFilter\022\'\n\tslic" + + "e_ids\030\001 \001(\0132\024.context.SliceIdList\022\034\n\024inc" + + "lude_endpoint_ids\030\002 \001(\010\022\033\n\023include_const" + + "raints\030\003 \001(\010\022\033\n\023include_service_ids\030\004 \001(" + + "\010\022\034\n\024include_subslice_ids\030\005 \001(\010\022\034\n\024inclu" + + "de_config_rules\030\006 \001(\010\"O\n\nSliceEvent\022\035\n\005e" + + "vent\030\001 \001(\0132\016.context.Event\022\"\n\010slice_id\030\002" + + " \001(\0132\020.context.SliceId\"6\n\014ConnectionId\022&" + + "\n\017connection_uuid\030\001 \001(\0132\r.context.Uuid\"2" + + "\n\025ConnectionSettings_L0\022\031\n\021lsp_symbolic_" + + "name\030\001 \001(\t\"\236\001\n\025ConnectionSettings_L2\022\027\n\017" + + "src_mac_address\030\001 \001(\t\022\027\n\017dst_mac_address" + + "\030\002 \001(\t\022\022\n\nether_type\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\025ConnectionSettings_L3\022\026\n\016" + + "src_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\003" + + "ttl\030\005 \001(\r\"[\n\025ConnectionSettings_L4\022\020\n\010sr" + + "c_port\030\001 \001(\r\022\020\n\010dst_port\030\002 \001(\r\022\021\n\ttcp_fl" + + "ags\030\003 \001(\r\022\013\n\003ttl\030\004 \001(\r\"\304\001\n\022ConnectionSet" + + "tings\022*\n\002l0\030\001 \001(\0132\036.context.ConnectionSe" + + "ttings_L0\022*\n\002l2\030\002 \001(\0132\036.context.Connecti" + + "onSettings_L2\022*\n\002l3\030\003 \001(\0132\036.context.Conn" + + "ectionSettings_L3\022*\n\002l4\030\004 \001(\0132\036.context." + + "ConnectionSettings_L4\"\363\001\n\nConnection\022,\n\r" + + "connection_id\030\001 \001(\0132\025.context.Connection" + + "Id\022&\n\nservice_id\030\002 \001(\0132\022.context.Service" + + "Id\0223\n\026path_hops_endpoint_ids\030\003 \003(\0132\023.con" + + "text.EndPointId\022+\n\017sub_service_ids\030\004 \003(\013" + + "2\022.context.ServiceId\022-\n\010settings\030\005 \001(\0132\033" + + ".context.ConnectionSettings\"A\n\020Connectio" + + "nIdList\022-\n\016connection_ids\030\001 \003(\0132\025.contex" + + "t.ConnectionId\":\n\016ConnectionList\022(\n\013conn" + + "ections\030\001 \003(\0132\023.context.Connection\"^\n\017Co" + + "nnectionEvent\022\035\n\005event\030\001 \001(\0132\016.context.E" + + "vent\022,\n\rconnection_id\030\002 \001(\0132\025.context.Co" + + "nnectionId\"\202\001\n\nEndPointId\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_uu" + + "id\030\003 \001(\0132\r.context.Uuid\"\302\001\n\010EndPoint\022(\n\013" + + "endpoint_id\030\001 \001(\0132\023.context.EndPointId\022\014" + + "\n\004name\030\002 \001(\t\022\025\n\rendpoint_type\030\003 \001(\t\0229\n\020k" + + "pi_sample_types\030\004 \003(\0162\037.kpi_sample_types" + + ".KpiSampleType\022,\n\021endpoint_location\030\005 \001(" + + "\0132\021.context.Location\"{\n\014EndPointName\022(\n\013" + + "endpoint_id\030\001 \001(\0132\023.context.EndPointId\022\023" + + "\n\013device_name\030\002 \001(\t\022\025\n\rendpoint_name\030\003 \001" + + "(\t\022\025\n\rendpoint_type\030\004 \001(\t\";\n\016EndPointIdL" + + "ist\022)\n\014endpoint_ids\030\001 \003(\0132\023.context.EndP" + + "ointId\"A\n\020EndPointNameList\022-\n\016endpoint_n" + + "ames\030\001 \003(\0132\025.context.EndPointName\"A\n\021Con" + + "figRule_Custom\022\024\n\014resource_key\030\001 \001(\t\022\026\n\016" + + "resource_value\030\002 \001(\t\"]\n\016ConfigRule_ACL\022(" + + "\n\013endpoint_id\030\001 \001(\0132\023.context.EndPointId" + + "\022!\n\010rule_set\030\002 \001(\0132\017.acl.AclRuleSet\"\234\001\n\n" + + "ConfigRule\022)\n\006action\030\001 \001(\0162\031.context.Con" + + "figActionEnum\022,\n\006custom\030\002 \001(\0132\032.context." + + "ConfigRule_CustomH\000\022&\n\003acl\030\003 \001(\0132\027.conte" + + "xt.ConfigRule_ACLH\000B\r\n\013config_rule\"F\n\021Co" + + "nstraint_Custom\022\027\n\017constraint_type\030\001 \001(\t" + + "\022\030\n\020constraint_value\030\002 \001(\t\"E\n\023Constraint" + + "_Schedule\022\027\n\017start_timestamp\030\001 \001(\002\022\025\n\rdu" + + "ration_days\030\002 \001(\002\"3\n\014GPS_Position\022\020\n\010lat" + + "itude\030\001 \001(\002\022\021\n\tlongitude\030\002 \001(\002\"W\n\010Locati" + + "on\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\033Constraint_EndPointLocation\022(\n\013endpoi" + + "nt_id\030\001 \001(\0132\023.context.EndPointId\022#\n\010loca" + + "tion\030\002 \001(\0132\021.context.Location\"Y\n\033Constra" + + "int_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_latenc" + + "y_ms\030\001 \001(\002\"0\n\027Constraint_SLA_Capacity\022\025\n" + + "\rcapacity_gbps\030\001 \001(\002\"c\n\033Constraint_SLA_A" + + "vailability\022\032\n\022num_disjoint_paths\030\001 \001(\r\022" + + "\022\n\nall_active\030\002 \001(\010\022\024\n\014availability\030\003 \001(" + + "\002\"V\n\036Constraint_SLA_Isolation_level\0224\n\017i" + + "solation_level\030\001 \003(\0162\033.context.Isolation" + + "LevelEnum\"\242\001\n\025Constraint_Exclusions\022\024\n\014i" + + "s_permanent\030\001 \001(\010\022%\n\ndevice_ids\030\002 \003(\0132\021." + + "context.DeviceId\022)\n\014endpoint_ids\030\003 \003(\0132\023" + + ".context.EndPointId\022!\n\010link_ids\030\004 \003(\0132\017." + + "context.LinkId\"\333\004\n\nConstraint\022-\n\006action\030" + + "\001 \001(\0162\035.context.ConstraintActionEnum\022,\n\006" + + "custom\030\002 \001(\0132\032.context.Constraint_Custom" + + "H\000\0220\n\010schedule\030\003 \001(\0132\034.context.Constrain" + + "t_ScheduleH\000\022A\n\021endpoint_location\030\004 \001(\0132" + + "$.context.Constraint_EndPointLocationH\000\022" + + "A\n\021endpoint_priority\030\005 \001(\0132$.context.Con" + + "straint_EndPointPriorityH\000\0228\n\014sla_capaci" + + "ty\030\006 \001(\0132 .context.Constraint_SLA_Capaci" + + "tyH\000\0226\n\013sla_latency\030\007 \001(\0132\037.context.Cons" + + "traint_SLA_LatencyH\000\022@\n\020sla_availability" + + "\030\010 \001(\0132$.context.Constraint_SLA_Availabi" + + "lityH\000\022@\n\rsla_isolation\030\t \001(\0132\'.context." + + "Constraint_SLA_Isolation_levelH\000\0224\n\nexcl" + + "usions\030\n \001(\0132\036.context.Constraint_Exclus" + + "ionsH\000B\014\n\nconstraint\"^\n\022TeraFlowControll" + + "er\022&\n\ncontext_id\030\001 \001(\0132\022.context.Context" + + "Id\022\022\n\nip_address\030\002 \001(\t\022\014\n\004port\030\003 \001(\r\"U\n\024" + + "AuthenticationResult\022&\n\ncontext_id\030\001 \001(\013" + + "2\022.context.ContextId\022\025\n\rauthenticated\030\002 " + + "\001(\010*j\n\rEventTypeEnum\022\027\n\023EVENTTYPE_UNDEFI" + + "NED\020\000\022\024\n\020EVENTTYPE_CREATE\020\001\022\024\n\020EVENTTYPE" + + "_UPDATE\020\002\022\024\n\020EVENTTYPE_REMOVE\020\003*\231\002\n\020Devi" + + "ceDriverEnum\022\032\n\026DEVICEDRIVER_UNDEFINED\020\000" + + "\022\033\n\027DEVICEDRIVER_OPENCONFIG\020\001\022\036\n\032DEVICED" + + "RIVER_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_532\020\005\022\023\n\017DEVIC" + + "EDRIVER_XR\020\006\022\033\n\027DEVICEDRIVER_IETF_L2VPN\020" + + "\007\022 \n\034DEVICEDRIVER_GNMI_OPENCONFIG\020\010*\217\001\n\033" + + "DeviceOperationalStatusEnum\022%\n!DEVICEOPE" + + "RATIONALSTATUS_UNDEFINED\020\000\022$\n DEVICEOPER" + + "ATIONALSTATUS_DISABLED\020\001\022#\n\037DEVICEOPERAT" + + "IONALSTATUS_ENABLED\020\002*\225\001\n\017ServiceTypeEnu" + + "m\022\027\n\023SERVICETYPE_UNKNOWN\020\000\022\024\n\020SERVICETYP" + + "E_L3NM\020\001\022\024\n\020SERVICETYPE_L2NM\020\002\022)\n%SERVIC" + + "ETYPE_TAPI_CONNECTIVITY_SERVICE\020\003\022\022\n\016SER" + + "VICETYPE_TE\020\004*\304\001\n\021ServiceStatusEnum\022\033\n\027S" + + "ERVICESTATUS_UNDEFINED\020\000\022\031\n\025SERVICESTATU" + + "S_PLANNED\020\001\022\030\n\024SERVICESTATUS_ACTIVE\020\002\022\032\n" + + "\026SERVICESTATUS_UPDATING\020\003\022!\n\035SERVICESTAT" + + "US_PENDING_REMOVAL\020\004\022\036\n\032SERVICESTATUS_SL" + + "A_VIOLATED\020\005*\251\001\n\017SliceStatusEnum\022\031\n\025SLIC" + + "ESTATUS_UNDEFINED\020\000\022\027\n\023SLICESTATUS_PLANN" + + "ED\020\001\022\024\n\020SLICESTATUS_INIT\020\002\022\026\n\022SLICESTATU" + + "S_ACTIVE\020\003\022\026\n\022SLICESTATUS_DEINIT\020\004\022\034\n\030SL" + + "ICESTATUS_SLA_VIOLATED\020\005*]\n\020ConfigAction" + + "Enum\022\032\n\026CONFIGACTION_UNDEFINED\020\000\022\024\n\020CONF" + + "IGACTION_SET\020\001\022\027\n\023CONFIGACTION_DELETE\020\002*" + + "m\n\024ConstraintActionEnum\022\036\n\032CONSTRAINTACT" + + "ION_UNDEFINED\020\000\022\030\n\024CONSTRAINTACTION_SET\020" + + "\001\022\033\n\027CONSTRAINTACTION_DELETE\020\002*\203\002\n\022Isola" + + "tionLevelEnum\022\020\n\014NO_ISOLATION\020\000\022\026\n\022PHYSI" + + "CAL_ISOLATION\020\001\022\025\n\021LOGICAL_ISOLATION\020\002\022\025" + + "\n\021PROCESS_ISOLATION\020\003\022\035\n\031PHYSICAL_MEMORY" + + "_ISOLATION\020\004\022\036\n\032PHYSICAL_NETWORK_ISOLATI" + + "ON\020\005\022\036\n\032VIRTUAL_RESOURCE_ISOLATION\020\006\022\037\n\033" + + "NETWORK_FUNCTIONS_ISOLATION\020\007\022\025\n\021SERVICE" + + "_ISOLATION\020\0102\245\026\n\016ContextService\022:\n\016ListC" + + "ontextIds\022\016.context.Empty\032\026.context.Cont" + + "extIdList\"\000\0226\n\014ListContexts\022\016.context.Em" + + "pty\032\024.context.ContextList\"\000\0224\n\nGetContex" + + "t\022\022.context.ContextId\032\020.context.Context\"" + + "\000\0224\n\nSetContext\022\020.context.Context\032\022.cont" + + "ext.ContextId\"\000\0225\n\rRemoveContext\022\022.conte" + + "xt.ContextId\032\016.context.Empty\"\000\022=\n\020GetCon" + + "textEvents\022\016.context.Empty\032\025.context.Con" + + "textEvent\"\0000\001\022@\n\017ListTopologyIds\022\022.conte" + + "xt.ContextId\032\027.context.TopologyIdList\"\000\022" + + "=\n\016ListTopologies\022\022.context.ContextId\032\025." + + "context.TopologyList\"\000\0227\n\013GetTopology\022\023." + + "context.TopologyId\032\021.context.Topology\"\000\022" + + "E\n\022GetTopologyDetails\022\023.context.Topology" + + "Id\032\030.context.TopologyDetails\"\000\0227\n\013SetTop" + + "ology\022\021.context.Topology\032\023.context.Topol" + + "ogyId\"\000\0227\n\016RemoveTopology\022\023.context.Topo" + + "logyId\032\016.context.Empty\"\000\022?\n\021GetTopologyE" + + "vents\022\016.context.Empty\032\026.context.Topology" + + "Event\"\0000\001\0228\n\rListDeviceIds\022\016.context.Emp" + + "ty\032\025.context.DeviceIdList\"\000\0224\n\013ListDevic" + + "es\022\016.context.Empty\032\023.context.DeviceList\"" + + "\000\0221\n\tGetDevice\022\021.context.DeviceId\032\017.cont" + + "ext.Device\"\000\0221\n\tSetDevice\022\017.context.Devi" + + "ce\032\021.context.DeviceId\"\000\0223\n\014RemoveDevice\022" + + "\021.context.DeviceId\032\016.context.Empty\"\000\022;\n\017" + + "GetDeviceEvents\022\016.context.Empty\032\024.contex" + + "t.DeviceEvent\"\0000\001\022<\n\014SelectDevice\022\025.cont" + + "ext.DeviceFilter\032\023.context.DeviceList\"\000\022" + + "I\n\021ListEndPointNames\022\027.context.EndPointI" + + "dList\032\031.context.EndPointNameList\"\000\0224\n\013Li" + + "stLinkIds\022\016.context.Empty\032\023.context.Link" + + "IdList\"\000\0220\n\tListLinks\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.con" + + "text.Link\032\017.context.LinkId\"\000\022/\n\nRemoveLi" + + "nk\022\017.context.LinkId\032\016.context.Empty\"\000\0227\n" + + "\rGetLinkEvents\022\016.context.Empty\032\022.context" + + ".LinkEvent\"\0000\001\022>\n\016ListServiceIds\022\022.conte" + + "xt.ContextId\032\026.context.ServiceIdList\"\000\022:" + + "\n\014ListServices\022\022.context.ContextId\032\024.con" + + "text.ServiceList\"\000\0224\n\nGetService\022\022.conte" + + "xt.ServiceId\032\020.context.Service\"\000\0224\n\nSetS" + + "ervice\022\020.context.Service\032\022.context.Servi" + + "ceId\"\000\0226\n\014UnsetService\022\020.context.Service" + + "\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.cont" + + "ext.ServiceEvent\"\0000\001\022?\n\rSelectService\022\026." + + "context.ServiceFilter\032\024.context.ServiceL" + + "ist\"\000\022:\n\014ListSliceIds\022\022.context.ContextI" + + "d\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.contex" + + "t.Slice\"\000\022.\n\010SetSlice\022\016.context.Slice\032\020." + + "context.SliceId\"\000\0220\n\nUnsetSlice\022\016.contex" + + "t.Slice\032\020.context.SliceId\"\000\0221\n\013RemoveSli" + + "ce\022\020.context.SliceId\032\016.context.Empty\"\000\0229" + + "\n\016GetSliceEvents\022\016.context.Empty\032\023.conte" + + "xt.SliceEvent\"\0000\001\0229\n\013SelectSlice\022\024.conte" + + "xt.SliceFilter\032\022.context.SliceList\"\000\022D\n\021" + + "ListConnectionIds\022\022.context.ServiceId\032\031." + + "context.ConnectionIdList\"\000\022@\n\017ListConnec" + + "tions\022\022.context.ServiceId\032\027.context.Conn" + + "ectionList\"\000\022=\n\rGetConnection\022\025.context." + + "ConnectionId\032\023.context.Connection\"\000\022=\n\rS" + + "etConnection\022\023.context.Connection\032\025.cont" + + "ext.ConnectionId\"\000\022;\n\020RemoveConnection\022\025" + + ".context.ConnectionId\032\016.context.Empty\"\000\022" + + "C\n\023GetConnectionEvents\022\016.context.Empty\032\030" + + ".context.ConnectionEvent\"\0000\001b\006proto3" }; descriptor = com.google.protobuf.Descriptors.FileDescriptor .internalBuildGeneratedFileFrom(descriptorData, @@ -74426,13 +75269,19 @@ public final class ContextOuterClass { internal_static_context_Device_fieldAccessorTable = new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( internal_static_context_Device_descriptor, - new java.lang.String[] { "DeviceId", "Name", "DeviceType", "DeviceConfig", "DeviceOperationalStatus", "DeviceDrivers", "DeviceEndpoints", "Component", "ControllerId", }); + new java.lang.String[] { "DeviceId", "Name", "DeviceType", "DeviceConfig", "DeviceOperationalStatus", "DeviceDrivers", "DeviceEndpoints", "Components", "ControllerId", }); internal_static_context_Component_descriptor = getDescriptor().getMessageTypes().get(17); internal_static_context_Component_fieldAccessorTable = new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( internal_static_context_Component_descriptor, - new java.lang.String[] { "CompString", }); + new java.lang.String[] { "ComponentUuid", "Name", "Type", "Attributes", "Parent", }); + internal_static_context_Component_AttributesEntry_descriptor = + internal_static_context_Component_descriptor.getNestedTypes().get(0); + internal_static_context_Component_AttributesEntry_fieldAccessorTable = new + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_context_Component_AttributesEntry_descriptor, + new java.lang.String[] { "Key", "Value", }); internal_static_context_DeviceConfig_descriptor = getDescriptor().getMessageTypes().get(18); internal_static_context_DeviceConfig_fieldAccessorTable = new diff --git a/src/automation/target/generated-sources/grpc/context/ContextService.java b/src/ztp/target/generated-sources/grpc/context/ContextService.java similarity index 100% rename from src/automation/target/generated-sources/grpc/context/ContextService.java rename to src/ztp/target/generated-sources/grpc/context/ContextService.java diff --git a/src/automation/target/generated-sources/grpc/context/ContextServiceBean.java b/src/ztp/target/generated-sources/grpc/context/ContextServiceBean.java similarity index 100% rename from src/automation/target/generated-sources/grpc/context/ContextServiceBean.java rename to src/ztp/target/generated-sources/grpc/context/ContextServiceBean.java diff --git a/src/automation/target/generated-sources/grpc/context/ContextServiceClient.java b/src/ztp/target/generated-sources/grpc/context/ContextServiceClient.java similarity index 100% rename from src/automation/target/generated-sources/grpc/context/ContextServiceClient.java rename to src/ztp/target/generated-sources/grpc/context/ContextServiceClient.java diff --git a/src/automation/target/generated-sources/grpc/context/ContextServiceGrpc.java b/src/ztp/target/generated-sources/grpc/context/ContextServiceGrpc.java similarity index 100% rename from src/automation/target/generated-sources/grpc/context/ContextServiceGrpc.java rename to src/ztp/target/generated-sources/grpc/context/ContextServiceGrpc.java diff --git a/src/automation/target/generated-sources/grpc/context/MutinyContextServiceGrpc.java b/src/ztp/target/generated-sources/grpc/context/MutinyContextServiceGrpc.java similarity index 100% rename from src/automation/target/generated-sources/grpc/context/MutinyContextServiceGrpc.java rename to src/ztp/target/generated-sources/grpc/context/MutinyContextServiceGrpc.java diff --git a/src/automation/target/generated-sources/grpc/device/Device.java b/src/ztp/target/generated-sources/grpc/device/Device.java similarity index 100% rename from src/automation/target/generated-sources/grpc/device/Device.java rename to src/ztp/target/generated-sources/grpc/device/Device.java diff --git a/src/automation/target/generated-sources/grpc/device/DeviceService.java b/src/ztp/target/generated-sources/grpc/device/DeviceService.java similarity index 100% rename from src/automation/target/generated-sources/grpc/device/DeviceService.java rename to src/ztp/target/generated-sources/grpc/device/DeviceService.java diff --git a/src/automation/target/generated-sources/grpc/device/DeviceServiceBean.java b/src/ztp/target/generated-sources/grpc/device/DeviceServiceBean.java similarity index 100% rename from src/automation/target/generated-sources/grpc/device/DeviceServiceBean.java rename to src/ztp/target/generated-sources/grpc/device/DeviceServiceBean.java diff --git a/src/automation/target/generated-sources/grpc/device/DeviceServiceClient.java b/src/ztp/target/generated-sources/grpc/device/DeviceServiceClient.java similarity index 100% rename from src/automation/target/generated-sources/grpc/device/DeviceServiceClient.java rename to src/ztp/target/generated-sources/grpc/device/DeviceServiceClient.java diff --git a/src/automation/target/generated-sources/grpc/device/DeviceServiceGrpc.java b/src/ztp/target/generated-sources/grpc/device/DeviceServiceGrpc.java similarity index 100% rename from src/automation/target/generated-sources/grpc/device/DeviceServiceGrpc.java rename to src/ztp/target/generated-sources/grpc/device/DeviceServiceGrpc.java diff --git a/src/automation/target/generated-sources/grpc/device/MutinyDeviceServiceGrpc.java b/src/ztp/target/generated-sources/grpc/device/MutinyDeviceServiceGrpc.java similarity index 100% rename from src/automation/target/generated-sources/grpc/device/MutinyDeviceServiceGrpc.java rename to src/ztp/target/generated-sources/grpc/device/MutinyDeviceServiceGrpc.java diff --git a/src/automation/target/generated-sources/grpc/kpi_sample_types/KpiSampleTypes.java b/src/ztp/target/generated-sources/grpc/kpi_sample_types/KpiSampleTypes.java similarity index 100% rename from src/automation/target/generated-sources/grpc/kpi_sample_types/KpiSampleTypes.java rename to src/ztp/target/generated-sources/grpc/kpi_sample_types/KpiSampleTypes.java diff --git a/src/automation/target/generated-sources/grpc/monitoring/Monitoring.java b/src/ztp/target/generated-sources/grpc/monitoring/Monitoring.java similarity index 100% rename from src/automation/target/generated-sources/grpc/monitoring/Monitoring.java rename to src/ztp/target/generated-sources/grpc/monitoring/Monitoring.java diff --git a/src/automation/target/generated-sources/grpc/monitoring/MonitoringService.java b/src/ztp/target/generated-sources/grpc/monitoring/MonitoringService.java similarity index 100% rename from src/automation/target/generated-sources/grpc/monitoring/MonitoringService.java rename to src/ztp/target/generated-sources/grpc/monitoring/MonitoringService.java diff --git a/src/automation/target/generated-sources/grpc/monitoring/MonitoringServiceBean.java b/src/ztp/target/generated-sources/grpc/monitoring/MonitoringServiceBean.java similarity index 100% rename from src/automation/target/generated-sources/grpc/monitoring/MonitoringServiceBean.java rename to src/ztp/target/generated-sources/grpc/monitoring/MonitoringServiceBean.java diff --git a/src/automation/target/generated-sources/grpc/monitoring/MonitoringServiceClient.java b/src/ztp/target/generated-sources/grpc/monitoring/MonitoringServiceClient.java similarity index 100% rename from src/automation/target/generated-sources/grpc/monitoring/MonitoringServiceClient.java rename to src/ztp/target/generated-sources/grpc/monitoring/MonitoringServiceClient.java diff --git a/src/automation/target/generated-sources/grpc/monitoring/MonitoringServiceGrpc.java b/src/ztp/target/generated-sources/grpc/monitoring/MonitoringServiceGrpc.java similarity index 100% rename from src/automation/target/generated-sources/grpc/monitoring/MonitoringServiceGrpc.java rename to src/ztp/target/generated-sources/grpc/monitoring/MonitoringServiceGrpc.java diff --git a/src/automation/target/generated-sources/grpc/monitoring/MutinyMonitoringServiceGrpc.java b/src/ztp/target/generated-sources/grpc/monitoring/MutinyMonitoringServiceGrpc.java similarity index 100% rename from src/automation/target/generated-sources/grpc/monitoring/MutinyMonitoringServiceGrpc.java rename to src/ztp/target/generated-sources/grpc/monitoring/MutinyMonitoringServiceGrpc.java diff --git a/src/automation/target/generated-sources/grpc/automation/MutinyAutomationServiceGrpc.java b/src/ztp/target/generated-sources/grpc/ztp/MutinyZtpServiceGrpc.java similarity index 56% rename from src/automation/target/generated-sources/grpc/automation/MutinyAutomationServiceGrpc.java rename to src/ztp/target/generated-sources/grpc/ztp/MutinyZtpServiceGrpc.java index 64565286ca36fd0b820c000e466954144207ab0b..d46fdffb7b88f34ad648053139920d23dc2ab9d1 100644 --- a/src/automation/target/generated-sources/grpc/automation/MutinyAutomationServiceGrpc.java +++ b/src/ztp/target/generated-sources/grpc/ztp/MutinyZtpServiceGrpc.java @@ -1,6 +1,6 @@ -package automation; +package ztp; -import static automation.AutomationServiceGrpc.getServiceDescriptor; +import static ztp.ZtpServiceGrpc.getServiceDescriptor; import static io.grpc.stub.ServerCalls.asyncUnaryCall; import static io.grpc.stub.ServerCalls.asyncServerStreamingCall; import static io.grpc.stub.ServerCalls.asyncClientStreamingCall; @@ -8,67 +8,67 @@ import static io.grpc.stub.ServerCalls.asyncBidiStreamingCall; @javax.annotation.Generated( value = "by Mutiny Grpc generator", -comments = "Source: automation.proto") -public final class MutinyAutomationServiceGrpc implements io.quarkus.grpc.runtime.MutinyGrpc { - private MutinyAutomationServiceGrpc() {} +comments = "Source: ztp.proto") +public final class MutinyZtpServiceGrpc implements io.quarkus.grpc.runtime.MutinyGrpc { + private MutinyZtpServiceGrpc() {} - public static MutinyAutomationServiceStub newMutinyStub(io.grpc.Channel channel) { - return new MutinyAutomationServiceStub(channel); + public static MutinyZtpServiceStub newMutinyStub(io.grpc.Channel channel) { + return new MutinyZtpServiceStub(channel); } - public static final class MutinyAutomationServiceStub extends io.grpc.stub.AbstractStub implements io.quarkus.grpc.runtime.MutinyStub { - private AutomationServiceGrpc.AutomationServiceStub delegateStub; + public static final class MutinyZtpServiceStub extends io.grpc.stub.AbstractStub implements io.quarkus.grpc.runtime.MutinyStub { + private ZtpServiceGrpc.ZtpServiceStub delegateStub; - private MutinyAutomationServiceStub(io.grpc.Channel channel) { + private MutinyZtpServiceStub(io.grpc.Channel channel) { super(channel); - delegateStub = AutomationServiceGrpc.newStub(channel); + delegateStub = ZtpServiceGrpc.newStub(channel); } - private MutinyAutomationServiceStub(io.grpc.Channel channel, io.grpc.CallOptions callOptions) { + private MutinyZtpServiceStub(io.grpc.Channel channel, io.grpc.CallOptions callOptions) { super(channel, callOptions); - delegateStub = AutomationServiceGrpc.newStub(channel).build(channel, callOptions); + delegateStub = ZtpServiceGrpc.newStub(channel).build(channel, callOptions); } @Override - protected MutinyAutomationServiceStub build(io.grpc.Channel channel, io.grpc.CallOptions callOptions) { - return new MutinyAutomationServiceStub(channel, callOptions); + protected MutinyZtpServiceStub build(io.grpc.Channel channel, io.grpc.CallOptions callOptions) { + return new MutinyZtpServiceStub(channel, callOptions); } - public io.smallrye.mutiny.Uni ztpGetDeviceRole(automation.Automation.DeviceRoleId request) { + public io.smallrye.mutiny.Uni ztpGetDeviceRole(ztp.Ztp.DeviceRoleId request) { return io.quarkus.grpc.runtime.ClientCalls.oneToOne(request, delegateStub::ztpGetDeviceRole); } - public io.smallrye.mutiny.Uni ztpGetDeviceRolesByDeviceId(context.ContextOuterClass.DeviceId request) { + public io.smallrye.mutiny.Uni ztpGetDeviceRolesByDeviceId(context.ContextOuterClass.DeviceId request) { return io.quarkus.grpc.runtime.ClientCalls.oneToOne(request, delegateStub::ztpGetDeviceRolesByDeviceId); } - public io.smallrye.mutiny.Uni ztpAdd(automation.Automation.DeviceRole request) { + public io.smallrye.mutiny.Uni ztpAdd(ztp.Ztp.DeviceRole request) { return io.quarkus.grpc.runtime.ClientCalls.oneToOne(request, delegateStub::ztpAdd); } - public io.smallrye.mutiny.Uni ztpUpdate(automation.Automation.DeviceRoleConfig request) { + public io.smallrye.mutiny.Uni ztpUpdate(ztp.Ztp.DeviceRoleConfig request) { return io.quarkus.grpc.runtime.ClientCalls.oneToOne(request, delegateStub::ztpUpdate); } - public io.smallrye.mutiny.Uni ztpDelete(automation.Automation.DeviceRole request) { + public io.smallrye.mutiny.Uni ztpDelete(ztp.Ztp.DeviceRole request) { return io.quarkus.grpc.runtime.ClientCalls.oneToOne(request, delegateStub::ztpDelete); } - public io.smallrye.mutiny.Uni ztpDeleteAll(context.ContextOuterClass.Empty request) { + public io.smallrye.mutiny.Uni ztpDeleteAll(context.ContextOuterClass.Empty request) { return io.quarkus.grpc.runtime.ClientCalls.oneToOne(request, delegateStub::ztpDeleteAll); } } - public static abstract class AutomationServiceImplBase implements io.grpc.BindableService { + public static abstract class ZtpServiceImplBase implements io.grpc.BindableService { private String compression; /** @@ -76,85 +76,85 @@ public final class MutinyAutomationServiceGrpc implements io.quarkus.grpc.runtim * * @param compression the compression, e.g {@code gzip} */ - public AutomationServiceImplBase withCompression(String compression) { + public ZtpServiceImplBase withCompression(String compression) { this.compression = compression; return this; } - public io.smallrye.mutiny.Uni ztpGetDeviceRole(automation.Automation.DeviceRoleId request) { + public io.smallrye.mutiny.Uni ztpGetDeviceRole(ztp.Ztp.DeviceRoleId request) { throw new io.grpc.StatusRuntimeException(io.grpc.Status.UNIMPLEMENTED); } - public io.smallrye.mutiny.Uni ztpGetDeviceRolesByDeviceId(context.ContextOuterClass.DeviceId request) { + public io.smallrye.mutiny.Uni ztpGetDeviceRolesByDeviceId(context.ContextOuterClass.DeviceId request) { throw new io.grpc.StatusRuntimeException(io.grpc.Status.UNIMPLEMENTED); } - public io.smallrye.mutiny.Uni ztpAdd(automation.Automation.DeviceRole request) { + public io.smallrye.mutiny.Uni ztpAdd(ztp.Ztp.DeviceRole request) { throw new io.grpc.StatusRuntimeException(io.grpc.Status.UNIMPLEMENTED); } - public io.smallrye.mutiny.Uni ztpUpdate(automation.Automation.DeviceRoleConfig request) { + public io.smallrye.mutiny.Uni ztpUpdate(ztp.Ztp.DeviceRoleConfig request) { throw new io.grpc.StatusRuntimeException(io.grpc.Status.UNIMPLEMENTED); } - public io.smallrye.mutiny.Uni ztpDelete(automation.Automation.DeviceRole request) { + public io.smallrye.mutiny.Uni ztpDelete(ztp.Ztp.DeviceRole request) { throw new io.grpc.StatusRuntimeException(io.grpc.Status.UNIMPLEMENTED); } - public io.smallrye.mutiny.Uni ztpDeleteAll(context.ContextOuterClass.Empty request) { + public io.smallrye.mutiny.Uni ztpDeleteAll(context.ContextOuterClass.Empty request) { throw new io.grpc.StatusRuntimeException(io.grpc.Status.UNIMPLEMENTED); } @java.lang.Override public final io.grpc.ServerServiceDefinition bindService() { return io.grpc.ServerServiceDefinition.builder(getServiceDescriptor()) .addMethod( - automation.AutomationServiceGrpc.getZtpGetDeviceRoleMethod(), + ztp.ZtpServiceGrpc.getZtpGetDeviceRoleMethod(), asyncUnaryCall( new MethodHandlers< - automation.Automation.DeviceRoleId, - automation.Automation.DeviceRole>( + ztp.Ztp.DeviceRoleId, + ztp.Ztp.DeviceRole>( this, METHODID_ZTP_GET_DEVICE_ROLE, compression))) .addMethod( - automation.AutomationServiceGrpc.getZtpGetDeviceRolesByDeviceIdMethod(), + ztp.ZtpServiceGrpc.getZtpGetDeviceRolesByDeviceIdMethod(), asyncUnaryCall( new MethodHandlers< context.ContextOuterClass.DeviceId, - automation.Automation.DeviceRoleList>( + ztp.Ztp.DeviceRoleList>( this, METHODID_ZTP_GET_DEVICE_ROLES_BY_DEVICE_ID, compression))) .addMethod( - automation.AutomationServiceGrpc.getZtpAddMethod(), + ztp.ZtpServiceGrpc.getZtpAddMethod(), asyncUnaryCall( new MethodHandlers< - automation.Automation.DeviceRole, - automation.Automation.DeviceRoleState>( + ztp.Ztp.DeviceRole, + ztp.Ztp.DeviceRoleState>( this, METHODID_ZTP_ADD, compression))) .addMethod( - automation.AutomationServiceGrpc.getZtpUpdateMethod(), + ztp.ZtpServiceGrpc.getZtpUpdateMethod(), asyncUnaryCall( new MethodHandlers< - automation.Automation.DeviceRoleConfig, - automation.Automation.DeviceRoleState>( + ztp.Ztp.DeviceRoleConfig, + ztp.Ztp.DeviceRoleState>( this, METHODID_ZTP_UPDATE, compression))) .addMethod( - automation.AutomationServiceGrpc.getZtpDeleteMethod(), + ztp.ZtpServiceGrpc.getZtpDeleteMethod(), asyncUnaryCall( new MethodHandlers< - automation.Automation.DeviceRole, - automation.Automation.DeviceRoleState>( + ztp.Ztp.DeviceRole, + ztp.Ztp.DeviceRoleState>( this, METHODID_ZTP_DELETE, compression))) .addMethod( - automation.AutomationServiceGrpc.getZtpDeleteAllMethod(), + ztp.ZtpServiceGrpc.getZtpDeleteAllMethod(), asyncUnaryCall( new MethodHandlers< context.ContextOuterClass.Empty, - automation.Automation.DeviceDeletionResult>( + ztp.Ztp.DeviceDeletionResult>( this, METHODID_ZTP_DELETE_ALL, compression))) .build(); } @@ -172,11 +172,11 @@ public final class MutinyAutomationServiceGrpc implements io.quarkus.grpc.runtim io.grpc.stub.ServerCalls.ServerStreamingMethod, io.grpc.stub.ServerCalls.ClientStreamingMethod, io.grpc.stub.ServerCalls.BidiStreamingMethod { - private final AutomationServiceImplBase serviceImpl; + private final ZtpServiceImplBase serviceImpl; private final int methodId; private final String compression; - MethodHandlers(AutomationServiceImplBase serviceImpl, int methodId, String compression) { + MethodHandlers(ZtpServiceImplBase serviceImpl, int methodId, String compression) { this.serviceImpl = serviceImpl; this.methodId = methodId; this.compression = compression; @@ -187,38 +187,38 @@ public final class MutinyAutomationServiceGrpc implements io.quarkus.grpc.runtim public void invoke(Req request, io.grpc.stub.StreamObserver responseObserver) { switch (methodId) { case METHODID_ZTP_GET_DEVICE_ROLE: - io.quarkus.grpc.runtime.ServerCalls.oneToOne((automation.Automation.DeviceRoleId) request, - (io.grpc.stub.StreamObserver) responseObserver, + io.quarkus.grpc.runtime.ServerCalls.oneToOne((ztp.Ztp.DeviceRoleId) request, + (io.grpc.stub.StreamObserver) responseObserver, compression, serviceImpl::ztpGetDeviceRole); break; case METHODID_ZTP_GET_DEVICE_ROLES_BY_DEVICE_ID: io.quarkus.grpc.runtime.ServerCalls.oneToOne((context.ContextOuterClass.DeviceId) request, - (io.grpc.stub.StreamObserver) responseObserver, + (io.grpc.stub.StreamObserver) responseObserver, compression, serviceImpl::ztpGetDeviceRolesByDeviceId); break; case METHODID_ZTP_ADD: - io.quarkus.grpc.runtime.ServerCalls.oneToOne((automation.Automation.DeviceRole) request, - (io.grpc.stub.StreamObserver) responseObserver, + io.quarkus.grpc.runtime.ServerCalls.oneToOne((ztp.Ztp.DeviceRole) request, + (io.grpc.stub.StreamObserver) responseObserver, compression, serviceImpl::ztpAdd); break; case METHODID_ZTP_UPDATE: - io.quarkus.grpc.runtime.ServerCalls.oneToOne((automation.Automation.DeviceRoleConfig) request, - (io.grpc.stub.StreamObserver) responseObserver, + io.quarkus.grpc.runtime.ServerCalls.oneToOne((ztp.Ztp.DeviceRoleConfig) request, + (io.grpc.stub.StreamObserver) responseObserver, compression, serviceImpl::ztpUpdate); break; case METHODID_ZTP_DELETE: - io.quarkus.grpc.runtime.ServerCalls.oneToOne((automation.Automation.DeviceRole) request, - (io.grpc.stub.StreamObserver) responseObserver, + io.quarkus.grpc.runtime.ServerCalls.oneToOne((ztp.Ztp.DeviceRole) request, + (io.grpc.stub.StreamObserver) responseObserver, compression, serviceImpl::ztpDelete); break; case METHODID_ZTP_DELETE_ALL: io.quarkus.grpc.runtime.ServerCalls.oneToOne((context.ContextOuterClass.Empty) request, - (io.grpc.stub.StreamObserver) responseObserver, + (io.grpc.stub.StreamObserver) responseObserver, compression, serviceImpl::ztpDeleteAll); break; diff --git a/src/automation/target/generated-sources/grpc/automation/Automation.java b/src/ztp/target/generated-sources/grpc/ztp/Ztp.java similarity index 75% rename from src/automation/target/generated-sources/grpc/automation/Automation.java rename to src/ztp/target/generated-sources/grpc/ztp/Ztp.java index cd82f7423092c72c6c2fa02836db645db52f7041..c9ff87a276b87ab9448b93a9f3c2e0bb8b1f2586 100644 --- a/src/automation/target/generated-sources/grpc/automation/Automation.java +++ b/src/ztp/target/generated-sources/grpc/ztp/Ztp.java @@ -1,10 +1,10 @@ // Generated by the protocol buffer compiler. DO NOT EDIT! -// source: automation.proto +// source: ztp.proto -package automation; +package ztp; -public final class Automation { - private Automation() {} +public final class Ztp { + private Ztp() {} public static void registerAllExtensions( com.google.protobuf.ExtensionRegistryLite registry) { } @@ -15,7 +15,7 @@ public final class Automation { (com.google.protobuf.ExtensionRegistryLite) registry); } /** - * Protobuf enum {@code automation.DeviceRoleType} + * Protobuf enum {@code ztp.DeviceRoleType} */ public enum DeviceRoleType implements com.google.protobuf.ProtocolMessageEnum { @@ -114,7 +114,7 @@ public final class Automation { } public static final com.google.protobuf.Descriptors.EnumDescriptor getDescriptor() { - return automation.Automation.getDescriptor().getEnumTypes().get(0); + return ztp.Ztp.getDescriptor().getEnumTypes().get(0); } private static final DeviceRoleType[] VALUES = values(); @@ -137,11 +137,11 @@ public final class Automation { this.value = value; } - // @@protoc_insertion_point(enum_scope:automation.DeviceRoleType) + // @@protoc_insertion_point(enum_scope:ztp.DeviceRoleType) } /** - * Protobuf enum {@code automation.ZtpDeviceState} + * Protobuf enum {@code ztp.ZtpDeviceState} */ public enum ZtpDeviceState implements com.google.protobuf.ProtocolMessageEnum { @@ -240,7 +240,7 @@ public final class Automation { } public static final com.google.protobuf.Descriptors.EnumDescriptor getDescriptor() { - return automation.Automation.getDescriptor().getEnumTypes().get(1); + return ztp.Ztp.getDescriptor().getEnumTypes().get(1); } private static final ZtpDeviceState[] VALUES = values(); @@ -263,11 +263,11 @@ public final class Automation { this.value = value; } - // @@protoc_insertion_point(enum_scope:automation.ZtpDeviceState) + // @@protoc_insertion_point(enum_scope:ztp.ZtpDeviceState) } public interface DeviceRoleIdOrBuilder extends - // @@protoc_insertion_point(interface_extends:automation.DeviceRoleId) + // @@protoc_insertion_point(interface_extends:ztp.DeviceRoleId) com.google.protobuf.MessageOrBuilder { /** @@ -301,11 +301,11 @@ public final class Automation { context.ContextOuterClass.DeviceIdOrBuilder getDevIdOrBuilder(); } /** - * Protobuf type {@code automation.DeviceRoleId} + * Protobuf type {@code ztp.DeviceRoleId} */ public static final class DeviceRoleId extends com.google.protobuf.GeneratedMessageV3 implements - // @@protoc_insertion_point(message_implements:automation.DeviceRoleId) + // @@protoc_insertion_point(message_implements:ztp.DeviceRoleId) DeviceRoleIdOrBuilder { private static final long serialVersionUID = 0L; // Use DeviceRoleId.newBuilder() to construct. @@ -392,15 +392,15 @@ public final class Automation { } public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { - return automation.Automation.internal_static_automation_DeviceRoleId_descriptor; + return ztp.Ztp.internal_static_ztp_DeviceRoleId_descriptor; } @java.lang.Override protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable internalGetFieldAccessorTable() { - return automation.Automation.internal_static_automation_DeviceRoleId_fieldAccessorTable + return ztp.Ztp.internal_static_ztp_DeviceRoleId_fieldAccessorTable .ensureFieldAccessorsInitialized( - automation.Automation.DeviceRoleId.class, automation.Automation.DeviceRoleId.Builder.class); + ztp.Ztp.DeviceRoleId.class, ztp.Ztp.DeviceRoleId.Builder.class); } public static final int DEVROLEID_FIELD_NUMBER = 1; @@ -502,10 +502,10 @@ public final class Automation { if (obj == this) { return true; } - if (!(obj instanceof automation.Automation.DeviceRoleId)) { + if (!(obj instanceof ztp.Ztp.DeviceRoleId)) { return super.equals(obj); } - automation.Automation.DeviceRoleId other = (automation.Automation.DeviceRoleId) obj; + ztp.Ztp.DeviceRoleId other = (ztp.Ztp.DeviceRoleId) obj; if (hasDevRoleId() != other.hasDevRoleId()) return false; if (hasDevRoleId()) { @@ -541,69 +541,69 @@ public final class Automation { return hash; } - public static automation.Automation.DeviceRoleId parseFrom( + public static ztp.Ztp.DeviceRoleId parseFrom( java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data); } - public static automation.Automation.DeviceRoleId parseFrom( + public static ztp.Ztp.DeviceRoleId parseFrom( java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data, extensionRegistry); } - public static automation.Automation.DeviceRoleId parseFrom( + public static ztp.Ztp.DeviceRoleId parseFrom( com.google.protobuf.ByteString data) throws com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data); } - public static automation.Automation.DeviceRoleId parseFrom( + public static ztp.Ztp.DeviceRoleId parseFrom( com.google.protobuf.ByteString data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data, extensionRegistry); } - public static automation.Automation.DeviceRoleId parseFrom(byte[] data) + public static ztp.Ztp.DeviceRoleId parseFrom(byte[] data) throws com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data); } - public static automation.Automation.DeviceRoleId parseFrom( + public static ztp.Ztp.DeviceRoleId parseFrom( byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data, extensionRegistry); } - public static automation.Automation.DeviceRoleId parseFrom(java.io.InputStream input) + public static ztp.Ztp.DeviceRoleId parseFrom(java.io.InputStream input) throws java.io.IOException { return com.google.protobuf.GeneratedMessageV3 .parseWithIOException(PARSER, input); } - public static automation.Automation.DeviceRoleId parseFrom( + public static ztp.Ztp.DeviceRoleId parseFrom( java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { return com.google.protobuf.GeneratedMessageV3 .parseWithIOException(PARSER, input, extensionRegistry); } - public static automation.Automation.DeviceRoleId parseDelimitedFrom(java.io.InputStream input) + public static ztp.Ztp.DeviceRoleId parseDelimitedFrom(java.io.InputStream input) throws java.io.IOException { return com.google.protobuf.GeneratedMessageV3 .parseDelimitedWithIOException(PARSER, input); } - public static automation.Automation.DeviceRoleId parseDelimitedFrom( + public static ztp.Ztp.DeviceRoleId parseDelimitedFrom( java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { return com.google.protobuf.GeneratedMessageV3 .parseDelimitedWithIOException(PARSER, input, extensionRegistry); } - public static automation.Automation.DeviceRoleId parseFrom( + public static ztp.Ztp.DeviceRoleId parseFrom( com.google.protobuf.CodedInputStream input) throws java.io.IOException { return com.google.protobuf.GeneratedMessageV3 .parseWithIOException(PARSER, input); } - public static automation.Automation.DeviceRoleId parseFrom( + public static ztp.Ztp.DeviceRoleId parseFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { @@ -616,7 +616,7 @@ public final class Automation { public static Builder newBuilder() { return DEFAULT_INSTANCE.toBuilder(); } - public static Builder newBuilder(automation.Automation.DeviceRoleId prototype) { + public static Builder newBuilder(ztp.Ztp.DeviceRoleId prototype) { return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); } @java.lang.Override @@ -632,26 +632,26 @@ public final class Automation { return builder; } /** - * Protobuf type {@code automation.DeviceRoleId} + * Protobuf type {@code ztp.DeviceRoleId} */ public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder implements - // @@protoc_insertion_point(builder_implements:automation.DeviceRoleId) - automation.Automation.DeviceRoleIdOrBuilder { + // @@protoc_insertion_point(builder_implements:ztp.DeviceRoleId) + ztp.Ztp.DeviceRoleIdOrBuilder { public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { - return automation.Automation.internal_static_automation_DeviceRoleId_descriptor; + return ztp.Ztp.internal_static_ztp_DeviceRoleId_descriptor; } @java.lang.Override protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable internalGetFieldAccessorTable() { - return automation.Automation.internal_static_automation_DeviceRoleId_fieldAccessorTable + return ztp.Ztp.internal_static_ztp_DeviceRoleId_fieldAccessorTable .ensureFieldAccessorsInitialized( - automation.Automation.DeviceRoleId.class, automation.Automation.DeviceRoleId.Builder.class); + ztp.Ztp.DeviceRoleId.class, ztp.Ztp.DeviceRoleId.Builder.class); } - // Construct using automation.Automation.DeviceRoleId.newBuilder() + // Construct using ztp.Ztp.DeviceRoleId.newBuilder() private Builder() { maybeForceBuilderInitialization(); } @@ -687,17 +687,17 @@ public final class Automation { @java.lang.Override public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { - return automation.Automation.internal_static_automation_DeviceRoleId_descriptor; + return ztp.Ztp.internal_static_ztp_DeviceRoleId_descriptor; } @java.lang.Override - public automation.Automation.DeviceRoleId getDefaultInstanceForType() { - return automation.Automation.DeviceRoleId.getDefaultInstance(); + public ztp.Ztp.DeviceRoleId getDefaultInstanceForType() { + return ztp.Ztp.DeviceRoleId.getDefaultInstance(); } @java.lang.Override - public automation.Automation.DeviceRoleId build() { - automation.Automation.DeviceRoleId result = buildPartial(); + public ztp.Ztp.DeviceRoleId build() { + ztp.Ztp.DeviceRoleId result = buildPartial(); if (!result.isInitialized()) { throw newUninitializedMessageException(result); } @@ -705,8 +705,8 @@ public final class Automation { } @java.lang.Override - public automation.Automation.DeviceRoleId buildPartial() { - automation.Automation.DeviceRoleId result = new automation.Automation.DeviceRoleId(this); + public ztp.Ztp.DeviceRoleId buildPartial() { + ztp.Ztp.DeviceRoleId result = new ztp.Ztp.DeviceRoleId(this); if (devRoleIdBuilder_ == null) { result.devRoleId_ = devRoleId_; } else { @@ -755,16 +755,16 @@ public final class Automation { } @java.lang.Override public Builder mergeFrom(com.google.protobuf.Message other) { - if (other instanceof automation.Automation.DeviceRoleId) { - return mergeFrom((automation.Automation.DeviceRoleId)other); + if (other instanceof ztp.Ztp.DeviceRoleId) { + return mergeFrom((ztp.Ztp.DeviceRoleId)other); } else { super.mergeFrom(other); return this; } } - public Builder mergeFrom(automation.Automation.DeviceRoleId other) { - if (other == automation.Automation.DeviceRoleId.getDefaultInstance()) return this; + public Builder mergeFrom(ztp.Ztp.DeviceRoleId other) { + if (other == ztp.Ztp.DeviceRoleId.getDefaultInstance()) return this; if (other.hasDevRoleId()) { mergeDevRoleId(other.getDevRoleId()); } @@ -786,11 +786,11 @@ public final class Automation { com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - automation.Automation.DeviceRoleId parsedMessage = null; + ztp.Ztp.DeviceRoleId parsedMessage = null; try { parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); } catch (com.google.protobuf.InvalidProtocolBufferException e) { - parsedMessage = (automation.Automation.DeviceRoleId) e.getUnfinishedMessage(); + parsedMessage = (ztp.Ztp.DeviceRoleId) e.getUnfinishedMessage(); throw e.unwrapIOException(); } finally { if (parsedMessage != null) { @@ -1050,16 +1050,16 @@ public final class Automation { } - // @@protoc_insertion_point(builder_scope:automation.DeviceRoleId) + // @@protoc_insertion_point(builder_scope:ztp.DeviceRoleId) } - // @@protoc_insertion_point(class_scope:automation.DeviceRoleId) - private static final automation.Automation.DeviceRoleId DEFAULT_INSTANCE; + // @@protoc_insertion_point(class_scope:ztp.DeviceRoleId) + private static final ztp.Ztp.DeviceRoleId DEFAULT_INSTANCE; static { - DEFAULT_INSTANCE = new automation.Automation.DeviceRoleId(); + DEFAULT_INSTANCE = new ztp.Ztp.DeviceRoleId(); } - public static automation.Automation.DeviceRoleId getDefaultInstance() { + public static ztp.Ztp.DeviceRoleId getDefaultInstance() { return DEFAULT_INSTANCE; } @@ -1084,48 +1084,48 @@ public final class Automation { } @java.lang.Override - public automation.Automation.DeviceRoleId getDefaultInstanceForType() { + public ztp.Ztp.DeviceRoleId getDefaultInstanceForType() { return DEFAULT_INSTANCE; } } public interface DeviceRoleOrBuilder extends - // @@protoc_insertion_point(interface_extends:automation.DeviceRole) + // @@protoc_insertion_point(interface_extends:ztp.DeviceRole) com.google.protobuf.MessageOrBuilder { /** - * .automation.DeviceRoleId devRoleId = 1; + * .ztp.DeviceRoleId devRoleId = 1; * @return Whether the devRoleId field is set. */ boolean hasDevRoleId(); /** - * .automation.DeviceRoleId devRoleId = 1; + * .ztp.DeviceRoleId devRoleId = 1; * @return The devRoleId. */ - automation.Automation.DeviceRoleId getDevRoleId(); + ztp.Ztp.DeviceRoleId getDevRoleId(); /** - * .automation.DeviceRoleId devRoleId = 1; + * .ztp.DeviceRoleId devRoleId = 1; */ - automation.Automation.DeviceRoleIdOrBuilder getDevRoleIdOrBuilder(); + ztp.Ztp.DeviceRoleIdOrBuilder getDevRoleIdOrBuilder(); /** - * .automation.DeviceRoleType devRoleType = 2; + * .ztp.DeviceRoleType devRoleType = 2; * @return The enum numeric value on the wire for devRoleType. */ int getDevRoleTypeValue(); /** - * .automation.DeviceRoleType devRoleType = 2; + * .ztp.DeviceRoleType devRoleType = 2; * @return The devRoleType. */ - automation.Automation.DeviceRoleType getDevRoleType(); + ztp.Ztp.DeviceRoleType getDevRoleType(); } /** - * Protobuf type {@code automation.DeviceRole} + * Protobuf type {@code ztp.DeviceRole} */ public static final class DeviceRole extends com.google.protobuf.GeneratedMessageV3 implements - // @@protoc_insertion_point(message_implements:automation.DeviceRole) + // @@protoc_insertion_point(message_implements:ztp.DeviceRole) DeviceRoleOrBuilder { private static final long serialVersionUID = 0L; // Use DeviceRole.newBuilder() to construct. @@ -1167,11 +1167,11 @@ public final class Automation { done = true; break; case 10: { - automation.Automation.DeviceRoleId.Builder subBuilder = null; + ztp.Ztp.DeviceRoleId.Builder subBuilder = null; if (devRoleId_ != null) { subBuilder = devRoleId_.toBuilder(); } - devRoleId_ = input.readMessage(automation.Automation.DeviceRoleId.parser(), extensionRegistry); + devRoleId_ = input.readMessage(ztp.Ztp.DeviceRoleId.parser(), extensionRegistry); if (subBuilder != null) { subBuilder.mergeFrom(devRoleId_); devRoleId_ = subBuilder.buildPartial(); @@ -1206,21 +1206,21 @@ public final class Automation { } public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { - return automation.Automation.internal_static_automation_DeviceRole_descriptor; + return ztp.Ztp.internal_static_ztp_DeviceRole_descriptor; } @java.lang.Override protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable internalGetFieldAccessorTable() { - return automation.Automation.internal_static_automation_DeviceRole_fieldAccessorTable + return ztp.Ztp.internal_static_ztp_DeviceRole_fieldAccessorTable .ensureFieldAccessorsInitialized( - automation.Automation.DeviceRole.class, automation.Automation.DeviceRole.Builder.class); + ztp.Ztp.DeviceRole.class, ztp.Ztp.DeviceRole.Builder.class); } public static final int DEVROLEID_FIELD_NUMBER = 1; - private automation.Automation.DeviceRoleId devRoleId_; + private ztp.Ztp.DeviceRoleId devRoleId_; /** - * .automation.DeviceRoleId devRoleId = 1; + * .ztp.DeviceRoleId devRoleId = 1; * @return Whether the devRoleId field is set. */ @java.lang.Override @@ -1228,38 +1228,38 @@ public final class Automation { return devRoleId_ != null; } /** - * .automation.DeviceRoleId devRoleId = 1; + * .ztp.DeviceRoleId devRoleId = 1; * @return The devRoleId. */ @java.lang.Override - public automation.Automation.DeviceRoleId getDevRoleId() { - return devRoleId_ == null ? automation.Automation.DeviceRoleId.getDefaultInstance() : devRoleId_; + public ztp.Ztp.DeviceRoleId getDevRoleId() { + return devRoleId_ == null ? ztp.Ztp.DeviceRoleId.getDefaultInstance() : devRoleId_; } /** - * .automation.DeviceRoleId devRoleId = 1; + * .ztp.DeviceRoleId devRoleId = 1; */ @java.lang.Override - public automation.Automation.DeviceRoleIdOrBuilder getDevRoleIdOrBuilder() { + public ztp.Ztp.DeviceRoleIdOrBuilder getDevRoleIdOrBuilder() { return getDevRoleId(); } public static final int DEVROLETYPE_FIELD_NUMBER = 2; private int devRoleType_; /** - * .automation.DeviceRoleType devRoleType = 2; + * .ztp.DeviceRoleType devRoleType = 2; * @return The enum numeric value on the wire for devRoleType. */ @java.lang.Override public int getDevRoleTypeValue() { return devRoleType_; } /** - * .automation.DeviceRoleType devRoleType = 2; + * .ztp.DeviceRoleType devRoleType = 2; * @return The devRoleType. */ - @java.lang.Override public automation.Automation.DeviceRoleType getDevRoleType() { + @java.lang.Override public ztp.Ztp.DeviceRoleType getDevRoleType() { @SuppressWarnings("deprecation") - automation.Automation.DeviceRoleType result = automation.Automation.DeviceRoleType.valueOf(devRoleType_); - return result == null ? automation.Automation.DeviceRoleType.UNRECOGNIZED : result; + ztp.Ztp.DeviceRoleType result = ztp.Ztp.DeviceRoleType.valueOf(devRoleType_); + return result == null ? ztp.Ztp.DeviceRoleType.UNRECOGNIZED : result; } private byte memoizedIsInitialized = -1; @@ -1279,7 +1279,7 @@ public final class Automation { if (devRoleId_ != null) { output.writeMessage(1, getDevRoleId()); } - if (devRoleType_ != automation.Automation.DeviceRoleType.NONE.getNumber()) { + if (devRoleType_ != ztp.Ztp.DeviceRoleType.NONE.getNumber()) { output.writeEnum(2, devRoleType_); } unknownFields.writeTo(output); @@ -1295,7 +1295,7 @@ public final class Automation { size += com.google.protobuf.CodedOutputStream .computeMessageSize(1, getDevRoleId()); } - if (devRoleType_ != automation.Automation.DeviceRoleType.NONE.getNumber()) { + if (devRoleType_ != ztp.Ztp.DeviceRoleType.NONE.getNumber()) { size += com.google.protobuf.CodedOutputStream .computeEnumSize(2, devRoleType_); } @@ -1309,10 +1309,10 @@ public final class Automation { if (obj == this) { return true; } - if (!(obj instanceof automation.Automation.DeviceRole)) { + if (!(obj instanceof ztp.Ztp.DeviceRole)) { return super.equals(obj); } - automation.Automation.DeviceRole other = (automation.Automation.DeviceRole) obj; + ztp.Ztp.DeviceRole other = (ztp.Ztp.DeviceRole) obj; if (hasDevRoleId() != other.hasDevRoleId()) return false; if (hasDevRoleId()) { @@ -1342,69 +1342,69 @@ public final class Automation { return hash; } - public static automation.Automation.DeviceRole parseFrom( + public static ztp.Ztp.DeviceRole parseFrom( java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data); } - public static automation.Automation.DeviceRole parseFrom( + public static ztp.Ztp.DeviceRole parseFrom( java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data, extensionRegistry); } - public static automation.Automation.DeviceRole parseFrom( + public static ztp.Ztp.DeviceRole parseFrom( com.google.protobuf.ByteString data) throws com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data); } - public static automation.Automation.DeviceRole parseFrom( + public static ztp.Ztp.DeviceRole parseFrom( com.google.protobuf.ByteString data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data, extensionRegistry); } - public static automation.Automation.DeviceRole parseFrom(byte[] data) + public static ztp.Ztp.DeviceRole parseFrom(byte[] data) throws com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data); } - public static automation.Automation.DeviceRole parseFrom( + public static ztp.Ztp.DeviceRole parseFrom( byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data, extensionRegistry); } - public static automation.Automation.DeviceRole parseFrom(java.io.InputStream input) + public static ztp.Ztp.DeviceRole parseFrom(java.io.InputStream input) throws java.io.IOException { return com.google.protobuf.GeneratedMessageV3 .parseWithIOException(PARSER, input); } - public static automation.Automation.DeviceRole parseFrom( + public static ztp.Ztp.DeviceRole parseFrom( java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { return com.google.protobuf.GeneratedMessageV3 .parseWithIOException(PARSER, input, extensionRegistry); } - public static automation.Automation.DeviceRole parseDelimitedFrom(java.io.InputStream input) + public static ztp.Ztp.DeviceRole parseDelimitedFrom(java.io.InputStream input) throws java.io.IOException { return com.google.protobuf.GeneratedMessageV3 .parseDelimitedWithIOException(PARSER, input); } - public static automation.Automation.DeviceRole parseDelimitedFrom( + public static ztp.Ztp.DeviceRole parseDelimitedFrom( java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { return com.google.protobuf.GeneratedMessageV3 .parseDelimitedWithIOException(PARSER, input, extensionRegistry); } - public static automation.Automation.DeviceRole parseFrom( + public static ztp.Ztp.DeviceRole parseFrom( com.google.protobuf.CodedInputStream input) throws java.io.IOException { return com.google.protobuf.GeneratedMessageV3 .parseWithIOException(PARSER, input); } - public static automation.Automation.DeviceRole parseFrom( + public static ztp.Ztp.DeviceRole parseFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { @@ -1417,7 +1417,7 @@ public final class Automation { public static Builder newBuilder() { return DEFAULT_INSTANCE.toBuilder(); } - public static Builder newBuilder(automation.Automation.DeviceRole prototype) { + public static Builder newBuilder(ztp.Ztp.DeviceRole prototype) { return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); } @java.lang.Override @@ -1433,26 +1433,26 @@ public final class Automation { return builder; } /** - * Protobuf type {@code automation.DeviceRole} + * Protobuf type {@code ztp.DeviceRole} */ public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder implements - // @@protoc_insertion_point(builder_implements:automation.DeviceRole) - automation.Automation.DeviceRoleOrBuilder { + // @@protoc_insertion_point(builder_implements:ztp.DeviceRole) + ztp.Ztp.DeviceRoleOrBuilder { public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { - return automation.Automation.internal_static_automation_DeviceRole_descriptor; + return ztp.Ztp.internal_static_ztp_DeviceRole_descriptor; } @java.lang.Override protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable internalGetFieldAccessorTable() { - return automation.Automation.internal_static_automation_DeviceRole_fieldAccessorTable + return ztp.Ztp.internal_static_ztp_DeviceRole_fieldAccessorTable .ensureFieldAccessorsInitialized( - automation.Automation.DeviceRole.class, automation.Automation.DeviceRole.Builder.class); + ztp.Ztp.DeviceRole.class, ztp.Ztp.DeviceRole.Builder.class); } - // Construct using automation.Automation.DeviceRole.newBuilder() + // Construct using ztp.Ztp.DeviceRole.newBuilder() private Builder() { maybeForceBuilderInitialization(); } @@ -1484,17 +1484,17 @@ public final class Automation { @java.lang.Override public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { - return automation.Automation.internal_static_automation_DeviceRole_descriptor; + return ztp.Ztp.internal_static_ztp_DeviceRole_descriptor; } @java.lang.Override - public automation.Automation.DeviceRole getDefaultInstanceForType() { - return automation.Automation.DeviceRole.getDefaultInstance(); + public ztp.Ztp.DeviceRole getDefaultInstanceForType() { + return ztp.Ztp.DeviceRole.getDefaultInstance(); } @java.lang.Override - public automation.Automation.DeviceRole build() { - automation.Automation.DeviceRole result = buildPartial(); + public ztp.Ztp.DeviceRole build() { + ztp.Ztp.DeviceRole result = buildPartial(); if (!result.isInitialized()) { throw newUninitializedMessageException(result); } @@ -1502,8 +1502,8 @@ public final class Automation { } @java.lang.Override - public automation.Automation.DeviceRole buildPartial() { - automation.Automation.DeviceRole result = new automation.Automation.DeviceRole(this); + public ztp.Ztp.DeviceRole buildPartial() { + ztp.Ztp.DeviceRole result = new ztp.Ztp.DeviceRole(this); if (devRoleIdBuilder_ == null) { result.devRoleId_ = devRoleId_; } else { @@ -1548,16 +1548,16 @@ public final class Automation { } @java.lang.Override public Builder mergeFrom(com.google.protobuf.Message other) { - if (other instanceof automation.Automation.DeviceRole) { - return mergeFrom((automation.Automation.DeviceRole)other); + if (other instanceof ztp.Ztp.DeviceRole) { + return mergeFrom((ztp.Ztp.DeviceRole)other); } else { super.mergeFrom(other); return this; } } - public Builder mergeFrom(automation.Automation.DeviceRole other) { - if (other == automation.Automation.DeviceRole.getDefaultInstance()) return this; + public Builder mergeFrom(ztp.Ztp.DeviceRole other) { + if (other == ztp.Ztp.DeviceRole.getDefaultInstance()) return this; if (other.hasDevRoleId()) { mergeDevRoleId(other.getDevRoleId()); } @@ -1579,11 +1579,11 @@ public final class Automation { com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - automation.Automation.DeviceRole parsedMessage = null; + ztp.Ztp.DeviceRole parsedMessage = null; try { parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); } catch (com.google.protobuf.InvalidProtocolBufferException e) { - parsedMessage = (automation.Automation.DeviceRole) e.getUnfinishedMessage(); + parsedMessage = (ztp.Ztp.DeviceRole) e.getUnfinishedMessage(); throw e.unwrapIOException(); } finally { if (parsedMessage != null) { @@ -1593,31 +1593,31 @@ public final class Automation { return this; } - private automation.Automation.DeviceRoleId devRoleId_; + private ztp.Ztp.DeviceRoleId devRoleId_; private com.google.protobuf.SingleFieldBuilderV3< - automation.Automation.DeviceRoleId, automation.Automation.DeviceRoleId.Builder, automation.Automation.DeviceRoleIdOrBuilder> devRoleIdBuilder_; + ztp.Ztp.DeviceRoleId, ztp.Ztp.DeviceRoleId.Builder, ztp.Ztp.DeviceRoleIdOrBuilder> devRoleIdBuilder_; /** - * .automation.DeviceRoleId devRoleId = 1; + * .ztp.DeviceRoleId devRoleId = 1; * @return Whether the devRoleId field is set. */ public boolean hasDevRoleId() { return devRoleIdBuilder_ != null || devRoleId_ != null; } /** - * .automation.DeviceRoleId devRoleId = 1; + * .ztp.DeviceRoleId devRoleId = 1; * @return The devRoleId. */ - public automation.Automation.DeviceRoleId getDevRoleId() { + public ztp.Ztp.DeviceRoleId getDevRoleId() { if (devRoleIdBuilder_ == null) { - return devRoleId_ == null ? automation.Automation.DeviceRoleId.getDefaultInstance() : devRoleId_; + return devRoleId_ == null ? ztp.Ztp.DeviceRoleId.getDefaultInstance() : devRoleId_; } else { return devRoleIdBuilder_.getMessage(); } } /** - * .automation.DeviceRoleId devRoleId = 1; + * .ztp.DeviceRoleId devRoleId = 1; */ - public Builder setDevRoleId(automation.Automation.DeviceRoleId value) { + public Builder setDevRoleId(ztp.Ztp.DeviceRoleId value) { if (devRoleIdBuilder_ == null) { if (value == null) { throw new NullPointerException(); @@ -1631,10 +1631,10 @@ public final class Automation { return this; } /** - * .automation.DeviceRoleId devRoleId = 1; + * .ztp.DeviceRoleId devRoleId = 1; */ public Builder setDevRoleId( - automation.Automation.DeviceRoleId.Builder builderForValue) { + ztp.Ztp.DeviceRoleId.Builder builderForValue) { if (devRoleIdBuilder_ == null) { devRoleId_ = builderForValue.build(); onChanged(); @@ -1645,13 +1645,13 @@ public final class Automation { return this; } /** - * .automation.DeviceRoleId devRoleId = 1; + * .ztp.DeviceRoleId devRoleId = 1; */ - public Builder mergeDevRoleId(automation.Automation.DeviceRoleId value) { + public Builder mergeDevRoleId(ztp.Ztp.DeviceRoleId value) { if (devRoleIdBuilder_ == null) { if (devRoleId_ != null) { devRoleId_ = - automation.Automation.DeviceRoleId.newBuilder(devRoleId_).mergeFrom(value).buildPartial(); + ztp.Ztp.DeviceRoleId.newBuilder(devRoleId_).mergeFrom(value).buildPartial(); } else { devRoleId_ = value; } @@ -1663,7 +1663,7 @@ public final class Automation { return this; } /** - * .automation.DeviceRoleId devRoleId = 1; + * .ztp.DeviceRoleId devRoleId = 1; */ public Builder clearDevRoleId() { if (devRoleIdBuilder_ == null) { @@ -1677,33 +1677,33 @@ public final class Automation { return this; } /** - * .automation.DeviceRoleId devRoleId = 1; + * .ztp.DeviceRoleId devRoleId = 1; */ - public automation.Automation.DeviceRoleId.Builder getDevRoleIdBuilder() { + public ztp.Ztp.DeviceRoleId.Builder getDevRoleIdBuilder() { onChanged(); return getDevRoleIdFieldBuilder().getBuilder(); } /** - * .automation.DeviceRoleId devRoleId = 1; + * .ztp.DeviceRoleId devRoleId = 1; */ - public automation.Automation.DeviceRoleIdOrBuilder getDevRoleIdOrBuilder() { + public ztp.Ztp.DeviceRoleIdOrBuilder getDevRoleIdOrBuilder() { if (devRoleIdBuilder_ != null) { return devRoleIdBuilder_.getMessageOrBuilder(); } else { return devRoleId_ == null ? - automation.Automation.DeviceRoleId.getDefaultInstance() : devRoleId_; + ztp.Ztp.DeviceRoleId.getDefaultInstance() : devRoleId_; } } /** - * .automation.DeviceRoleId devRoleId = 1; + * .ztp.DeviceRoleId devRoleId = 1; */ private com.google.protobuf.SingleFieldBuilderV3< - automation.Automation.DeviceRoleId, automation.Automation.DeviceRoleId.Builder, automation.Automation.DeviceRoleIdOrBuilder> + ztp.Ztp.DeviceRoleId, ztp.Ztp.DeviceRoleId.Builder, ztp.Ztp.DeviceRoleIdOrBuilder> getDevRoleIdFieldBuilder() { if (devRoleIdBuilder_ == null) { devRoleIdBuilder_ = new com.google.protobuf.SingleFieldBuilderV3< - automation.Automation.DeviceRoleId, automation.Automation.DeviceRoleId.Builder, automation.Automation.DeviceRoleIdOrBuilder>( + ztp.Ztp.DeviceRoleId, ztp.Ztp.DeviceRoleId.Builder, ztp.Ztp.DeviceRoleIdOrBuilder>( getDevRoleId(), getParentForChildren(), isClean()); @@ -1714,14 +1714,14 @@ public final class Automation { private int devRoleType_ = 0; /** - * .automation.DeviceRoleType devRoleType = 2; + * .ztp.DeviceRoleType devRoleType = 2; * @return The enum numeric value on the wire for devRoleType. */ @java.lang.Override public int getDevRoleTypeValue() { return devRoleType_; } /** - * .automation.DeviceRoleType devRoleType = 2; + * .ztp.DeviceRoleType devRoleType = 2; * @param value The enum numeric value on the wire for devRoleType to set. * @return This builder for chaining. */ @@ -1732,21 +1732,21 @@ public final class Automation { return this; } /** - * .automation.DeviceRoleType devRoleType = 2; + * .ztp.DeviceRoleType devRoleType = 2; * @return The devRoleType. */ @java.lang.Override - public automation.Automation.DeviceRoleType getDevRoleType() { + public ztp.Ztp.DeviceRoleType getDevRoleType() { @SuppressWarnings("deprecation") - automation.Automation.DeviceRoleType result = automation.Automation.DeviceRoleType.valueOf(devRoleType_); - return result == null ? automation.Automation.DeviceRoleType.UNRECOGNIZED : result; + ztp.Ztp.DeviceRoleType result = ztp.Ztp.DeviceRoleType.valueOf(devRoleType_); + return result == null ? ztp.Ztp.DeviceRoleType.UNRECOGNIZED : result; } /** - * .automation.DeviceRoleType devRoleType = 2; + * .ztp.DeviceRoleType devRoleType = 2; * @param value The devRoleType to set. * @return This builder for chaining. */ - public Builder setDevRoleType(automation.Automation.DeviceRoleType value) { + public Builder setDevRoleType(ztp.Ztp.DeviceRoleType value) { if (value == null) { throw new NullPointerException(); } @@ -1756,7 +1756,7 @@ public final class Automation { return this; } /** - * .automation.DeviceRoleType devRoleType = 2; + * .ztp.DeviceRoleType devRoleType = 2; * @return This builder for chaining. */ public Builder clearDevRoleType() { @@ -1778,16 +1778,16 @@ public final class Automation { } - // @@protoc_insertion_point(builder_scope:automation.DeviceRole) + // @@protoc_insertion_point(builder_scope:ztp.DeviceRole) } - // @@protoc_insertion_point(class_scope:automation.DeviceRole) - private static final automation.Automation.DeviceRole DEFAULT_INSTANCE; + // @@protoc_insertion_point(class_scope:ztp.DeviceRole) + private static final ztp.Ztp.DeviceRole DEFAULT_INSTANCE; static { - DEFAULT_INSTANCE = new automation.Automation.DeviceRole(); + DEFAULT_INSTANCE = new ztp.Ztp.DeviceRole(); } - public static automation.Automation.DeviceRole getDefaultInstance() { + public static ztp.Ztp.DeviceRole getDefaultInstance() { return DEFAULT_INSTANCE; } @@ -1812,30 +1812,30 @@ public final class Automation { } @java.lang.Override - public automation.Automation.DeviceRole getDefaultInstanceForType() { + public ztp.Ztp.DeviceRole getDefaultInstanceForType() { return DEFAULT_INSTANCE; } } public interface DeviceRoleConfigOrBuilder extends - // @@protoc_insertion_point(interface_extends:automation.DeviceRoleConfig) + // @@protoc_insertion_point(interface_extends:ztp.DeviceRoleConfig) com.google.protobuf.MessageOrBuilder { /** - * .automation.DeviceRole devRole = 1; + * .ztp.DeviceRole devRole = 1; * @return Whether the devRole field is set. */ boolean hasDevRole(); /** - * .automation.DeviceRole devRole = 1; + * .ztp.DeviceRole devRole = 1; * @return The devRole. */ - automation.Automation.DeviceRole getDevRole(); + ztp.Ztp.DeviceRole getDevRole(); /** - * .automation.DeviceRole devRole = 1; + * .ztp.DeviceRole devRole = 1; */ - automation.Automation.DeviceRoleOrBuilder getDevRoleOrBuilder(); + ztp.Ztp.DeviceRoleOrBuilder getDevRoleOrBuilder(); /** * .context.DeviceConfig devConfig = 2; @@ -1853,11 +1853,11 @@ public final class Automation { context.ContextOuterClass.DeviceConfigOrBuilder getDevConfigOrBuilder(); } /** - * Protobuf type {@code automation.DeviceRoleConfig} + * Protobuf type {@code ztp.DeviceRoleConfig} */ public static final class DeviceRoleConfig extends com.google.protobuf.GeneratedMessageV3 implements - // @@protoc_insertion_point(message_implements:automation.DeviceRoleConfig) + // @@protoc_insertion_point(message_implements:ztp.DeviceRoleConfig) DeviceRoleConfigOrBuilder { private static final long serialVersionUID = 0L; // Use DeviceRoleConfig.newBuilder() to construct. @@ -1898,11 +1898,11 @@ public final class Automation { done = true; break; case 10: { - automation.Automation.DeviceRole.Builder subBuilder = null; + ztp.Ztp.DeviceRole.Builder subBuilder = null; if (devRole_ != null) { subBuilder = devRole_.toBuilder(); } - devRole_ = input.readMessage(automation.Automation.DeviceRole.parser(), extensionRegistry); + devRole_ = input.readMessage(ztp.Ztp.DeviceRole.parser(), extensionRegistry); if (subBuilder != null) { subBuilder.mergeFrom(devRole_); devRole_ = subBuilder.buildPartial(); @@ -1944,21 +1944,21 @@ public final class Automation { } public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { - return automation.Automation.internal_static_automation_DeviceRoleConfig_descriptor; + return ztp.Ztp.internal_static_ztp_DeviceRoleConfig_descriptor; } @java.lang.Override protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable internalGetFieldAccessorTable() { - return automation.Automation.internal_static_automation_DeviceRoleConfig_fieldAccessorTable + return ztp.Ztp.internal_static_ztp_DeviceRoleConfig_fieldAccessorTable .ensureFieldAccessorsInitialized( - automation.Automation.DeviceRoleConfig.class, automation.Automation.DeviceRoleConfig.Builder.class); + ztp.Ztp.DeviceRoleConfig.class, ztp.Ztp.DeviceRoleConfig.Builder.class); } public static final int DEVROLE_FIELD_NUMBER = 1; - private automation.Automation.DeviceRole devRole_; + private ztp.Ztp.DeviceRole devRole_; /** - * .automation.DeviceRole devRole = 1; + * .ztp.DeviceRole devRole = 1; * @return Whether the devRole field is set. */ @java.lang.Override @@ -1966,18 +1966,18 @@ public final class Automation { return devRole_ != null; } /** - * .automation.DeviceRole devRole = 1; + * .ztp.DeviceRole devRole = 1; * @return The devRole. */ @java.lang.Override - public automation.Automation.DeviceRole getDevRole() { - return devRole_ == null ? automation.Automation.DeviceRole.getDefaultInstance() : devRole_; + public ztp.Ztp.DeviceRole getDevRole() { + return devRole_ == null ? ztp.Ztp.DeviceRole.getDefaultInstance() : devRole_; } /** - * .automation.DeviceRole devRole = 1; + * .ztp.DeviceRole devRole = 1; */ @java.lang.Override - public automation.Automation.DeviceRoleOrBuilder getDevRoleOrBuilder() { + public ztp.Ztp.DeviceRoleOrBuilder getDevRoleOrBuilder() { return getDevRole(); } @@ -2054,10 +2054,10 @@ public final class Automation { if (obj == this) { return true; } - if (!(obj instanceof automation.Automation.DeviceRoleConfig)) { + if (!(obj instanceof ztp.Ztp.DeviceRoleConfig)) { return super.equals(obj); } - automation.Automation.DeviceRoleConfig other = (automation.Automation.DeviceRoleConfig) obj; + ztp.Ztp.DeviceRoleConfig other = (ztp.Ztp.DeviceRoleConfig) obj; if (hasDevRole() != other.hasDevRole()) return false; if (hasDevRole()) { @@ -2093,69 +2093,69 @@ public final class Automation { return hash; } - public static automation.Automation.DeviceRoleConfig parseFrom( + public static ztp.Ztp.DeviceRoleConfig parseFrom( java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data); } - public static automation.Automation.DeviceRoleConfig parseFrom( + public static ztp.Ztp.DeviceRoleConfig parseFrom( java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data, extensionRegistry); } - public static automation.Automation.DeviceRoleConfig parseFrom( + public static ztp.Ztp.DeviceRoleConfig parseFrom( com.google.protobuf.ByteString data) throws com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data); } - public static automation.Automation.DeviceRoleConfig parseFrom( + public static ztp.Ztp.DeviceRoleConfig parseFrom( com.google.protobuf.ByteString data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data, extensionRegistry); } - public static automation.Automation.DeviceRoleConfig parseFrom(byte[] data) + public static ztp.Ztp.DeviceRoleConfig parseFrom(byte[] data) throws com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data); } - public static automation.Automation.DeviceRoleConfig parseFrom( + public static ztp.Ztp.DeviceRoleConfig parseFrom( byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data, extensionRegistry); } - public static automation.Automation.DeviceRoleConfig parseFrom(java.io.InputStream input) + public static ztp.Ztp.DeviceRoleConfig parseFrom(java.io.InputStream input) throws java.io.IOException { return com.google.protobuf.GeneratedMessageV3 .parseWithIOException(PARSER, input); } - public static automation.Automation.DeviceRoleConfig parseFrom( + public static ztp.Ztp.DeviceRoleConfig parseFrom( java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { return com.google.protobuf.GeneratedMessageV3 .parseWithIOException(PARSER, input, extensionRegistry); } - public static automation.Automation.DeviceRoleConfig parseDelimitedFrom(java.io.InputStream input) + public static ztp.Ztp.DeviceRoleConfig parseDelimitedFrom(java.io.InputStream input) throws java.io.IOException { return com.google.protobuf.GeneratedMessageV3 .parseDelimitedWithIOException(PARSER, input); } - public static automation.Automation.DeviceRoleConfig parseDelimitedFrom( + public static ztp.Ztp.DeviceRoleConfig parseDelimitedFrom( java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { return com.google.protobuf.GeneratedMessageV3 .parseDelimitedWithIOException(PARSER, input, extensionRegistry); } - public static automation.Automation.DeviceRoleConfig parseFrom( + public static ztp.Ztp.DeviceRoleConfig parseFrom( com.google.protobuf.CodedInputStream input) throws java.io.IOException { return com.google.protobuf.GeneratedMessageV3 .parseWithIOException(PARSER, input); } - public static automation.Automation.DeviceRoleConfig parseFrom( + public static ztp.Ztp.DeviceRoleConfig parseFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { @@ -2168,7 +2168,7 @@ public final class Automation { public static Builder newBuilder() { return DEFAULT_INSTANCE.toBuilder(); } - public static Builder newBuilder(automation.Automation.DeviceRoleConfig prototype) { + public static Builder newBuilder(ztp.Ztp.DeviceRoleConfig prototype) { return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); } @java.lang.Override @@ -2184,26 +2184,26 @@ public final class Automation { return builder; } /** - * Protobuf type {@code automation.DeviceRoleConfig} + * Protobuf type {@code ztp.DeviceRoleConfig} */ public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder implements - // @@protoc_insertion_point(builder_implements:automation.DeviceRoleConfig) - automation.Automation.DeviceRoleConfigOrBuilder { + // @@protoc_insertion_point(builder_implements:ztp.DeviceRoleConfig) + ztp.Ztp.DeviceRoleConfigOrBuilder { public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { - return automation.Automation.internal_static_automation_DeviceRoleConfig_descriptor; + return ztp.Ztp.internal_static_ztp_DeviceRoleConfig_descriptor; } @java.lang.Override protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable internalGetFieldAccessorTable() { - return automation.Automation.internal_static_automation_DeviceRoleConfig_fieldAccessorTable + return ztp.Ztp.internal_static_ztp_DeviceRoleConfig_fieldAccessorTable .ensureFieldAccessorsInitialized( - automation.Automation.DeviceRoleConfig.class, automation.Automation.DeviceRoleConfig.Builder.class); + ztp.Ztp.DeviceRoleConfig.class, ztp.Ztp.DeviceRoleConfig.Builder.class); } - // Construct using automation.Automation.DeviceRoleConfig.newBuilder() + // Construct using ztp.Ztp.DeviceRoleConfig.newBuilder() private Builder() { maybeForceBuilderInitialization(); } @@ -2239,17 +2239,17 @@ public final class Automation { @java.lang.Override public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { - return automation.Automation.internal_static_automation_DeviceRoleConfig_descriptor; + return ztp.Ztp.internal_static_ztp_DeviceRoleConfig_descriptor; } @java.lang.Override - public automation.Automation.DeviceRoleConfig getDefaultInstanceForType() { - return automation.Automation.DeviceRoleConfig.getDefaultInstance(); + public ztp.Ztp.DeviceRoleConfig getDefaultInstanceForType() { + return ztp.Ztp.DeviceRoleConfig.getDefaultInstance(); } @java.lang.Override - public automation.Automation.DeviceRoleConfig build() { - automation.Automation.DeviceRoleConfig result = buildPartial(); + public ztp.Ztp.DeviceRoleConfig build() { + ztp.Ztp.DeviceRoleConfig result = buildPartial(); if (!result.isInitialized()) { throw newUninitializedMessageException(result); } @@ -2257,8 +2257,8 @@ public final class Automation { } @java.lang.Override - public automation.Automation.DeviceRoleConfig buildPartial() { - automation.Automation.DeviceRoleConfig result = new automation.Automation.DeviceRoleConfig(this); + public ztp.Ztp.DeviceRoleConfig buildPartial() { + ztp.Ztp.DeviceRoleConfig result = new ztp.Ztp.DeviceRoleConfig(this); if (devRoleBuilder_ == null) { result.devRole_ = devRole_; } else { @@ -2307,16 +2307,16 @@ public final class Automation { } @java.lang.Override public Builder mergeFrom(com.google.protobuf.Message other) { - if (other instanceof automation.Automation.DeviceRoleConfig) { - return mergeFrom((automation.Automation.DeviceRoleConfig)other); + if (other instanceof ztp.Ztp.DeviceRoleConfig) { + return mergeFrom((ztp.Ztp.DeviceRoleConfig)other); } else { super.mergeFrom(other); return this; } } - public Builder mergeFrom(automation.Automation.DeviceRoleConfig other) { - if (other == automation.Automation.DeviceRoleConfig.getDefaultInstance()) return this; + public Builder mergeFrom(ztp.Ztp.DeviceRoleConfig other) { + if (other == ztp.Ztp.DeviceRoleConfig.getDefaultInstance()) return this; if (other.hasDevRole()) { mergeDevRole(other.getDevRole()); } @@ -2338,11 +2338,11 @@ public final class Automation { com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - automation.Automation.DeviceRoleConfig parsedMessage = null; + ztp.Ztp.DeviceRoleConfig parsedMessage = null; try { parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); } catch (com.google.protobuf.InvalidProtocolBufferException e) { - parsedMessage = (automation.Automation.DeviceRoleConfig) e.getUnfinishedMessage(); + parsedMessage = (ztp.Ztp.DeviceRoleConfig) e.getUnfinishedMessage(); throw e.unwrapIOException(); } finally { if (parsedMessage != null) { @@ -2352,31 +2352,31 @@ public final class Automation { return this; } - private automation.Automation.DeviceRole devRole_; + private ztp.Ztp.DeviceRole devRole_; private com.google.protobuf.SingleFieldBuilderV3< - automation.Automation.DeviceRole, automation.Automation.DeviceRole.Builder, automation.Automation.DeviceRoleOrBuilder> devRoleBuilder_; + ztp.Ztp.DeviceRole, ztp.Ztp.DeviceRole.Builder, ztp.Ztp.DeviceRoleOrBuilder> devRoleBuilder_; /** - * .automation.DeviceRole devRole = 1; + * .ztp.DeviceRole devRole = 1; * @return Whether the devRole field is set. */ public boolean hasDevRole() { return devRoleBuilder_ != null || devRole_ != null; } /** - * .automation.DeviceRole devRole = 1; + * .ztp.DeviceRole devRole = 1; * @return The devRole. */ - public automation.Automation.DeviceRole getDevRole() { + public ztp.Ztp.DeviceRole getDevRole() { if (devRoleBuilder_ == null) { - return devRole_ == null ? automation.Automation.DeviceRole.getDefaultInstance() : devRole_; + return devRole_ == null ? ztp.Ztp.DeviceRole.getDefaultInstance() : devRole_; } else { return devRoleBuilder_.getMessage(); } } /** - * .automation.DeviceRole devRole = 1; + * .ztp.DeviceRole devRole = 1; */ - public Builder setDevRole(automation.Automation.DeviceRole value) { + public Builder setDevRole(ztp.Ztp.DeviceRole value) { if (devRoleBuilder_ == null) { if (value == null) { throw new NullPointerException(); @@ -2390,10 +2390,10 @@ public final class Automation { return this; } /** - * .automation.DeviceRole devRole = 1; + * .ztp.DeviceRole devRole = 1; */ public Builder setDevRole( - automation.Automation.DeviceRole.Builder builderForValue) { + ztp.Ztp.DeviceRole.Builder builderForValue) { if (devRoleBuilder_ == null) { devRole_ = builderForValue.build(); onChanged(); @@ -2404,13 +2404,13 @@ public final class Automation { return this; } /** - * .automation.DeviceRole devRole = 1; + * .ztp.DeviceRole devRole = 1; */ - public Builder mergeDevRole(automation.Automation.DeviceRole value) { + public Builder mergeDevRole(ztp.Ztp.DeviceRole value) { if (devRoleBuilder_ == null) { if (devRole_ != null) { devRole_ = - automation.Automation.DeviceRole.newBuilder(devRole_).mergeFrom(value).buildPartial(); + ztp.Ztp.DeviceRole.newBuilder(devRole_).mergeFrom(value).buildPartial(); } else { devRole_ = value; } @@ -2422,7 +2422,7 @@ public final class Automation { return this; } /** - * .automation.DeviceRole devRole = 1; + * .ztp.DeviceRole devRole = 1; */ public Builder clearDevRole() { if (devRoleBuilder_ == null) { @@ -2436,33 +2436,33 @@ public final class Automation { return this; } /** - * .automation.DeviceRole devRole = 1; + * .ztp.DeviceRole devRole = 1; */ - public automation.Automation.DeviceRole.Builder getDevRoleBuilder() { + public ztp.Ztp.DeviceRole.Builder getDevRoleBuilder() { onChanged(); return getDevRoleFieldBuilder().getBuilder(); } /** - * .automation.DeviceRole devRole = 1; + * .ztp.DeviceRole devRole = 1; */ - public automation.Automation.DeviceRoleOrBuilder getDevRoleOrBuilder() { + public ztp.Ztp.DeviceRoleOrBuilder getDevRoleOrBuilder() { if (devRoleBuilder_ != null) { return devRoleBuilder_.getMessageOrBuilder(); } else { return devRole_ == null ? - automation.Automation.DeviceRole.getDefaultInstance() : devRole_; + ztp.Ztp.DeviceRole.getDefaultInstance() : devRole_; } } /** - * .automation.DeviceRole devRole = 1; + * .ztp.DeviceRole devRole = 1; */ private com.google.protobuf.SingleFieldBuilderV3< - automation.Automation.DeviceRole, automation.Automation.DeviceRole.Builder, automation.Automation.DeviceRoleOrBuilder> + ztp.Ztp.DeviceRole, ztp.Ztp.DeviceRole.Builder, ztp.Ztp.DeviceRoleOrBuilder> getDevRoleFieldBuilder() { if (devRoleBuilder_ == null) { devRoleBuilder_ = new com.google.protobuf.SingleFieldBuilderV3< - automation.Automation.DeviceRole, automation.Automation.DeviceRole.Builder, automation.Automation.DeviceRoleOrBuilder>( + ztp.Ztp.DeviceRole, ztp.Ztp.DeviceRole.Builder, ztp.Ztp.DeviceRoleOrBuilder>( getDevRole(), getParentForChildren(), isClean()); @@ -2602,16 +2602,16 @@ public final class Automation { } - // @@protoc_insertion_point(builder_scope:automation.DeviceRoleConfig) + // @@protoc_insertion_point(builder_scope:ztp.DeviceRoleConfig) } - // @@protoc_insertion_point(class_scope:automation.DeviceRoleConfig) - private static final automation.Automation.DeviceRoleConfig DEFAULT_INSTANCE; + // @@protoc_insertion_point(class_scope:ztp.DeviceRoleConfig) + private static final ztp.Ztp.DeviceRoleConfig DEFAULT_INSTANCE; static { - DEFAULT_INSTANCE = new automation.Automation.DeviceRoleConfig(); + DEFAULT_INSTANCE = new ztp.Ztp.DeviceRoleConfig(); } - public static automation.Automation.DeviceRoleConfig getDefaultInstance() { + public static ztp.Ztp.DeviceRoleConfig getDefaultInstance() { return DEFAULT_INSTANCE; } @@ -2636,46 +2636,46 @@ public final class Automation { } @java.lang.Override - public automation.Automation.DeviceRoleConfig getDefaultInstanceForType() { + public ztp.Ztp.DeviceRoleConfig getDefaultInstanceForType() { return DEFAULT_INSTANCE; } } public interface DeviceRoleListOrBuilder extends - // @@protoc_insertion_point(interface_extends:automation.DeviceRoleList) + // @@protoc_insertion_point(interface_extends:ztp.DeviceRoleList) com.google.protobuf.MessageOrBuilder { /** - * repeated .automation.DeviceRole devRole = 1; + * repeated .ztp.DeviceRole devRole = 1; */ - java.util.List + java.util.List getDevRoleList(); /** - * repeated .automation.DeviceRole devRole = 1; + * repeated .ztp.DeviceRole devRole = 1; */ - automation.Automation.DeviceRole getDevRole(int index); + ztp.Ztp.DeviceRole getDevRole(int index); /** - * repeated .automation.DeviceRole devRole = 1; + * repeated .ztp.DeviceRole devRole = 1; */ int getDevRoleCount(); /** - * repeated .automation.DeviceRole devRole = 1; + * repeated .ztp.DeviceRole devRole = 1; */ - java.util.List + java.util.List getDevRoleOrBuilderList(); /** - * repeated .automation.DeviceRole devRole = 1; + * repeated .ztp.DeviceRole devRole = 1; */ - automation.Automation.DeviceRoleOrBuilder getDevRoleOrBuilder( + ztp.Ztp.DeviceRoleOrBuilder getDevRoleOrBuilder( int index); } /** - * Protobuf type {@code automation.DeviceRoleList} + * Protobuf type {@code ztp.DeviceRoleList} */ public static final class DeviceRoleList extends com.google.protobuf.GeneratedMessageV3 implements - // @@protoc_insertion_point(message_implements:automation.DeviceRoleList) + // @@protoc_insertion_point(message_implements:ztp.DeviceRoleList) DeviceRoleListOrBuilder { private static final long serialVersionUID = 0L; // Use DeviceRoleList.newBuilder() to construct. @@ -2719,11 +2719,11 @@ public final class Automation { break; case 10: { if (!((mutable_bitField0_ & 0x00000001) != 0)) { - devRole_ = new java.util.ArrayList(); + devRole_ = new java.util.ArrayList(); mutable_bitField0_ |= 0x00000001; } devRole_.add( - input.readMessage(automation.Automation.DeviceRole.parser(), extensionRegistry)); + input.readMessage(ztp.Ztp.DeviceRole.parser(), extensionRegistry)); break; } default: { @@ -2750,53 +2750,53 @@ public final class Automation { } public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { - return automation.Automation.internal_static_automation_DeviceRoleList_descriptor; + return ztp.Ztp.internal_static_ztp_DeviceRoleList_descriptor; } @java.lang.Override protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable internalGetFieldAccessorTable() { - return automation.Automation.internal_static_automation_DeviceRoleList_fieldAccessorTable + return ztp.Ztp.internal_static_ztp_DeviceRoleList_fieldAccessorTable .ensureFieldAccessorsInitialized( - automation.Automation.DeviceRoleList.class, automation.Automation.DeviceRoleList.Builder.class); + ztp.Ztp.DeviceRoleList.class, ztp.Ztp.DeviceRoleList.Builder.class); } public static final int DEVROLE_FIELD_NUMBER = 1; - private java.util.List devRole_; + private java.util.List devRole_; /** - * repeated .automation.DeviceRole devRole = 1; + * repeated .ztp.DeviceRole devRole = 1; */ @java.lang.Override - public java.util.List getDevRoleList() { + public java.util.List getDevRoleList() { return devRole_; } /** - * repeated .automation.DeviceRole devRole = 1; + * repeated .ztp.DeviceRole devRole = 1; */ @java.lang.Override - public java.util.List + public java.util.List getDevRoleOrBuilderList() { return devRole_; } /** - * repeated .automation.DeviceRole devRole = 1; + * repeated .ztp.DeviceRole devRole = 1; */ @java.lang.Override public int getDevRoleCount() { return devRole_.size(); } /** - * repeated .automation.DeviceRole devRole = 1; + * repeated .ztp.DeviceRole devRole = 1; */ @java.lang.Override - public automation.Automation.DeviceRole getDevRole(int index) { + public ztp.Ztp.DeviceRole getDevRole(int index) { return devRole_.get(index); } /** - * repeated .automation.DeviceRole devRole = 1; + * repeated .ztp.DeviceRole devRole = 1; */ @java.lang.Override - public automation.Automation.DeviceRoleOrBuilder getDevRoleOrBuilder( + public ztp.Ztp.DeviceRoleOrBuilder getDevRoleOrBuilder( int index) { return devRole_.get(index); } @@ -2841,10 +2841,10 @@ public final class Automation { if (obj == this) { return true; } - if (!(obj instanceof automation.Automation.DeviceRoleList)) { + if (!(obj instanceof ztp.Ztp.DeviceRoleList)) { return super.equals(obj); } - automation.Automation.DeviceRoleList other = (automation.Automation.DeviceRoleList) obj; + ztp.Ztp.DeviceRoleList other = (ztp.Ztp.DeviceRoleList) obj; if (!getDevRoleList() .equals(other.getDevRoleList())) return false; @@ -2868,69 +2868,69 @@ public final class Automation { return hash; } - public static automation.Automation.DeviceRoleList parseFrom( + public static ztp.Ztp.DeviceRoleList parseFrom( java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data); } - public static automation.Automation.DeviceRoleList parseFrom( + public static ztp.Ztp.DeviceRoleList parseFrom( java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data, extensionRegistry); } - public static automation.Automation.DeviceRoleList parseFrom( + public static ztp.Ztp.DeviceRoleList parseFrom( com.google.protobuf.ByteString data) throws com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data); } - public static automation.Automation.DeviceRoleList parseFrom( + public static ztp.Ztp.DeviceRoleList parseFrom( com.google.protobuf.ByteString data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data, extensionRegistry); } - public static automation.Automation.DeviceRoleList parseFrom(byte[] data) + public static ztp.Ztp.DeviceRoleList parseFrom(byte[] data) throws com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data); } - public static automation.Automation.DeviceRoleList parseFrom( + public static ztp.Ztp.DeviceRoleList parseFrom( byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data, extensionRegistry); } - public static automation.Automation.DeviceRoleList parseFrom(java.io.InputStream input) + public static ztp.Ztp.DeviceRoleList parseFrom(java.io.InputStream input) throws java.io.IOException { return com.google.protobuf.GeneratedMessageV3 .parseWithIOException(PARSER, input); } - public static automation.Automation.DeviceRoleList parseFrom( + public static ztp.Ztp.DeviceRoleList parseFrom( java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { return com.google.protobuf.GeneratedMessageV3 .parseWithIOException(PARSER, input, extensionRegistry); } - public static automation.Automation.DeviceRoleList parseDelimitedFrom(java.io.InputStream input) + public static ztp.Ztp.DeviceRoleList parseDelimitedFrom(java.io.InputStream input) throws java.io.IOException { return com.google.protobuf.GeneratedMessageV3 .parseDelimitedWithIOException(PARSER, input); } - public static automation.Automation.DeviceRoleList parseDelimitedFrom( + public static ztp.Ztp.DeviceRoleList parseDelimitedFrom( java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { return com.google.protobuf.GeneratedMessageV3 .parseDelimitedWithIOException(PARSER, input, extensionRegistry); } - public static automation.Automation.DeviceRoleList parseFrom( + public static ztp.Ztp.DeviceRoleList parseFrom( com.google.protobuf.CodedInputStream input) throws java.io.IOException { return com.google.protobuf.GeneratedMessageV3 .parseWithIOException(PARSER, input); } - public static automation.Automation.DeviceRoleList parseFrom( + public static ztp.Ztp.DeviceRoleList parseFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { @@ -2943,7 +2943,7 @@ public final class Automation { public static Builder newBuilder() { return DEFAULT_INSTANCE.toBuilder(); } - public static Builder newBuilder(automation.Automation.DeviceRoleList prototype) { + public static Builder newBuilder(ztp.Ztp.DeviceRoleList prototype) { return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); } @java.lang.Override @@ -2959,26 +2959,26 @@ public final class Automation { return builder; } /** - * Protobuf type {@code automation.DeviceRoleList} + * Protobuf type {@code ztp.DeviceRoleList} */ public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder implements - // @@protoc_insertion_point(builder_implements:automation.DeviceRoleList) - automation.Automation.DeviceRoleListOrBuilder { + // @@protoc_insertion_point(builder_implements:ztp.DeviceRoleList) + ztp.Ztp.DeviceRoleListOrBuilder { public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { - return automation.Automation.internal_static_automation_DeviceRoleList_descriptor; + return ztp.Ztp.internal_static_ztp_DeviceRoleList_descriptor; } @java.lang.Override protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable internalGetFieldAccessorTable() { - return automation.Automation.internal_static_automation_DeviceRoleList_fieldAccessorTable + return ztp.Ztp.internal_static_ztp_DeviceRoleList_fieldAccessorTable .ensureFieldAccessorsInitialized( - automation.Automation.DeviceRoleList.class, automation.Automation.DeviceRoleList.Builder.class); + ztp.Ztp.DeviceRoleList.class, ztp.Ztp.DeviceRoleList.Builder.class); } - // Construct using automation.Automation.DeviceRoleList.newBuilder() + // Construct using ztp.Ztp.DeviceRoleList.newBuilder() private Builder() { maybeForceBuilderInitialization(); } @@ -3009,17 +3009,17 @@ public final class Automation { @java.lang.Override public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { - return automation.Automation.internal_static_automation_DeviceRoleList_descriptor; + return ztp.Ztp.internal_static_ztp_DeviceRoleList_descriptor; } @java.lang.Override - public automation.Automation.DeviceRoleList getDefaultInstanceForType() { - return automation.Automation.DeviceRoleList.getDefaultInstance(); + public ztp.Ztp.DeviceRoleList getDefaultInstanceForType() { + return ztp.Ztp.DeviceRoleList.getDefaultInstance(); } @java.lang.Override - public automation.Automation.DeviceRoleList build() { - automation.Automation.DeviceRoleList result = buildPartial(); + public ztp.Ztp.DeviceRoleList build() { + ztp.Ztp.DeviceRoleList result = buildPartial(); if (!result.isInitialized()) { throw newUninitializedMessageException(result); } @@ -3027,8 +3027,8 @@ public final class Automation { } @java.lang.Override - public automation.Automation.DeviceRoleList buildPartial() { - automation.Automation.DeviceRoleList result = new automation.Automation.DeviceRoleList(this); + public ztp.Ztp.DeviceRoleList buildPartial() { + ztp.Ztp.DeviceRoleList result = new ztp.Ztp.DeviceRoleList(this); int from_bitField0_ = bitField0_; if (devRoleBuilder_ == null) { if (((bitField0_ & 0x00000001) != 0)) { @@ -3077,16 +3077,16 @@ public final class Automation { } @java.lang.Override public Builder mergeFrom(com.google.protobuf.Message other) { - if (other instanceof automation.Automation.DeviceRoleList) { - return mergeFrom((automation.Automation.DeviceRoleList)other); + if (other instanceof ztp.Ztp.DeviceRoleList) { + return mergeFrom((ztp.Ztp.DeviceRoleList)other); } else { super.mergeFrom(other); return this; } } - public Builder mergeFrom(automation.Automation.DeviceRoleList other) { - if (other == automation.Automation.DeviceRoleList.getDefaultInstance()) return this; + public Builder mergeFrom(ztp.Ztp.DeviceRoleList other) { + if (other == ztp.Ztp.DeviceRoleList.getDefaultInstance()) return this; if (devRoleBuilder_ == null) { if (!other.devRole_.isEmpty()) { if (devRole_.isEmpty()) { @@ -3128,11 +3128,11 @@ public final class Automation { com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - automation.Automation.DeviceRoleList parsedMessage = null; + ztp.Ztp.DeviceRoleList parsedMessage = null; try { parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); } catch (com.google.protobuf.InvalidProtocolBufferException e) { - parsedMessage = (automation.Automation.DeviceRoleList) e.getUnfinishedMessage(); + parsedMessage = (ztp.Ztp.DeviceRoleList) e.getUnfinishedMessage(); throw e.unwrapIOException(); } finally { if (parsedMessage != null) { @@ -3143,22 +3143,22 @@ public final class Automation { } private int bitField0_; - private java.util.List devRole_ = + private java.util.List devRole_ = java.util.Collections.emptyList(); private void ensureDevRoleIsMutable() { if (!((bitField0_ & 0x00000001) != 0)) { - devRole_ = new java.util.ArrayList(devRole_); + devRole_ = new java.util.ArrayList(devRole_); bitField0_ |= 0x00000001; } } private com.google.protobuf.RepeatedFieldBuilderV3< - automation.Automation.DeviceRole, automation.Automation.DeviceRole.Builder, automation.Automation.DeviceRoleOrBuilder> devRoleBuilder_; + ztp.Ztp.DeviceRole, ztp.Ztp.DeviceRole.Builder, ztp.Ztp.DeviceRoleOrBuilder> devRoleBuilder_; /** - * repeated .automation.DeviceRole devRole = 1; + * repeated .ztp.DeviceRole devRole = 1; */ - public java.util.List getDevRoleList() { + public java.util.List getDevRoleList() { if (devRoleBuilder_ == null) { return java.util.Collections.unmodifiableList(devRole_); } else { @@ -3166,7 +3166,7 @@ public final class Automation { } } /** - * repeated .automation.DeviceRole devRole = 1; + * repeated .ztp.DeviceRole devRole = 1; */ public int getDevRoleCount() { if (devRoleBuilder_ == null) { @@ -3176,9 +3176,9 @@ public final class Automation { } } /** - * repeated .automation.DeviceRole devRole = 1; + * repeated .ztp.DeviceRole devRole = 1; */ - public automation.Automation.DeviceRole getDevRole(int index) { + public ztp.Ztp.DeviceRole getDevRole(int index) { if (devRoleBuilder_ == null) { return devRole_.get(index); } else { @@ -3186,10 +3186,10 @@ public final class Automation { } } /** - * repeated .automation.DeviceRole devRole = 1; + * repeated .ztp.DeviceRole devRole = 1; */ public Builder setDevRole( - int index, automation.Automation.DeviceRole value) { + int index, ztp.Ztp.DeviceRole value) { if (devRoleBuilder_ == null) { if (value == null) { throw new NullPointerException(); @@ -3203,10 +3203,10 @@ public final class Automation { return this; } /** - * repeated .automation.DeviceRole devRole = 1; + * repeated .ztp.DeviceRole devRole = 1; */ public Builder setDevRole( - int index, automation.Automation.DeviceRole.Builder builderForValue) { + int index, ztp.Ztp.DeviceRole.Builder builderForValue) { if (devRoleBuilder_ == null) { ensureDevRoleIsMutable(); devRole_.set(index, builderForValue.build()); @@ -3217,9 +3217,9 @@ public final class Automation { return this; } /** - * repeated .automation.DeviceRole devRole = 1; + * repeated .ztp.DeviceRole devRole = 1; */ - public Builder addDevRole(automation.Automation.DeviceRole value) { + public Builder addDevRole(ztp.Ztp.DeviceRole value) { if (devRoleBuilder_ == null) { if (value == null) { throw new NullPointerException(); @@ -3233,10 +3233,10 @@ public final class Automation { return this; } /** - * repeated .automation.DeviceRole devRole = 1; + * repeated .ztp.DeviceRole devRole = 1; */ public Builder addDevRole( - int index, automation.Automation.DeviceRole value) { + int index, ztp.Ztp.DeviceRole value) { if (devRoleBuilder_ == null) { if (value == null) { throw new NullPointerException(); @@ -3250,10 +3250,10 @@ public final class Automation { return this; } /** - * repeated .automation.DeviceRole devRole = 1; + * repeated .ztp.DeviceRole devRole = 1; */ public Builder addDevRole( - automation.Automation.DeviceRole.Builder builderForValue) { + ztp.Ztp.DeviceRole.Builder builderForValue) { if (devRoleBuilder_ == null) { ensureDevRoleIsMutable(); devRole_.add(builderForValue.build()); @@ -3264,10 +3264,10 @@ public final class Automation { return this; } /** - * repeated .automation.DeviceRole devRole = 1; + * repeated .ztp.DeviceRole devRole = 1; */ public Builder addDevRole( - int index, automation.Automation.DeviceRole.Builder builderForValue) { + int index, ztp.Ztp.DeviceRole.Builder builderForValue) { if (devRoleBuilder_ == null) { ensureDevRoleIsMutable(); devRole_.add(index, builderForValue.build()); @@ -3278,10 +3278,10 @@ public final class Automation { return this; } /** - * repeated .automation.DeviceRole devRole = 1; + * repeated .ztp.DeviceRole devRole = 1; */ public Builder addAllDevRole( - java.lang.Iterable values) { + java.lang.Iterable values) { if (devRoleBuilder_ == null) { ensureDevRoleIsMutable(); com.google.protobuf.AbstractMessageLite.Builder.addAll( @@ -3293,7 +3293,7 @@ public final class Automation { return this; } /** - * repeated .automation.DeviceRole devRole = 1; + * repeated .ztp.DeviceRole devRole = 1; */ public Builder clearDevRole() { if (devRoleBuilder_ == null) { @@ -3306,7 +3306,7 @@ public final class Automation { return this; } /** - * repeated .automation.DeviceRole devRole = 1; + * repeated .ztp.DeviceRole devRole = 1; */ public Builder removeDevRole(int index) { if (devRoleBuilder_ == null) { @@ -3319,16 +3319,16 @@ public final class Automation { return this; } /** - * repeated .automation.DeviceRole devRole = 1; + * repeated .ztp.DeviceRole devRole = 1; */ - public automation.Automation.DeviceRole.Builder getDevRoleBuilder( + public ztp.Ztp.DeviceRole.Builder getDevRoleBuilder( int index) { return getDevRoleFieldBuilder().getBuilder(index); } /** - * repeated .automation.DeviceRole devRole = 1; + * repeated .ztp.DeviceRole devRole = 1; */ - public automation.Automation.DeviceRoleOrBuilder getDevRoleOrBuilder( + public ztp.Ztp.DeviceRoleOrBuilder getDevRoleOrBuilder( int index) { if (devRoleBuilder_ == null) { return devRole_.get(index); } else { @@ -3336,9 +3336,9 @@ public final class Automation { } } /** - * repeated .automation.DeviceRole devRole = 1; + * repeated .ztp.DeviceRole devRole = 1; */ - public java.util.List + public java.util.List getDevRoleOrBuilderList() { if (devRoleBuilder_ != null) { return devRoleBuilder_.getMessageOrBuilderList(); @@ -3347,33 +3347,33 @@ public final class Automation { } } /** - * repeated .automation.DeviceRole devRole = 1; + * repeated .ztp.DeviceRole devRole = 1; */ - public automation.Automation.DeviceRole.Builder addDevRoleBuilder() { + public ztp.Ztp.DeviceRole.Builder addDevRoleBuilder() { return getDevRoleFieldBuilder().addBuilder( - automation.Automation.DeviceRole.getDefaultInstance()); + ztp.Ztp.DeviceRole.getDefaultInstance()); } /** - * repeated .automation.DeviceRole devRole = 1; + * repeated .ztp.DeviceRole devRole = 1; */ - public automation.Automation.DeviceRole.Builder addDevRoleBuilder( + public ztp.Ztp.DeviceRole.Builder addDevRoleBuilder( int index) { return getDevRoleFieldBuilder().addBuilder( - index, automation.Automation.DeviceRole.getDefaultInstance()); + index, ztp.Ztp.DeviceRole.getDefaultInstance()); } /** - * repeated .automation.DeviceRole devRole = 1; + * repeated .ztp.DeviceRole devRole = 1; */ - public java.util.List + public java.util.List getDevRoleBuilderList() { return getDevRoleFieldBuilder().getBuilderList(); } private com.google.protobuf.RepeatedFieldBuilderV3< - automation.Automation.DeviceRole, automation.Automation.DeviceRole.Builder, automation.Automation.DeviceRoleOrBuilder> + ztp.Ztp.DeviceRole, ztp.Ztp.DeviceRole.Builder, ztp.Ztp.DeviceRoleOrBuilder> getDevRoleFieldBuilder() { if (devRoleBuilder_ == null) { devRoleBuilder_ = new com.google.protobuf.RepeatedFieldBuilderV3< - automation.Automation.DeviceRole, automation.Automation.DeviceRole.Builder, automation.Automation.DeviceRoleOrBuilder>( + ztp.Ztp.DeviceRole, ztp.Ztp.DeviceRole.Builder, ztp.Ztp.DeviceRoleOrBuilder>( devRole_, ((bitField0_ & 0x00000001) != 0), getParentForChildren(), @@ -3395,16 +3395,16 @@ public final class Automation { } - // @@protoc_insertion_point(builder_scope:automation.DeviceRoleList) + // @@protoc_insertion_point(builder_scope:ztp.DeviceRoleList) } - // @@protoc_insertion_point(class_scope:automation.DeviceRoleList) - private static final automation.Automation.DeviceRoleList DEFAULT_INSTANCE; + // @@protoc_insertion_point(class_scope:ztp.DeviceRoleList) + private static final ztp.Ztp.DeviceRoleList DEFAULT_INSTANCE; static { - DEFAULT_INSTANCE = new automation.Automation.DeviceRoleList(); + DEFAULT_INSTANCE = new ztp.Ztp.DeviceRoleList(); } - public static automation.Automation.DeviceRoleList getDefaultInstance() { + public static ztp.Ztp.DeviceRoleList getDefaultInstance() { return DEFAULT_INSTANCE; } @@ -3429,48 +3429,48 @@ public final class Automation { } @java.lang.Override - public automation.Automation.DeviceRoleList getDefaultInstanceForType() { + public ztp.Ztp.DeviceRoleList getDefaultInstanceForType() { return DEFAULT_INSTANCE; } } public interface DeviceRoleStateOrBuilder extends - // @@protoc_insertion_point(interface_extends:automation.DeviceRoleState) + // @@protoc_insertion_point(interface_extends:ztp.DeviceRoleState) com.google.protobuf.MessageOrBuilder { /** - * .automation.DeviceRoleId devRoleId = 1; + * .ztp.DeviceRoleId devRoleId = 1; * @return Whether the devRoleId field is set. */ boolean hasDevRoleId(); /** - * .automation.DeviceRoleId devRoleId = 1; + * .ztp.DeviceRoleId devRoleId = 1; * @return The devRoleId. */ - automation.Automation.DeviceRoleId getDevRoleId(); + ztp.Ztp.DeviceRoleId getDevRoleId(); /** - * .automation.DeviceRoleId devRoleId = 1; + * .ztp.DeviceRoleId devRoleId = 1; */ - automation.Automation.DeviceRoleIdOrBuilder getDevRoleIdOrBuilder(); + ztp.Ztp.DeviceRoleIdOrBuilder getDevRoleIdOrBuilder(); /** - * .automation.ZtpDeviceState devRoleState = 2; + * .ztp.ZtpDeviceState devRoleState = 2; * @return The enum numeric value on the wire for devRoleState. */ int getDevRoleStateValue(); /** - * .automation.ZtpDeviceState devRoleState = 2; + * .ztp.ZtpDeviceState devRoleState = 2; * @return The devRoleState. */ - automation.Automation.ZtpDeviceState getDevRoleState(); + ztp.Ztp.ZtpDeviceState getDevRoleState(); } /** - * Protobuf type {@code automation.DeviceRoleState} + * Protobuf type {@code ztp.DeviceRoleState} */ public static final class DeviceRoleState extends com.google.protobuf.GeneratedMessageV3 implements - // @@protoc_insertion_point(message_implements:automation.DeviceRoleState) + // @@protoc_insertion_point(message_implements:ztp.DeviceRoleState) DeviceRoleStateOrBuilder { private static final long serialVersionUID = 0L; // Use DeviceRoleState.newBuilder() to construct. @@ -3512,11 +3512,11 @@ public final class Automation { done = true; break; case 10: { - automation.Automation.DeviceRoleId.Builder subBuilder = null; + ztp.Ztp.DeviceRoleId.Builder subBuilder = null; if (devRoleId_ != null) { subBuilder = devRoleId_.toBuilder(); } - devRoleId_ = input.readMessage(automation.Automation.DeviceRoleId.parser(), extensionRegistry); + devRoleId_ = input.readMessage(ztp.Ztp.DeviceRoleId.parser(), extensionRegistry); if (subBuilder != null) { subBuilder.mergeFrom(devRoleId_); devRoleId_ = subBuilder.buildPartial(); @@ -3551,21 +3551,21 @@ public final class Automation { } public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { - return automation.Automation.internal_static_automation_DeviceRoleState_descriptor; + return ztp.Ztp.internal_static_ztp_DeviceRoleState_descriptor; } @java.lang.Override protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable internalGetFieldAccessorTable() { - return automation.Automation.internal_static_automation_DeviceRoleState_fieldAccessorTable + return ztp.Ztp.internal_static_ztp_DeviceRoleState_fieldAccessorTable .ensureFieldAccessorsInitialized( - automation.Automation.DeviceRoleState.class, automation.Automation.DeviceRoleState.Builder.class); + ztp.Ztp.DeviceRoleState.class, ztp.Ztp.DeviceRoleState.Builder.class); } public static final int DEVROLEID_FIELD_NUMBER = 1; - private automation.Automation.DeviceRoleId devRoleId_; + private ztp.Ztp.DeviceRoleId devRoleId_; /** - * .automation.DeviceRoleId devRoleId = 1; + * .ztp.DeviceRoleId devRoleId = 1; * @return Whether the devRoleId field is set. */ @java.lang.Override @@ -3573,38 +3573,38 @@ public final class Automation { return devRoleId_ != null; } /** - * .automation.DeviceRoleId devRoleId = 1; + * .ztp.DeviceRoleId devRoleId = 1; * @return The devRoleId. */ @java.lang.Override - public automation.Automation.DeviceRoleId getDevRoleId() { - return devRoleId_ == null ? automation.Automation.DeviceRoleId.getDefaultInstance() : devRoleId_; + public ztp.Ztp.DeviceRoleId getDevRoleId() { + return devRoleId_ == null ? ztp.Ztp.DeviceRoleId.getDefaultInstance() : devRoleId_; } /** - * .automation.DeviceRoleId devRoleId = 1; + * .ztp.DeviceRoleId devRoleId = 1; */ @java.lang.Override - public automation.Automation.DeviceRoleIdOrBuilder getDevRoleIdOrBuilder() { + public ztp.Ztp.DeviceRoleIdOrBuilder getDevRoleIdOrBuilder() { return getDevRoleId(); } public static final int DEVROLESTATE_FIELD_NUMBER = 2; private int devRoleState_; /** - * .automation.ZtpDeviceState devRoleState = 2; + * .ztp.ZtpDeviceState devRoleState = 2; * @return The enum numeric value on the wire for devRoleState. */ @java.lang.Override public int getDevRoleStateValue() { return devRoleState_; } /** - * .automation.ZtpDeviceState devRoleState = 2; + * .ztp.ZtpDeviceState devRoleState = 2; * @return The devRoleState. */ - @java.lang.Override public automation.Automation.ZtpDeviceState getDevRoleState() { + @java.lang.Override public ztp.Ztp.ZtpDeviceState getDevRoleState() { @SuppressWarnings("deprecation") - automation.Automation.ZtpDeviceState result = automation.Automation.ZtpDeviceState.valueOf(devRoleState_); - return result == null ? automation.Automation.ZtpDeviceState.UNRECOGNIZED : result; + ztp.Ztp.ZtpDeviceState result = ztp.Ztp.ZtpDeviceState.valueOf(devRoleState_); + return result == null ? ztp.Ztp.ZtpDeviceState.UNRECOGNIZED : result; } private byte memoizedIsInitialized = -1; @@ -3624,7 +3624,7 @@ public final class Automation { if (devRoleId_ != null) { output.writeMessage(1, getDevRoleId()); } - if (devRoleState_ != automation.Automation.ZtpDeviceState.ZTP_DEV_STATE_UNDEFINED.getNumber()) { + if (devRoleState_ != ztp.Ztp.ZtpDeviceState.ZTP_DEV_STATE_UNDEFINED.getNumber()) { output.writeEnum(2, devRoleState_); } unknownFields.writeTo(output); @@ -3640,7 +3640,7 @@ public final class Automation { size += com.google.protobuf.CodedOutputStream .computeMessageSize(1, getDevRoleId()); } - if (devRoleState_ != automation.Automation.ZtpDeviceState.ZTP_DEV_STATE_UNDEFINED.getNumber()) { + if (devRoleState_ != ztp.Ztp.ZtpDeviceState.ZTP_DEV_STATE_UNDEFINED.getNumber()) { size += com.google.protobuf.CodedOutputStream .computeEnumSize(2, devRoleState_); } @@ -3654,10 +3654,10 @@ public final class Automation { if (obj == this) { return true; } - if (!(obj instanceof automation.Automation.DeviceRoleState)) { + if (!(obj instanceof ztp.Ztp.DeviceRoleState)) { return super.equals(obj); } - automation.Automation.DeviceRoleState other = (automation.Automation.DeviceRoleState) obj; + ztp.Ztp.DeviceRoleState other = (ztp.Ztp.DeviceRoleState) obj; if (hasDevRoleId() != other.hasDevRoleId()) return false; if (hasDevRoleId()) { @@ -3687,69 +3687,69 @@ public final class Automation { return hash; } - public static automation.Automation.DeviceRoleState parseFrom( + public static ztp.Ztp.DeviceRoleState parseFrom( java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data); } - public static automation.Automation.DeviceRoleState parseFrom( + public static ztp.Ztp.DeviceRoleState parseFrom( java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data, extensionRegistry); } - public static automation.Automation.DeviceRoleState parseFrom( + public static ztp.Ztp.DeviceRoleState parseFrom( com.google.protobuf.ByteString data) throws com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data); } - public static automation.Automation.DeviceRoleState parseFrom( + public static ztp.Ztp.DeviceRoleState parseFrom( com.google.protobuf.ByteString data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data, extensionRegistry); } - public static automation.Automation.DeviceRoleState parseFrom(byte[] data) + public static ztp.Ztp.DeviceRoleState parseFrom(byte[] data) throws com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data); } - public static automation.Automation.DeviceRoleState parseFrom( + public static ztp.Ztp.DeviceRoleState parseFrom( byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data, extensionRegistry); } - public static automation.Automation.DeviceRoleState parseFrom(java.io.InputStream input) + public static ztp.Ztp.DeviceRoleState parseFrom(java.io.InputStream input) throws java.io.IOException { return com.google.protobuf.GeneratedMessageV3 .parseWithIOException(PARSER, input); } - public static automation.Automation.DeviceRoleState parseFrom( + public static ztp.Ztp.DeviceRoleState parseFrom( java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { return com.google.protobuf.GeneratedMessageV3 .parseWithIOException(PARSER, input, extensionRegistry); } - public static automation.Automation.DeviceRoleState parseDelimitedFrom(java.io.InputStream input) + public static ztp.Ztp.DeviceRoleState parseDelimitedFrom(java.io.InputStream input) throws java.io.IOException { return com.google.protobuf.GeneratedMessageV3 .parseDelimitedWithIOException(PARSER, input); } - public static automation.Automation.DeviceRoleState parseDelimitedFrom( + public static ztp.Ztp.DeviceRoleState parseDelimitedFrom( java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { return com.google.protobuf.GeneratedMessageV3 .parseDelimitedWithIOException(PARSER, input, extensionRegistry); } - public static automation.Automation.DeviceRoleState parseFrom( + public static ztp.Ztp.DeviceRoleState parseFrom( com.google.protobuf.CodedInputStream input) throws java.io.IOException { return com.google.protobuf.GeneratedMessageV3 .parseWithIOException(PARSER, input); } - public static automation.Automation.DeviceRoleState parseFrom( + public static ztp.Ztp.DeviceRoleState parseFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { @@ -3762,7 +3762,7 @@ public final class Automation { public static Builder newBuilder() { return DEFAULT_INSTANCE.toBuilder(); } - public static Builder newBuilder(automation.Automation.DeviceRoleState prototype) { + public static Builder newBuilder(ztp.Ztp.DeviceRoleState prototype) { return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); } @java.lang.Override @@ -3778,26 +3778,26 @@ public final class Automation { return builder; } /** - * Protobuf type {@code automation.DeviceRoleState} + * Protobuf type {@code ztp.DeviceRoleState} */ public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder implements - // @@protoc_insertion_point(builder_implements:automation.DeviceRoleState) - automation.Automation.DeviceRoleStateOrBuilder { + // @@protoc_insertion_point(builder_implements:ztp.DeviceRoleState) + ztp.Ztp.DeviceRoleStateOrBuilder { public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { - return automation.Automation.internal_static_automation_DeviceRoleState_descriptor; + return ztp.Ztp.internal_static_ztp_DeviceRoleState_descriptor; } @java.lang.Override protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable internalGetFieldAccessorTable() { - return automation.Automation.internal_static_automation_DeviceRoleState_fieldAccessorTable + return ztp.Ztp.internal_static_ztp_DeviceRoleState_fieldAccessorTable .ensureFieldAccessorsInitialized( - automation.Automation.DeviceRoleState.class, automation.Automation.DeviceRoleState.Builder.class); + ztp.Ztp.DeviceRoleState.class, ztp.Ztp.DeviceRoleState.Builder.class); } - // Construct using automation.Automation.DeviceRoleState.newBuilder() + // Construct using ztp.Ztp.DeviceRoleState.newBuilder() private Builder() { maybeForceBuilderInitialization(); } @@ -3829,17 +3829,17 @@ public final class Automation { @java.lang.Override public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { - return automation.Automation.internal_static_automation_DeviceRoleState_descriptor; + return ztp.Ztp.internal_static_ztp_DeviceRoleState_descriptor; } @java.lang.Override - public automation.Automation.DeviceRoleState getDefaultInstanceForType() { - return automation.Automation.DeviceRoleState.getDefaultInstance(); + public ztp.Ztp.DeviceRoleState getDefaultInstanceForType() { + return ztp.Ztp.DeviceRoleState.getDefaultInstance(); } @java.lang.Override - public automation.Automation.DeviceRoleState build() { - automation.Automation.DeviceRoleState result = buildPartial(); + public ztp.Ztp.DeviceRoleState build() { + ztp.Ztp.DeviceRoleState result = buildPartial(); if (!result.isInitialized()) { throw newUninitializedMessageException(result); } @@ -3847,8 +3847,8 @@ public final class Automation { } @java.lang.Override - public automation.Automation.DeviceRoleState buildPartial() { - automation.Automation.DeviceRoleState result = new automation.Automation.DeviceRoleState(this); + public ztp.Ztp.DeviceRoleState buildPartial() { + ztp.Ztp.DeviceRoleState result = new ztp.Ztp.DeviceRoleState(this); if (devRoleIdBuilder_ == null) { result.devRoleId_ = devRoleId_; } else { @@ -3893,16 +3893,16 @@ public final class Automation { } @java.lang.Override public Builder mergeFrom(com.google.protobuf.Message other) { - if (other instanceof automation.Automation.DeviceRoleState) { - return mergeFrom((automation.Automation.DeviceRoleState)other); + if (other instanceof ztp.Ztp.DeviceRoleState) { + return mergeFrom((ztp.Ztp.DeviceRoleState)other); } else { super.mergeFrom(other); return this; } } - public Builder mergeFrom(automation.Automation.DeviceRoleState other) { - if (other == automation.Automation.DeviceRoleState.getDefaultInstance()) return this; + public Builder mergeFrom(ztp.Ztp.DeviceRoleState other) { + if (other == ztp.Ztp.DeviceRoleState.getDefaultInstance()) return this; if (other.hasDevRoleId()) { mergeDevRoleId(other.getDevRoleId()); } @@ -3924,11 +3924,11 @@ public final class Automation { com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - automation.Automation.DeviceRoleState parsedMessage = null; + ztp.Ztp.DeviceRoleState parsedMessage = null; try { parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); } catch (com.google.protobuf.InvalidProtocolBufferException e) { - parsedMessage = (automation.Automation.DeviceRoleState) e.getUnfinishedMessage(); + parsedMessage = (ztp.Ztp.DeviceRoleState) e.getUnfinishedMessage(); throw e.unwrapIOException(); } finally { if (parsedMessage != null) { @@ -3938,31 +3938,31 @@ public final class Automation { return this; } - private automation.Automation.DeviceRoleId devRoleId_; + private ztp.Ztp.DeviceRoleId devRoleId_; private com.google.protobuf.SingleFieldBuilderV3< - automation.Automation.DeviceRoleId, automation.Automation.DeviceRoleId.Builder, automation.Automation.DeviceRoleIdOrBuilder> devRoleIdBuilder_; + ztp.Ztp.DeviceRoleId, ztp.Ztp.DeviceRoleId.Builder, ztp.Ztp.DeviceRoleIdOrBuilder> devRoleIdBuilder_; /** - * .automation.DeviceRoleId devRoleId = 1; + * .ztp.DeviceRoleId devRoleId = 1; * @return Whether the devRoleId field is set. */ public boolean hasDevRoleId() { return devRoleIdBuilder_ != null || devRoleId_ != null; } /** - * .automation.DeviceRoleId devRoleId = 1; + * .ztp.DeviceRoleId devRoleId = 1; * @return The devRoleId. */ - public automation.Automation.DeviceRoleId getDevRoleId() { + public ztp.Ztp.DeviceRoleId getDevRoleId() { if (devRoleIdBuilder_ == null) { - return devRoleId_ == null ? automation.Automation.DeviceRoleId.getDefaultInstance() : devRoleId_; + return devRoleId_ == null ? ztp.Ztp.DeviceRoleId.getDefaultInstance() : devRoleId_; } else { return devRoleIdBuilder_.getMessage(); } } /** - * .automation.DeviceRoleId devRoleId = 1; + * .ztp.DeviceRoleId devRoleId = 1; */ - public Builder setDevRoleId(automation.Automation.DeviceRoleId value) { + public Builder setDevRoleId(ztp.Ztp.DeviceRoleId value) { if (devRoleIdBuilder_ == null) { if (value == null) { throw new NullPointerException(); @@ -3976,10 +3976,10 @@ public final class Automation { return this; } /** - * .automation.DeviceRoleId devRoleId = 1; + * .ztp.DeviceRoleId devRoleId = 1; */ public Builder setDevRoleId( - automation.Automation.DeviceRoleId.Builder builderForValue) { + ztp.Ztp.DeviceRoleId.Builder builderForValue) { if (devRoleIdBuilder_ == null) { devRoleId_ = builderForValue.build(); onChanged(); @@ -3990,13 +3990,13 @@ public final class Automation { return this; } /** - * .automation.DeviceRoleId devRoleId = 1; + * .ztp.DeviceRoleId devRoleId = 1; */ - public Builder mergeDevRoleId(automation.Automation.DeviceRoleId value) { + public Builder mergeDevRoleId(ztp.Ztp.DeviceRoleId value) { if (devRoleIdBuilder_ == null) { if (devRoleId_ != null) { devRoleId_ = - automation.Automation.DeviceRoleId.newBuilder(devRoleId_).mergeFrom(value).buildPartial(); + ztp.Ztp.DeviceRoleId.newBuilder(devRoleId_).mergeFrom(value).buildPartial(); } else { devRoleId_ = value; } @@ -4008,7 +4008,7 @@ public final class Automation { return this; } /** - * .automation.DeviceRoleId devRoleId = 1; + * .ztp.DeviceRoleId devRoleId = 1; */ public Builder clearDevRoleId() { if (devRoleIdBuilder_ == null) { @@ -4022,33 +4022,33 @@ public final class Automation { return this; } /** - * .automation.DeviceRoleId devRoleId = 1; + * .ztp.DeviceRoleId devRoleId = 1; */ - public automation.Automation.DeviceRoleId.Builder getDevRoleIdBuilder() { + public ztp.Ztp.DeviceRoleId.Builder getDevRoleIdBuilder() { onChanged(); return getDevRoleIdFieldBuilder().getBuilder(); } /** - * .automation.DeviceRoleId devRoleId = 1; + * .ztp.DeviceRoleId devRoleId = 1; */ - public automation.Automation.DeviceRoleIdOrBuilder getDevRoleIdOrBuilder() { + public ztp.Ztp.DeviceRoleIdOrBuilder getDevRoleIdOrBuilder() { if (devRoleIdBuilder_ != null) { return devRoleIdBuilder_.getMessageOrBuilder(); } else { return devRoleId_ == null ? - automation.Automation.DeviceRoleId.getDefaultInstance() : devRoleId_; + ztp.Ztp.DeviceRoleId.getDefaultInstance() : devRoleId_; } } /** - * .automation.DeviceRoleId devRoleId = 1; + * .ztp.DeviceRoleId devRoleId = 1; */ private com.google.protobuf.SingleFieldBuilderV3< - automation.Automation.DeviceRoleId, automation.Automation.DeviceRoleId.Builder, automation.Automation.DeviceRoleIdOrBuilder> + ztp.Ztp.DeviceRoleId, ztp.Ztp.DeviceRoleId.Builder, ztp.Ztp.DeviceRoleIdOrBuilder> getDevRoleIdFieldBuilder() { if (devRoleIdBuilder_ == null) { devRoleIdBuilder_ = new com.google.protobuf.SingleFieldBuilderV3< - automation.Automation.DeviceRoleId, automation.Automation.DeviceRoleId.Builder, automation.Automation.DeviceRoleIdOrBuilder>( + ztp.Ztp.DeviceRoleId, ztp.Ztp.DeviceRoleId.Builder, ztp.Ztp.DeviceRoleIdOrBuilder>( getDevRoleId(), getParentForChildren(), isClean()); @@ -4059,14 +4059,14 @@ public final class Automation { private int devRoleState_ = 0; /** - * .automation.ZtpDeviceState devRoleState = 2; + * .ztp.ZtpDeviceState devRoleState = 2; * @return The enum numeric value on the wire for devRoleState. */ @java.lang.Override public int getDevRoleStateValue() { return devRoleState_; } /** - * .automation.ZtpDeviceState devRoleState = 2; + * .ztp.ZtpDeviceState devRoleState = 2; * @param value The enum numeric value on the wire for devRoleState to set. * @return This builder for chaining. */ @@ -4077,21 +4077,21 @@ public final class Automation { return this; } /** - * .automation.ZtpDeviceState devRoleState = 2; + * .ztp.ZtpDeviceState devRoleState = 2; * @return The devRoleState. */ @java.lang.Override - public automation.Automation.ZtpDeviceState getDevRoleState() { + public ztp.Ztp.ZtpDeviceState getDevRoleState() { @SuppressWarnings("deprecation") - automation.Automation.ZtpDeviceState result = automation.Automation.ZtpDeviceState.valueOf(devRoleState_); - return result == null ? automation.Automation.ZtpDeviceState.UNRECOGNIZED : result; + ztp.Ztp.ZtpDeviceState result = ztp.Ztp.ZtpDeviceState.valueOf(devRoleState_); + return result == null ? ztp.Ztp.ZtpDeviceState.UNRECOGNIZED : result; } /** - * .automation.ZtpDeviceState devRoleState = 2; + * .ztp.ZtpDeviceState devRoleState = 2; * @param value The devRoleState to set. * @return This builder for chaining. */ - public Builder setDevRoleState(automation.Automation.ZtpDeviceState value) { + public Builder setDevRoleState(ztp.Ztp.ZtpDeviceState value) { if (value == null) { throw new NullPointerException(); } @@ -4101,7 +4101,7 @@ public final class Automation { return this; } /** - * .automation.ZtpDeviceState devRoleState = 2; + * .ztp.ZtpDeviceState devRoleState = 2; * @return This builder for chaining. */ public Builder clearDevRoleState() { @@ -4123,16 +4123,16 @@ public final class Automation { } - // @@protoc_insertion_point(builder_scope:automation.DeviceRoleState) + // @@protoc_insertion_point(builder_scope:ztp.DeviceRoleState) } - // @@protoc_insertion_point(class_scope:automation.DeviceRoleState) - private static final automation.Automation.DeviceRoleState DEFAULT_INSTANCE; + // @@protoc_insertion_point(class_scope:ztp.DeviceRoleState) + private static final ztp.Ztp.DeviceRoleState DEFAULT_INSTANCE; static { - DEFAULT_INSTANCE = new automation.Automation.DeviceRoleState(); + DEFAULT_INSTANCE = new ztp.Ztp.DeviceRoleState(); } - public static automation.Automation.DeviceRoleState getDefaultInstance() { + public static ztp.Ztp.DeviceRoleState getDefaultInstance() { return DEFAULT_INSTANCE; } @@ -4157,14 +4157,14 @@ public final class Automation { } @java.lang.Override - public automation.Automation.DeviceRoleState getDefaultInstanceForType() { + public ztp.Ztp.DeviceRoleState getDefaultInstanceForType() { return DEFAULT_INSTANCE; } } public interface DeviceDeletionResultOrBuilder extends - // @@protoc_insertion_point(interface_extends:automation.DeviceDeletionResult) + // @@protoc_insertion_point(interface_extends:ztp.DeviceDeletionResult) com.google.protobuf.MessageOrBuilder { /** @@ -4193,11 +4193,11 @@ public final class Automation { getDeletedBytes(int index); } /** - * Protobuf type {@code automation.DeviceDeletionResult} + * Protobuf type {@code ztp.DeviceDeletionResult} */ public static final class DeviceDeletionResult extends com.google.protobuf.GeneratedMessageV3 implements - // @@protoc_insertion_point(message_implements:automation.DeviceDeletionResult) + // @@protoc_insertion_point(message_implements:ztp.DeviceDeletionResult) DeviceDeletionResultOrBuilder { private static final long serialVersionUID = 0L; // Use DeviceDeletionResult.newBuilder() to construct. @@ -4272,15 +4272,15 @@ public final class Automation { } public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { - return automation.Automation.internal_static_automation_DeviceDeletionResult_descriptor; + return ztp.Ztp.internal_static_ztp_DeviceDeletionResult_descriptor; } @java.lang.Override protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable internalGetFieldAccessorTable() { - return automation.Automation.internal_static_automation_DeviceDeletionResult_fieldAccessorTable + return ztp.Ztp.internal_static_ztp_DeviceDeletionResult_fieldAccessorTable .ensureFieldAccessorsInitialized( - automation.Automation.DeviceDeletionResult.class, automation.Automation.DeviceDeletionResult.Builder.class); + ztp.Ztp.DeviceDeletionResult.class, ztp.Ztp.DeviceDeletionResult.Builder.class); } public static final int DELETED_FIELD_NUMBER = 1; @@ -4362,10 +4362,10 @@ public final class Automation { if (obj == this) { return true; } - if (!(obj instanceof automation.Automation.DeviceDeletionResult)) { + if (!(obj instanceof ztp.Ztp.DeviceDeletionResult)) { return super.equals(obj); } - automation.Automation.DeviceDeletionResult other = (automation.Automation.DeviceDeletionResult) obj; + ztp.Ztp.DeviceDeletionResult other = (ztp.Ztp.DeviceDeletionResult) obj; if (!getDeletedList() .equals(other.getDeletedList())) return false; @@ -4389,69 +4389,69 @@ public final class Automation { return hash; } - public static automation.Automation.DeviceDeletionResult parseFrom( + public static ztp.Ztp.DeviceDeletionResult parseFrom( java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data); } - public static automation.Automation.DeviceDeletionResult parseFrom( + public static ztp.Ztp.DeviceDeletionResult parseFrom( java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data, extensionRegistry); } - public static automation.Automation.DeviceDeletionResult parseFrom( + public static ztp.Ztp.DeviceDeletionResult parseFrom( com.google.protobuf.ByteString data) throws com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data); } - public static automation.Automation.DeviceDeletionResult parseFrom( + public static ztp.Ztp.DeviceDeletionResult parseFrom( com.google.protobuf.ByteString data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data, extensionRegistry); } - public static automation.Automation.DeviceDeletionResult parseFrom(byte[] data) + public static ztp.Ztp.DeviceDeletionResult parseFrom(byte[] data) throws com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data); } - public static automation.Automation.DeviceDeletionResult parseFrom( + public static ztp.Ztp.DeviceDeletionResult parseFrom( byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data, extensionRegistry); } - public static automation.Automation.DeviceDeletionResult parseFrom(java.io.InputStream input) + public static ztp.Ztp.DeviceDeletionResult parseFrom(java.io.InputStream input) throws java.io.IOException { return com.google.protobuf.GeneratedMessageV3 .parseWithIOException(PARSER, input); } - public static automation.Automation.DeviceDeletionResult parseFrom( + public static ztp.Ztp.DeviceDeletionResult parseFrom( java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { return com.google.protobuf.GeneratedMessageV3 .parseWithIOException(PARSER, input, extensionRegistry); } - public static automation.Automation.DeviceDeletionResult parseDelimitedFrom(java.io.InputStream input) + public static ztp.Ztp.DeviceDeletionResult parseDelimitedFrom(java.io.InputStream input) throws java.io.IOException { return com.google.protobuf.GeneratedMessageV3 .parseDelimitedWithIOException(PARSER, input); } - public static automation.Automation.DeviceDeletionResult parseDelimitedFrom( + public static ztp.Ztp.DeviceDeletionResult parseDelimitedFrom( java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { return com.google.protobuf.GeneratedMessageV3 .parseDelimitedWithIOException(PARSER, input, extensionRegistry); } - public static automation.Automation.DeviceDeletionResult parseFrom( + public static ztp.Ztp.DeviceDeletionResult parseFrom( com.google.protobuf.CodedInputStream input) throws java.io.IOException { return com.google.protobuf.GeneratedMessageV3 .parseWithIOException(PARSER, input); } - public static automation.Automation.DeviceDeletionResult parseFrom( + public static ztp.Ztp.DeviceDeletionResult parseFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { @@ -4464,7 +4464,7 @@ public final class Automation { public static Builder newBuilder() { return DEFAULT_INSTANCE.toBuilder(); } - public static Builder newBuilder(automation.Automation.DeviceDeletionResult prototype) { + public static Builder newBuilder(ztp.Ztp.DeviceDeletionResult prototype) { return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); } @java.lang.Override @@ -4480,26 +4480,26 @@ public final class Automation { return builder; } /** - * Protobuf type {@code automation.DeviceDeletionResult} + * Protobuf type {@code ztp.DeviceDeletionResult} */ public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder implements - // @@protoc_insertion_point(builder_implements:automation.DeviceDeletionResult) - automation.Automation.DeviceDeletionResultOrBuilder { + // @@protoc_insertion_point(builder_implements:ztp.DeviceDeletionResult) + ztp.Ztp.DeviceDeletionResultOrBuilder { public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { - return automation.Automation.internal_static_automation_DeviceDeletionResult_descriptor; + return ztp.Ztp.internal_static_ztp_DeviceDeletionResult_descriptor; } @java.lang.Override protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable internalGetFieldAccessorTable() { - return automation.Automation.internal_static_automation_DeviceDeletionResult_fieldAccessorTable + return ztp.Ztp.internal_static_ztp_DeviceDeletionResult_fieldAccessorTable .ensureFieldAccessorsInitialized( - automation.Automation.DeviceDeletionResult.class, automation.Automation.DeviceDeletionResult.Builder.class); + ztp.Ztp.DeviceDeletionResult.class, ztp.Ztp.DeviceDeletionResult.Builder.class); } - // Construct using automation.Automation.DeviceDeletionResult.newBuilder() + // Construct using ztp.Ztp.DeviceDeletionResult.newBuilder() private Builder() { maybeForceBuilderInitialization(); } @@ -4525,17 +4525,17 @@ public final class Automation { @java.lang.Override public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { - return automation.Automation.internal_static_automation_DeviceDeletionResult_descriptor; + return ztp.Ztp.internal_static_ztp_DeviceDeletionResult_descriptor; } @java.lang.Override - public automation.Automation.DeviceDeletionResult getDefaultInstanceForType() { - return automation.Automation.DeviceDeletionResult.getDefaultInstance(); + public ztp.Ztp.DeviceDeletionResult getDefaultInstanceForType() { + return ztp.Ztp.DeviceDeletionResult.getDefaultInstance(); } @java.lang.Override - public automation.Automation.DeviceDeletionResult build() { - automation.Automation.DeviceDeletionResult result = buildPartial(); + public ztp.Ztp.DeviceDeletionResult build() { + ztp.Ztp.DeviceDeletionResult result = buildPartial(); if (!result.isInitialized()) { throw newUninitializedMessageException(result); } @@ -4543,8 +4543,8 @@ public final class Automation { } @java.lang.Override - public automation.Automation.DeviceDeletionResult buildPartial() { - automation.Automation.DeviceDeletionResult result = new automation.Automation.DeviceDeletionResult(this); + public ztp.Ztp.DeviceDeletionResult buildPartial() { + ztp.Ztp.DeviceDeletionResult result = new ztp.Ztp.DeviceDeletionResult(this); int from_bitField0_ = bitField0_; if (((bitField0_ & 0x00000001) != 0)) { deleted_ = deleted_.getUnmodifiableView(); @@ -4589,16 +4589,16 @@ public final class Automation { } @java.lang.Override public Builder mergeFrom(com.google.protobuf.Message other) { - if (other instanceof automation.Automation.DeviceDeletionResult) { - return mergeFrom((automation.Automation.DeviceDeletionResult)other); + if (other instanceof ztp.Ztp.DeviceDeletionResult) { + return mergeFrom((ztp.Ztp.DeviceDeletionResult)other); } else { super.mergeFrom(other); return this; } } - public Builder mergeFrom(automation.Automation.DeviceDeletionResult other) { - if (other == automation.Automation.DeviceDeletionResult.getDefaultInstance()) return this; + public Builder mergeFrom(ztp.Ztp.DeviceDeletionResult other) { + if (other == ztp.Ztp.DeviceDeletionResult.getDefaultInstance()) return this; if (!other.deleted_.isEmpty()) { if (deleted_.isEmpty()) { deleted_ = other.deleted_; @@ -4624,11 +4624,11 @@ public final class Automation { com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - automation.Automation.DeviceDeletionResult parsedMessage = null; + ztp.Ztp.DeviceDeletionResult parsedMessage = null; try { parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); } catch (com.google.protobuf.InvalidProtocolBufferException e) { - parsedMessage = (automation.Automation.DeviceDeletionResult) e.getUnfinishedMessage(); + parsedMessage = (ztp.Ztp.DeviceDeletionResult) e.getUnfinishedMessage(); throw e.unwrapIOException(); } finally { if (parsedMessage != null) { @@ -4761,16 +4761,16 @@ public final class Automation { } - // @@protoc_insertion_point(builder_scope:automation.DeviceDeletionResult) + // @@protoc_insertion_point(builder_scope:ztp.DeviceDeletionResult) } - // @@protoc_insertion_point(class_scope:automation.DeviceDeletionResult) - private static final automation.Automation.DeviceDeletionResult DEFAULT_INSTANCE; + // @@protoc_insertion_point(class_scope:ztp.DeviceDeletionResult) + private static final ztp.Ztp.DeviceDeletionResult DEFAULT_INSTANCE; static { - DEFAULT_INSTANCE = new automation.Automation.DeviceDeletionResult(); + DEFAULT_INSTANCE = new ztp.Ztp.DeviceDeletionResult(); } - public static automation.Automation.DeviceDeletionResult getDefaultInstance() { + public static ztp.Ztp.DeviceDeletionResult getDefaultInstance() { return DEFAULT_INSTANCE; } @@ -4795,42 +4795,42 @@ public final class Automation { } @java.lang.Override - public automation.Automation.DeviceDeletionResult getDefaultInstanceForType() { + public ztp.Ztp.DeviceDeletionResult getDefaultInstanceForType() { return DEFAULT_INSTANCE; } } private static final com.google.protobuf.Descriptors.Descriptor - internal_static_automation_DeviceRoleId_descriptor; + internal_static_ztp_DeviceRoleId_descriptor; private static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internal_static_automation_DeviceRoleId_fieldAccessorTable; + internal_static_ztp_DeviceRoleId_fieldAccessorTable; private static final com.google.protobuf.Descriptors.Descriptor - internal_static_automation_DeviceRole_descriptor; + internal_static_ztp_DeviceRole_descriptor; private static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internal_static_automation_DeviceRole_fieldAccessorTable; + internal_static_ztp_DeviceRole_fieldAccessorTable; private static final com.google.protobuf.Descriptors.Descriptor - internal_static_automation_DeviceRoleConfig_descriptor; + internal_static_ztp_DeviceRoleConfig_descriptor; private static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internal_static_automation_DeviceRoleConfig_fieldAccessorTable; + internal_static_ztp_DeviceRoleConfig_fieldAccessorTable; private static final com.google.protobuf.Descriptors.Descriptor - internal_static_automation_DeviceRoleList_descriptor; + internal_static_ztp_DeviceRoleList_descriptor; private static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internal_static_automation_DeviceRoleList_fieldAccessorTable; + internal_static_ztp_DeviceRoleList_fieldAccessorTable; private static final com.google.protobuf.Descriptors.Descriptor - internal_static_automation_DeviceRoleState_descriptor; + internal_static_ztp_DeviceRoleState_descriptor; private static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internal_static_automation_DeviceRoleState_fieldAccessorTable; + internal_static_ztp_DeviceRoleState_fieldAccessorTable; private static final com.google.protobuf.Descriptors.Descriptor - internal_static_automation_DeviceDeletionResult_descriptor; + internal_static_ztp_DeviceDeletionResult_descriptor; private static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internal_static_automation_DeviceDeletionResult_fieldAccessorTable; + internal_static_ztp_DeviceDeletionResult_fieldAccessorTable; public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { @@ -4840,78 +4840,74 @@ public final class Automation { descriptor; static { java.lang.String[] descriptorData = { - "\n\020automation.proto\022\nautomation\032\rcontext." + - "proto\"R\n\014DeviceRoleId\022 \n\tdevRoleId\030\001 \001(\013" + - "2\r.context.Uuid\022 \n\005devId\030\002 \001(\0132\021.context" + - ".DeviceId\"j\n\nDeviceRole\022+\n\tdevRoleId\030\001 \001" + - "(\0132\030.automation.DeviceRoleId\022/\n\013devRoleT" + - "ype\030\002 \001(\0162\032.automation.DeviceRoleType\"e\n" + - "\020DeviceRoleConfig\022\'\n\007devRole\030\001 \001(\0132\026.aut" + - "omation.DeviceRole\022(\n\tdevConfig\030\002 \001(\0132\025." + - "context.DeviceConfig\"9\n\016DeviceRoleList\022\'" + - "\n\007devRole\030\001 \003(\0132\026.automation.DeviceRole\"" + - "p\n\017DeviceRoleState\022+\n\tdevRoleId\030\001 \001(\0132\030." + - "automation.DeviceRoleId\0220\n\014devRoleState\030" + - "\002 \001(\0162\032.automation.ZtpDeviceState\"\'\n\024Dev" + - "iceDeletionResult\022\017\n\007deleted\030\001 \003(\t*H\n\016De" + - "viceRoleType\022\010\n\004NONE\020\000\022\013\n\007DEV_OPS\020\001\022\014\n\010D" + - "EV_CONF\020\002\022\021\n\rPIPELINE_CONF\020\003*~\n\016ZtpDevic" + - "eState\022\033\n\027ZTP_DEV_STATE_UNDEFINED\020\000\022\031\n\025Z" + - "TP_DEV_STATE_CREATED\020\001\022\031\n\025ZTP_DEV_STATE_" + - "UPDATED\020\002\022\031\n\025ZTP_DEV_STATE_DELETED\020\0032\276\003\n" + - "\021AutomationService\022F\n\020ZtpGetDeviceRole\022\030" + - ".automation.DeviceRoleId\032\026.automation.De" + - "viceRole\"\000\022N\n\033ZtpGetDeviceRolesByDeviceI" + - "d\022\021.context.DeviceId\032\032.automation.Device" + - "RoleList\"\000\022?\n\006ZtpAdd\022\026.automation.Device" + - "Role\032\033.automation.DeviceRoleState\"\000\022H\n\tZ" + - "tpUpdate\022\034.automation.DeviceRoleConfig\032\033" + - ".automation.DeviceRoleState\"\000\022B\n\tZtpDele" + - "te\022\026.automation.DeviceRole\032\033.automation." + - "DeviceRoleState\"\000\022B\n\014ZtpDeleteAll\022\016.cont" + - "ext.Empty\032 .automation.DeviceDeletionRes" + - "ult\"\000b\006proto3" + "\n\tztp.proto\022\003ztp\032\rcontext.proto\"R\n\014Devic" + + "eRoleId\022 \n\tdevRoleId\030\001 \001(\0132\r.context.Uui" + + "d\022 \n\005devId\030\002 \001(\0132\021.context.DeviceId\"\\\n\nD" + + "eviceRole\022$\n\tdevRoleId\030\001 \001(\0132\021.ztp.Devic" + + "eRoleId\022(\n\013devRoleType\030\002 \001(\0162\023.ztp.Devic" + + "eRoleType\"^\n\020DeviceRoleConfig\022 \n\007devRole" + + "\030\001 \001(\0132\017.ztp.DeviceRole\022(\n\tdevConfig\030\002 \001" + + "(\0132\025.context.DeviceConfig\"2\n\016DeviceRoleL" + + "ist\022 \n\007devRole\030\001 \003(\0132\017.ztp.DeviceRole\"b\n" + + "\017DeviceRoleState\022$\n\tdevRoleId\030\001 \001(\0132\021.zt" + + "p.DeviceRoleId\022)\n\014devRoleState\030\002 \001(\0162\023.z" + + "tp.ZtpDeviceState\"\'\n\024DeviceDeletionResul" + + "t\022\017\n\007deleted\030\001 \003(\t*H\n\016DeviceRoleType\022\010\n\004" + + "NONE\020\000\022\013\n\007DEV_OPS\020\001\022\014\n\010DEV_CONF\020\002\022\021\n\rPIP" + + "ELINE_CONF\020\003*~\n\016ZtpDeviceState\022\033\n\027ZTP_DE" + + "V_STATE_UNDEFINED\020\000\022\031\n\025ZTP_DEV_STATE_CRE" + + "ATED\020\001\022\031\n\025ZTP_DEV_STATE_UPDATED\020\002\022\031\n\025ZTP" + + "_DEV_STATE_DELETED\020\0032\361\002\n\nZtpService\0228\n\020Z" + + "tpGetDeviceRole\022\021.ztp.DeviceRoleId\032\017.ztp" + + ".DeviceRole\"\000\022G\n\033ZtpGetDeviceRolesByDevi" + + "ceId\022\021.context.DeviceId\032\023.ztp.DeviceRole" + + "List\"\000\0221\n\006ZtpAdd\022\017.ztp.DeviceRole\032\024.ztp." + + "DeviceRoleState\"\000\022:\n\tZtpUpdate\022\025.ztp.Dev" + + "iceRoleConfig\032\024.ztp.DeviceRoleState\"\000\0224\n" + + "\tZtpDelete\022\017.ztp.DeviceRole\032\024.ztp.Device" + + "RoleState\"\000\022;\n\014ZtpDeleteAll\022\016.context.Em" + + "pty\032\031.ztp.DeviceDeletionResult\"\000b\006proto3" }; descriptor = com.google.protobuf.Descriptors.FileDescriptor .internalBuildGeneratedFileFrom(descriptorData, new com.google.protobuf.Descriptors.FileDescriptor[] { context.ContextOuterClass.getDescriptor(), }); - internal_static_automation_DeviceRoleId_descriptor = + internal_static_ztp_DeviceRoleId_descriptor = getDescriptor().getMessageTypes().get(0); - internal_static_automation_DeviceRoleId_fieldAccessorTable = new + internal_static_ztp_DeviceRoleId_fieldAccessorTable = new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( - internal_static_automation_DeviceRoleId_descriptor, + internal_static_ztp_DeviceRoleId_descriptor, new java.lang.String[] { "DevRoleId", "DevId", }); - internal_static_automation_DeviceRole_descriptor = + internal_static_ztp_DeviceRole_descriptor = getDescriptor().getMessageTypes().get(1); - internal_static_automation_DeviceRole_fieldAccessorTable = new + internal_static_ztp_DeviceRole_fieldAccessorTable = new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( - internal_static_automation_DeviceRole_descriptor, + internal_static_ztp_DeviceRole_descriptor, new java.lang.String[] { "DevRoleId", "DevRoleType", }); - internal_static_automation_DeviceRoleConfig_descriptor = + internal_static_ztp_DeviceRoleConfig_descriptor = getDescriptor().getMessageTypes().get(2); - internal_static_automation_DeviceRoleConfig_fieldAccessorTable = new + internal_static_ztp_DeviceRoleConfig_fieldAccessorTable = new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( - internal_static_automation_DeviceRoleConfig_descriptor, + internal_static_ztp_DeviceRoleConfig_descriptor, new java.lang.String[] { "DevRole", "DevConfig", }); - internal_static_automation_DeviceRoleList_descriptor = + internal_static_ztp_DeviceRoleList_descriptor = getDescriptor().getMessageTypes().get(3); - internal_static_automation_DeviceRoleList_fieldAccessorTable = new + internal_static_ztp_DeviceRoleList_fieldAccessorTable = new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( - internal_static_automation_DeviceRoleList_descriptor, + internal_static_ztp_DeviceRoleList_descriptor, new java.lang.String[] { "DevRole", }); - internal_static_automation_DeviceRoleState_descriptor = + internal_static_ztp_DeviceRoleState_descriptor = getDescriptor().getMessageTypes().get(4); - internal_static_automation_DeviceRoleState_fieldAccessorTable = new + internal_static_ztp_DeviceRoleState_fieldAccessorTable = new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( - internal_static_automation_DeviceRoleState_descriptor, + internal_static_ztp_DeviceRoleState_descriptor, new java.lang.String[] { "DevRoleId", "DevRoleState", }); - internal_static_automation_DeviceDeletionResult_descriptor = + internal_static_ztp_DeviceDeletionResult_descriptor = getDescriptor().getMessageTypes().get(5); - internal_static_automation_DeviceDeletionResult_fieldAccessorTable = new + internal_static_ztp_DeviceDeletionResult_fieldAccessorTable = new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( - internal_static_automation_DeviceDeletionResult_descriptor, + internal_static_ztp_DeviceDeletionResult_descriptor, new java.lang.String[] { "Deleted", }); context.ContextOuterClass.getDescriptor(); } diff --git a/src/ztp/target/generated-sources/grpc/ztp/ZtpService.java b/src/ztp/target/generated-sources/grpc/ztp/ZtpService.java new file mode 100644 index 0000000000000000000000000000000000000000..6afcf457f919db71fa465a903a7afc52900c2ad0 --- /dev/null +++ b/src/ztp/target/generated-sources/grpc/ztp/ZtpService.java @@ -0,0 +1,26 @@ +package ztp; + +import io.quarkus.grpc.runtime.MutinyService; + +@javax.annotation.Generated( +value = "by Mutiny Grpc generator", +comments = "Source: ztp.proto") +public interface ZtpService extends MutinyService { + + + io.smallrye.mutiny.Uni ztpGetDeviceRole(ztp.Ztp.DeviceRoleId request); + + io.smallrye.mutiny.Uni ztpGetDeviceRolesByDeviceId(context.ContextOuterClass.DeviceId request); + + io.smallrye.mutiny.Uni ztpAdd(ztp.Ztp.DeviceRole request); + + io.smallrye.mutiny.Uni ztpUpdate(ztp.Ztp.DeviceRoleConfig request); + + io.smallrye.mutiny.Uni ztpDelete(ztp.Ztp.DeviceRole request); + + io.smallrye.mutiny.Uni ztpDeleteAll(context.ContextOuterClass.Empty request); + + + + +} \ No newline at end of file diff --git a/src/automation/target/generated-sources/grpc/automation/AutomationServiceBean.java b/src/ztp/target/generated-sources/grpc/ztp/ZtpServiceBean.java similarity index 58% rename from src/automation/target/generated-sources/grpc/automation/AutomationServiceBean.java rename to src/ztp/target/generated-sources/grpc/ztp/ZtpServiceBean.java index 3c7923a0ce8a1501689d1bb567c915590376cf5f..bc15903127c9ee837e991f9b75a389b684ec568c 100644 --- a/src/automation/target/generated-sources/grpc/automation/AutomationServiceBean.java +++ b/src/ztp/target/generated-sources/grpc/ztp/ZtpServiceBean.java @@ -1,4 +1,4 @@ -package automation; +package ztp; import io.grpc.BindableService; import io.quarkus.grpc.GrpcService; @@ -6,17 +6,17 @@ import io.quarkus.grpc.runtime.MutinyBean; @javax.annotation.Generated( value = "by Mutiny Grpc generator", -comments = "Source: automation.proto") -public class AutomationServiceBean extends MutinyAutomationServiceGrpc.AutomationServiceImplBase implements BindableService, MutinyBean { +comments = "Source: ztp.proto") +public class ZtpServiceBean extends MutinyZtpServiceGrpc.ZtpServiceImplBase implements BindableService, MutinyBean { - private final AutomationService delegate; + private final ZtpService delegate; - AutomationServiceBean(@GrpcService AutomationService delegate) { + ZtpServiceBean(@GrpcService ZtpService delegate) { this.delegate = delegate; } @Override - public io.smallrye.mutiny.Uni ztpGetDeviceRole(automation.Automation.DeviceRoleId request) { + public io.smallrye.mutiny.Uni ztpGetDeviceRole(ztp.Ztp.DeviceRoleId request) { try { return delegate.ztpGetDeviceRole(request); } catch (UnsupportedOperationException e) { @@ -24,7 +24,7 @@ public class AutomationServiceBean extends MutinyAutomationServiceGrpc.Automatio } } @Override - public io.smallrye.mutiny.Uni ztpGetDeviceRolesByDeviceId(context.ContextOuterClass.DeviceId request) { + public io.smallrye.mutiny.Uni ztpGetDeviceRolesByDeviceId(context.ContextOuterClass.DeviceId request) { try { return delegate.ztpGetDeviceRolesByDeviceId(request); } catch (UnsupportedOperationException e) { @@ -32,7 +32,7 @@ public class AutomationServiceBean extends MutinyAutomationServiceGrpc.Automatio } } @Override - public io.smallrye.mutiny.Uni ztpAdd(automation.Automation.DeviceRole request) { + public io.smallrye.mutiny.Uni ztpAdd(ztp.Ztp.DeviceRole request) { try { return delegate.ztpAdd(request); } catch (UnsupportedOperationException e) { @@ -40,7 +40,7 @@ public class AutomationServiceBean extends MutinyAutomationServiceGrpc.Automatio } } @Override - public io.smallrye.mutiny.Uni ztpUpdate(automation.Automation.DeviceRoleConfig request) { + public io.smallrye.mutiny.Uni ztpUpdate(ztp.Ztp.DeviceRoleConfig request) { try { return delegate.ztpUpdate(request); } catch (UnsupportedOperationException e) { @@ -48,7 +48,7 @@ public class AutomationServiceBean extends MutinyAutomationServiceGrpc.Automatio } } @Override - public io.smallrye.mutiny.Uni ztpDelete(automation.Automation.DeviceRole request) { + public io.smallrye.mutiny.Uni ztpDelete(ztp.Ztp.DeviceRole request) { try { return delegate.ztpDelete(request); } catch (UnsupportedOperationException e) { @@ -56,7 +56,7 @@ public class AutomationServiceBean extends MutinyAutomationServiceGrpc.Automatio } } @Override - public io.smallrye.mutiny.Uni ztpDeleteAll(context.ContextOuterClass.Empty request) { + public io.smallrye.mutiny.Uni ztpDeleteAll(context.ContextOuterClass.Empty request) { try { return delegate.ztpDeleteAll(request); } catch (UnsupportedOperationException e) { diff --git a/src/ztp/target/generated-sources/grpc/ztp/ZtpServiceClient.java b/src/ztp/target/generated-sources/grpc/ztp/ZtpServiceClient.java new file mode 100644 index 0000000000000000000000000000000000000000..00abbc181d46f0df5588023c8da29786a73ae965 --- /dev/null +++ b/src/ztp/target/generated-sources/grpc/ztp/ZtpServiceClient.java @@ -0,0 +1,48 @@ +package ztp; + +import java.util.function.BiFunction; + +import io.quarkus.grpc.runtime.MutinyClient; + +@javax.annotation.Generated( +value = "by Mutiny Grpc generator", +comments = "Source: ztp.proto") +public class ZtpServiceClient implements ZtpService, MutinyClient { + + private final MutinyZtpServiceGrpc.MutinyZtpServiceStub stub; + + public ZtpServiceClient(String name, io.grpc.Channel channel, BiFunction stubConfigurator) { + this.stub = stubConfigurator.apply(name,MutinyZtpServiceGrpc.newMutinyStub(channel)); + } + + @Override + public MutinyZtpServiceGrpc.MutinyZtpServiceStub getStub() { + return stub; + } + + @Override + public io.smallrye.mutiny.Uni ztpGetDeviceRole(ztp.Ztp.DeviceRoleId request) { + return stub.ztpGetDeviceRole(request); + } + @Override + public io.smallrye.mutiny.Uni ztpGetDeviceRolesByDeviceId(context.ContextOuterClass.DeviceId request) { + return stub.ztpGetDeviceRolesByDeviceId(request); + } + @Override + public io.smallrye.mutiny.Uni ztpAdd(ztp.Ztp.DeviceRole request) { + return stub.ztpAdd(request); + } + @Override + public io.smallrye.mutiny.Uni ztpUpdate(ztp.Ztp.DeviceRoleConfig request) { + return stub.ztpUpdate(request); + } + @Override + public io.smallrye.mutiny.Uni ztpDelete(ztp.Ztp.DeviceRole request) { + return stub.ztpDelete(request); + } + @Override + public io.smallrye.mutiny.Uni ztpDeleteAll(context.ContextOuterClass.Empty request) { + return stub.ztpDeleteAll(request); + } + +} \ No newline at end of file diff --git a/src/ztp/target/generated-sources/grpc/ztp/ZtpServiceGrpc.java b/src/ztp/target/generated-sources/grpc/ztp/ZtpServiceGrpc.java new file mode 100644 index 0000000000000000000000000000000000000000..ece33078b8058c2d63ddca4060b1b095d21dd8be --- /dev/null +++ b/src/ztp/target/generated-sources/grpc/ztp/ZtpServiceGrpc.java @@ -0,0 +1,645 @@ +package ztp; + +import static io.grpc.MethodDescriptor.generateFullMethodName; + +/** + */ +@javax.annotation.Generated( + value = "by gRPC proto compiler (version 1.38.1)", + comments = "Source: ztp.proto") +public final class ZtpServiceGrpc { + + private ZtpServiceGrpc() {} + + public static final String SERVICE_NAME = "ztp.ZtpService"; + + // Static method descriptors that strictly reflect the proto. + private static volatile io.grpc.MethodDescriptor getZtpGetDeviceRoleMethod; + + @io.grpc.stub.annotations.RpcMethod( + fullMethodName = SERVICE_NAME + '/' + "ZtpGetDeviceRole", + requestType = ztp.Ztp.DeviceRoleId.class, + responseType = ztp.Ztp.DeviceRole.class, + methodType = io.grpc.MethodDescriptor.MethodType.UNARY) + public static io.grpc.MethodDescriptor getZtpGetDeviceRoleMethod() { + io.grpc.MethodDescriptor getZtpGetDeviceRoleMethod; + if ((getZtpGetDeviceRoleMethod = ZtpServiceGrpc.getZtpGetDeviceRoleMethod) == null) { + synchronized (ZtpServiceGrpc.class) { + if ((getZtpGetDeviceRoleMethod = ZtpServiceGrpc.getZtpGetDeviceRoleMethod) == null) { + ZtpServiceGrpc.getZtpGetDeviceRoleMethod = getZtpGetDeviceRoleMethod = + io.grpc.MethodDescriptor.newBuilder() + .setType(io.grpc.MethodDescriptor.MethodType.UNARY) + .setFullMethodName(generateFullMethodName(SERVICE_NAME, "ZtpGetDeviceRole")) + .setSampledToLocalTracing(true) + .setRequestMarshaller(io.grpc.protobuf.ProtoUtils.marshaller( + ztp.Ztp.DeviceRoleId.getDefaultInstance())) + .setResponseMarshaller(io.grpc.protobuf.ProtoUtils.marshaller( + ztp.Ztp.DeviceRole.getDefaultInstance())) + .setSchemaDescriptor(new ZtpServiceMethodDescriptorSupplier("ZtpGetDeviceRole")) + .build(); + } + } + } + return getZtpGetDeviceRoleMethod; + } + + private static volatile io.grpc.MethodDescriptor getZtpGetDeviceRolesByDeviceIdMethod; + + @io.grpc.stub.annotations.RpcMethod( + fullMethodName = SERVICE_NAME + '/' + "ZtpGetDeviceRolesByDeviceId", + requestType = context.ContextOuterClass.DeviceId.class, + responseType = ztp.Ztp.DeviceRoleList.class, + methodType = io.grpc.MethodDescriptor.MethodType.UNARY) + public static io.grpc.MethodDescriptor getZtpGetDeviceRolesByDeviceIdMethod() { + io.grpc.MethodDescriptor getZtpGetDeviceRolesByDeviceIdMethod; + if ((getZtpGetDeviceRolesByDeviceIdMethod = ZtpServiceGrpc.getZtpGetDeviceRolesByDeviceIdMethod) == null) { + synchronized (ZtpServiceGrpc.class) { + if ((getZtpGetDeviceRolesByDeviceIdMethod = ZtpServiceGrpc.getZtpGetDeviceRolesByDeviceIdMethod) == null) { + ZtpServiceGrpc.getZtpGetDeviceRolesByDeviceIdMethod = getZtpGetDeviceRolesByDeviceIdMethod = + io.grpc.MethodDescriptor.newBuilder() + .setType(io.grpc.MethodDescriptor.MethodType.UNARY) + .setFullMethodName(generateFullMethodName(SERVICE_NAME, "ZtpGetDeviceRolesByDeviceId")) + .setSampledToLocalTracing(true) + .setRequestMarshaller(io.grpc.protobuf.ProtoUtils.marshaller( + context.ContextOuterClass.DeviceId.getDefaultInstance())) + .setResponseMarshaller(io.grpc.protobuf.ProtoUtils.marshaller( + ztp.Ztp.DeviceRoleList.getDefaultInstance())) + .setSchemaDescriptor(new ZtpServiceMethodDescriptorSupplier("ZtpGetDeviceRolesByDeviceId")) + .build(); + } + } + } + return getZtpGetDeviceRolesByDeviceIdMethod; + } + + private static volatile io.grpc.MethodDescriptor getZtpAddMethod; + + @io.grpc.stub.annotations.RpcMethod( + fullMethodName = SERVICE_NAME + '/' + "ZtpAdd", + requestType = ztp.Ztp.DeviceRole.class, + responseType = ztp.Ztp.DeviceRoleState.class, + methodType = io.grpc.MethodDescriptor.MethodType.UNARY) + public static io.grpc.MethodDescriptor getZtpAddMethod() { + io.grpc.MethodDescriptor getZtpAddMethod; + if ((getZtpAddMethod = ZtpServiceGrpc.getZtpAddMethod) == null) { + synchronized (ZtpServiceGrpc.class) { + if ((getZtpAddMethod = ZtpServiceGrpc.getZtpAddMethod) == null) { + ZtpServiceGrpc.getZtpAddMethod = getZtpAddMethod = + io.grpc.MethodDescriptor.newBuilder() + .setType(io.grpc.MethodDescriptor.MethodType.UNARY) + .setFullMethodName(generateFullMethodName(SERVICE_NAME, "ZtpAdd")) + .setSampledToLocalTracing(true) + .setRequestMarshaller(io.grpc.protobuf.ProtoUtils.marshaller( + ztp.Ztp.DeviceRole.getDefaultInstance())) + .setResponseMarshaller(io.grpc.protobuf.ProtoUtils.marshaller( + ztp.Ztp.DeviceRoleState.getDefaultInstance())) + .setSchemaDescriptor(new ZtpServiceMethodDescriptorSupplier("ZtpAdd")) + .build(); + } + } + } + return getZtpAddMethod; + } + + private static volatile io.grpc.MethodDescriptor getZtpUpdateMethod; + + @io.grpc.stub.annotations.RpcMethod( + fullMethodName = SERVICE_NAME + '/' + "ZtpUpdate", + requestType = ztp.Ztp.DeviceRoleConfig.class, + responseType = ztp.Ztp.DeviceRoleState.class, + methodType = io.grpc.MethodDescriptor.MethodType.UNARY) + public static io.grpc.MethodDescriptor getZtpUpdateMethod() { + io.grpc.MethodDescriptor getZtpUpdateMethod; + if ((getZtpUpdateMethod = ZtpServiceGrpc.getZtpUpdateMethod) == null) { + synchronized (ZtpServiceGrpc.class) { + if ((getZtpUpdateMethod = ZtpServiceGrpc.getZtpUpdateMethod) == null) { + ZtpServiceGrpc.getZtpUpdateMethod = getZtpUpdateMethod = + io.grpc.MethodDescriptor.newBuilder() + .setType(io.grpc.MethodDescriptor.MethodType.UNARY) + .setFullMethodName(generateFullMethodName(SERVICE_NAME, "ZtpUpdate")) + .setSampledToLocalTracing(true) + .setRequestMarshaller(io.grpc.protobuf.ProtoUtils.marshaller( + ztp.Ztp.DeviceRoleConfig.getDefaultInstance())) + .setResponseMarshaller(io.grpc.protobuf.ProtoUtils.marshaller( + ztp.Ztp.DeviceRoleState.getDefaultInstance())) + .setSchemaDescriptor(new ZtpServiceMethodDescriptorSupplier("ZtpUpdate")) + .build(); + } + } + } + return getZtpUpdateMethod; + } + + private static volatile io.grpc.MethodDescriptor getZtpDeleteMethod; + + @io.grpc.stub.annotations.RpcMethod( + fullMethodName = SERVICE_NAME + '/' + "ZtpDelete", + requestType = ztp.Ztp.DeviceRole.class, + responseType = ztp.Ztp.DeviceRoleState.class, + methodType = io.grpc.MethodDescriptor.MethodType.UNARY) + public static io.grpc.MethodDescriptor getZtpDeleteMethod() { + io.grpc.MethodDescriptor getZtpDeleteMethod; + if ((getZtpDeleteMethod = ZtpServiceGrpc.getZtpDeleteMethod) == null) { + synchronized (ZtpServiceGrpc.class) { + if ((getZtpDeleteMethod = ZtpServiceGrpc.getZtpDeleteMethod) == null) { + ZtpServiceGrpc.getZtpDeleteMethod = getZtpDeleteMethod = + io.grpc.MethodDescriptor.newBuilder() + .setType(io.grpc.MethodDescriptor.MethodType.UNARY) + .setFullMethodName(generateFullMethodName(SERVICE_NAME, "ZtpDelete")) + .setSampledToLocalTracing(true) + .setRequestMarshaller(io.grpc.protobuf.ProtoUtils.marshaller( + ztp.Ztp.DeviceRole.getDefaultInstance())) + .setResponseMarshaller(io.grpc.protobuf.ProtoUtils.marshaller( + ztp.Ztp.DeviceRoleState.getDefaultInstance())) + .setSchemaDescriptor(new ZtpServiceMethodDescriptorSupplier("ZtpDelete")) + .build(); + } + } + } + return getZtpDeleteMethod; + } + + private static volatile io.grpc.MethodDescriptor getZtpDeleteAllMethod; + + @io.grpc.stub.annotations.RpcMethod( + fullMethodName = SERVICE_NAME + '/' + "ZtpDeleteAll", + requestType = context.ContextOuterClass.Empty.class, + responseType = ztp.Ztp.DeviceDeletionResult.class, + methodType = io.grpc.MethodDescriptor.MethodType.UNARY) + public static io.grpc.MethodDescriptor getZtpDeleteAllMethod() { + io.grpc.MethodDescriptor getZtpDeleteAllMethod; + if ((getZtpDeleteAllMethod = ZtpServiceGrpc.getZtpDeleteAllMethod) == null) { + synchronized (ZtpServiceGrpc.class) { + if ((getZtpDeleteAllMethod = ZtpServiceGrpc.getZtpDeleteAllMethod) == null) { + ZtpServiceGrpc.getZtpDeleteAllMethod = getZtpDeleteAllMethod = + io.grpc.MethodDescriptor.newBuilder() + .setType(io.grpc.MethodDescriptor.MethodType.UNARY) + .setFullMethodName(generateFullMethodName(SERVICE_NAME, "ZtpDeleteAll")) + .setSampledToLocalTracing(true) + .setRequestMarshaller(io.grpc.protobuf.ProtoUtils.marshaller( + context.ContextOuterClass.Empty.getDefaultInstance())) + .setResponseMarshaller(io.grpc.protobuf.ProtoUtils.marshaller( + ztp.Ztp.DeviceDeletionResult.getDefaultInstance())) + .setSchemaDescriptor(new ZtpServiceMethodDescriptorSupplier("ZtpDeleteAll")) + .build(); + } + } + } + return getZtpDeleteAllMethod; + } + + /** + * Creates a new async stub that supports all call types for the service + */ + public static ZtpServiceStub newStub(io.grpc.Channel channel) { + io.grpc.stub.AbstractStub.StubFactory factory = + new io.grpc.stub.AbstractStub.StubFactory() { + @java.lang.Override + public ZtpServiceStub newStub(io.grpc.Channel channel, io.grpc.CallOptions callOptions) { + return new ZtpServiceStub(channel, callOptions); + } + }; + return ZtpServiceStub.newStub(factory, channel); + } + + /** + * Creates a new blocking-style stub that supports unary and streaming output calls on the service + */ + public static ZtpServiceBlockingStub newBlockingStub( + io.grpc.Channel channel) { + io.grpc.stub.AbstractStub.StubFactory factory = + new io.grpc.stub.AbstractStub.StubFactory() { + @java.lang.Override + public ZtpServiceBlockingStub newStub(io.grpc.Channel channel, io.grpc.CallOptions callOptions) { + return new ZtpServiceBlockingStub(channel, callOptions); + } + }; + return ZtpServiceBlockingStub.newStub(factory, channel); + } + + /** + * Creates a new ListenableFuture-style stub that supports unary calls on the service + */ + public static ZtpServiceFutureStub newFutureStub( + io.grpc.Channel channel) { + io.grpc.stub.AbstractStub.StubFactory factory = + new io.grpc.stub.AbstractStub.StubFactory() { + @java.lang.Override + public ZtpServiceFutureStub newStub(io.grpc.Channel channel, io.grpc.CallOptions callOptions) { + return new ZtpServiceFutureStub(channel, callOptions); + } + }; + return ZtpServiceFutureStub.newStub(factory, channel); + } + + /** + */ + public static abstract class ZtpServiceImplBase implements io.grpc.BindableService { + + /** + */ + public void ztpGetDeviceRole(ztp.Ztp.DeviceRoleId request, + io.grpc.stub.StreamObserver responseObserver) { + io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall(getZtpGetDeviceRoleMethod(), responseObserver); + } + + /** + */ + public void ztpGetDeviceRolesByDeviceId(context.ContextOuterClass.DeviceId request, + io.grpc.stub.StreamObserver responseObserver) { + io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall(getZtpGetDeviceRolesByDeviceIdMethod(), responseObserver); + } + + /** + */ + public void ztpAdd(ztp.Ztp.DeviceRole request, + io.grpc.stub.StreamObserver responseObserver) { + io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall(getZtpAddMethod(), responseObserver); + } + + /** + */ + public void ztpUpdate(ztp.Ztp.DeviceRoleConfig request, + io.grpc.stub.StreamObserver responseObserver) { + io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall(getZtpUpdateMethod(), responseObserver); + } + + /** + */ + public void ztpDelete(ztp.Ztp.DeviceRole request, + io.grpc.stub.StreamObserver responseObserver) { + io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall(getZtpDeleteMethod(), responseObserver); + } + + /** + */ + public void ztpDeleteAll(context.ContextOuterClass.Empty request, + io.grpc.stub.StreamObserver responseObserver) { + io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall(getZtpDeleteAllMethod(), responseObserver); + } + + @java.lang.Override public final io.grpc.ServerServiceDefinition bindService() { + return io.grpc.ServerServiceDefinition.builder(getServiceDescriptor()) + .addMethod( + getZtpGetDeviceRoleMethod(), + io.grpc.stub.ServerCalls.asyncUnaryCall( + new MethodHandlers< + ztp.Ztp.DeviceRoleId, + ztp.Ztp.DeviceRole>( + this, METHODID_ZTP_GET_DEVICE_ROLE))) + .addMethod( + getZtpGetDeviceRolesByDeviceIdMethod(), + io.grpc.stub.ServerCalls.asyncUnaryCall( + new MethodHandlers< + context.ContextOuterClass.DeviceId, + ztp.Ztp.DeviceRoleList>( + this, METHODID_ZTP_GET_DEVICE_ROLES_BY_DEVICE_ID))) + .addMethod( + getZtpAddMethod(), + io.grpc.stub.ServerCalls.asyncUnaryCall( + new MethodHandlers< + ztp.Ztp.DeviceRole, + ztp.Ztp.DeviceRoleState>( + this, METHODID_ZTP_ADD))) + .addMethod( + getZtpUpdateMethod(), + io.grpc.stub.ServerCalls.asyncUnaryCall( + new MethodHandlers< + ztp.Ztp.DeviceRoleConfig, + ztp.Ztp.DeviceRoleState>( + this, METHODID_ZTP_UPDATE))) + .addMethod( + getZtpDeleteMethod(), + io.grpc.stub.ServerCalls.asyncUnaryCall( + new MethodHandlers< + ztp.Ztp.DeviceRole, + ztp.Ztp.DeviceRoleState>( + this, METHODID_ZTP_DELETE))) + .addMethod( + getZtpDeleteAllMethod(), + io.grpc.stub.ServerCalls.asyncUnaryCall( + new MethodHandlers< + context.ContextOuterClass.Empty, + ztp.Ztp.DeviceDeletionResult>( + this, METHODID_ZTP_DELETE_ALL))) + .build(); + } + } + + /** + */ + public static final class ZtpServiceStub extends io.grpc.stub.AbstractAsyncStub { + private ZtpServiceStub( + io.grpc.Channel channel, io.grpc.CallOptions callOptions) { + super(channel, callOptions); + } + + @java.lang.Override + protected ZtpServiceStub build( + io.grpc.Channel channel, io.grpc.CallOptions callOptions) { + return new ZtpServiceStub(channel, callOptions); + } + + /** + */ + public void ztpGetDeviceRole(ztp.Ztp.DeviceRoleId request, + io.grpc.stub.StreamObserver responseObserver) { + io.grpc.stub.ClientCalls.asyncUnaryCall( + getChannel().newCall(getZtpGetDeviceRoleMethod(), getCallOptions()), request, responseObserver); + } + + /** + */ + public void ztpGetDeviceRolesByDeviceId(context.ContextOuterClass.DeviceId request, + io.grpc.stub.StreamObserver responseObserver) { + io.grpc.stub.ClientCalls.asyncUnaryCall( + getChannel().newCall(getZtpGetDeviceRolesByDeviceIdMethod(), getCallOptions()), request, responseObserver); + } + + /** + */ + public void ztpAdd(ztp.Ztp.DeviceRole request, + io.grpc.stub.StreamObserver responseObserver) { + io.grpc.stub.ClientCalls.asyncUnaryCall( + getChannel().newCall(getZtpAddMethod(), getCallOptions()), request, responseObserver); + } + + /** + */ + public void ztpUpdate(ztp.Ztp.DeviceRoleConfig request, + io.grpc.stub.StreamObserver responseObserver) { + io.grpc.stub.ClientCalls.asyncUnaryCall( + getChannel().newCall(getZtpUpdateMethod(), getCallOptions()), request, responseObserver); + } + + /** + */ + public void ztpDelete(ztp.Ztp.DeviceRole request, + io.grpc.stub.StreamObserver responseObserver) { + io.grpc.stub.ClientCalls.asyncUnaryCall( + getChannel().newCall(getZtpDeleteMethod(), getCallOptions()), request, responseObserver); + } + + /** + */ + public void ztpDeleteAll(context.ContextOuterClass.Empty request, + io.grpc.stub.StreamObserver responseObserver) { + io.grpc.stub.ClientCalls.asyncUnaryCall( + getChannel().newCall(getZtpDeleteAllMethod(), getCallOptions()), request, responseObserver); + } + } + + /** + */ + public static final class ZtpServiceBlockingStub extends io.grpc.stub.AbstractBlockingStub { + private ZtpServiceBlockingStub( + io.grpc.Channel channel, io.grpc.CallOptions callOptions) { + super(channel, callOptions); + } + + @java.lang.Override + protected ZtpServiceBlockingStub build( + io.grpc.Channel channel, io.grpc.CallOptions callOptions) { + return new ZtpServiceBlockingStub(channel, callOptions); + } + + /** + */ + public ztp.Ztp.DeviceRole ztpGetDeviceRole(ztp.Ztp.DeviceRoleId request) { + return io.grpc.stub.ClientCalls.blockingUnaryCall( + getChannel(), getZtpGetDeviceRoleMethod(), getCallOptions(), request); + } + + /** + */ + public ztp.Ztp.DeviceRoleList ztpGetDeviceRolesByDeviceId(context.ContextOuterClass.DeviceId request) { + return io.grpc.stub.ClientCalls.blockingUnaryCall( + getChannel(), getZtpGetDeviceRolesByDeviceIdMethod(), getCallOptions(), request); + } + + /** + */ + public ztp.Ztp.DeviceRoleState ztpAdd(ztp.Ztp.DeviceRole request) { + return io.grpc.stub.ClientCalls.blockingUnaryCall( + getChannel(), getZtpAddMethod(), getCallOptions(), request); + } + + /** + */ + public ztp.Ztp.DeviceRoleState ztpUpdate(ztp.Ztp.DeviceRoleConfig request) { + return io.grpc.stub.ClientCalls.blockingUnaryCall( + getChannel(), getZtpUpdateMethod(), getCallOptions(), request); + } + + /** + */ + public ztp.Ztp.DeviceRoleState ztpDelete(ztp.Ztp.DeviceRole request) { + return io.grpc.stub.ClientCalls.blockingUnaryCall( + getChannel(), getZtpDeleteMethod(), getCallOptions(), request); + } + + /** + */ + public ztp.Ztp.DeviceDeletionResult ztpDeleteAll(context.ContextOuterClass.Empty request) { + return io.grpc.stub.ClientCalls.blockingUnaryCall( + getChannel(), getZtpDeleteAllMethod(), getCallOptions(), request); + } + } + + /** + */ + public static final class ZtpServiceFutureStub extends io.grpc.stub.AbstractFutureStub { + private ZtpServiceFutureStub( + io.grpc.Channel channel, io.grpc.CallOptions callOptions) { + super(channel, callOptions); + } + + @java.lang.Override + protected ZtpServiceFutureStub build( + io.grpc.Channel channel, io.grpc.CallOptions callOptions) { + return new ZtpServiceFutureStub(channel, callOptions); + } + + /** + */ + public com.google.common.util.concurrent.ListenableFuture ztpGetDeviceRole( + ztp.Ztp.DeviceRoleId request) { + return io.grpc.stub.ClientCalls.futureUnaryCall( + getChannel().newCall(getZtpGetDeviceRoleMethod(), getCallOptions()), request); + } + + /** + */ + public com.google.common.util.concurrent.ListenableFuture ztpGetDeviceRolesByDeviceId( + context.ContextOuterClass.DeviceId request) { + return io.grpc.stub.ClientCalls.futureUnaryCall( + getChannel().newCall(getZtpGetDeviceRolesByDeviceIdMethod(), getCallOptions()), request); + } + + /** + */ + public com.google.common.util.concurrent.ListenableFuture ztpAdd( + ztp.Ztp.DeviceRole request) { + return io.grpc.stub.ClientCalls.futureUnaryCall( + getChannel().newCall(getZtpAddMethod(), getCallOptions()), request); + } + + /** + */ + public com.google.common.util.concurrent.ListenableFuture ztpUpdate( + ztp.Ztp.DeviceRoleConfig request) { + return io.grpc.stub.ClientCalls.futureUnaryCall( + getChannel().newCall(getZtpUpdateMethod(), getCallOptions()), request); + } + + /** + */ + public com.google.common.util.concurrent.ListenableFuture ztpDelete( + ztp.Ztp.DeviceRole request) { + return io.grpc.stub.ClientCalls.futureUnaryCall( + getChannel().newCall(getZtpDeleteMethod(), getCallOptions()), request); + } + + /** + */ + public com.google.common.util.concurrent.ListenableFuture ztpDeleteAll( + context.ContextOuterClass.Empty request) { + return io.grpc.stub.ClientCalls.futureUnaryCall( + getChannel().newCall(getZtpDeleteAllMethod(), getCallOptions()), request); + } + } + + private static final int METHODID_ZTP_GET_DEVICE_ROLE = 0; + private static final int METHODID_ZTP_GET_DEVICE_ROLES_BY_DEVICE_ID = 1; + private static final int METHODID_ZTP_ADD = 2; + private static final int METHODID_ZTP_UPDATE = 3; + private static final int METHODID_ZTP_DELETE = 4; + private static final int METHODID_ZTP_DELETE_ALL = 5; + + private static final class MethodHandlers implements + io.grpc.stub.ServerCalls.UnaryMethod, + io.grpc.stub.ServerCalls.ServerStreamingMethod, + io.grpc.stub.ServerCalls.ClientStreamingMethod, + io.grpc.stub.ServerCalls.BidiStreamingMethod { + private final ZtpServiceImplBase serviceImpl; + private final int methodId; + + MethodHandlers(ZtpServiceImplBase serviceImpl, int methodId) { + this.serviceImpl = serviceImpl; + this.methodId = methodId; + } + + @java.lang.Override + @java.lang.SuppressWarnings("unchecked") + public void invoke(Req request, io.grpc.stub.StreamObserver responseObserver) { + switch (methodId) { + case METHODID_ZTP_GET_DEVICE_ROLE: + serviceImpl.ztpGetDeviceRole((ztp.Ztp.DeviceRoleId) request, + (io.grpc.stub.StreamObserver) responseObserver); + break; + case METHODID_ZTP_GET_DEVICE_ROLES_BY_DEVICE_ID: + serviceImpl.ztpGetDeviceRolesByDeviceId((context.ContextOuterClass.DeviceId) request, + (io.grpc.stub.StreamObserver) responseObserver); + break; + case METHODID_ZTP_ADD: + serviceImpl.ztpAdd((ztp.Ztp.DeviceRole) request, + (io.grpc.stub.StreamObserver) responseObserver); + break; + case METHODID_ZTP_UPDATE: + serviceImpl.ztpUpdate((ztp.Ztp.DeviceRoleConfig) request, + (io.grpc.stub.StreamObserver) responseObserver); + break; + case METHODID_ZTP_DELETE: + serviceImpl.ztpDelete((ztp.Ztp.DeviceRole) request, + (io.grpc.stub.StreamObserver) responseObserver); + break; + case METHODID_ZTP_DELETE_ALL: + serviceImpl.ztpDeleteAll((context.ContextOuterClass.Empty) request, + (io.grpc.stub.StreamObserver) responseObserver); + break; + default: + throw new AssertionError(); + } + } + + @java.lang.Override + @java.lang.SuppressWarnings("unchecked") + public io.grpc.stub.StreamObserver invoke( + io.grpc.stub.StreamObserver responseObserver) { + switch (methodId) { + default: + throw new AssertionError(); + } + } + } + + private static abstract class ZtpServiceBaseDescriptorSupplier + implements io.grpc.protobuf.ProtoFileDescriptorSupplier, io.grpc.protobuf.ProtoServiceDescriptorSupplier { + ZtpServiceBaseDescriptorSupplier() {} + + @java.lang.Override + public com.google.protobuf.Descriptors.FileDescriptor getFileDescriptor() { + return ztp.Ztp.getDescriptor(); + } + + @java.lang.Override + public com.google.protobuf.Descriptors.ServiceDescriptor getServiceDescriptor() { + return getFileDescriptor().findServiceByName("ZtpService"); + } + } + + private static final class ZtpServiceFileDescriptorSupplier + extends ZtpServiceBaseDescriptorSupplier { + ZtpServiceFileDescriptorSupplier() {} + } + + private static final class ZtpServiceMethodDescriptorSupplier + extends ZtpServiceBaseDescriptorSupplier + implements io.grpc.protobuf.ProtoMethodDescriptorSupplier { + private final String methodName; + + ZtpServiceMethodDescriptorSupplier(String methodName) { + this.methodName = methodName; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.MethodDescriptor getMethodDescriptor() { + return getServiceDescriptor().findMethodByName(methodName); + } + } + + private static volatile io.grpc.ServiceDescriptor serviceDescriptor; + + public static io.grpc.ServiceDescriptor getServiceDescriptor() { + io.grpc.ServiceDescriptor result = serviceDescriptor; + if (result == null) { + synchronized (ZtpServiceGrpc.class) { + result = serviceDescriptor; + if (result == null) { + serviceDescriptor = result = io.grpc.ServiceDescriptor.newBuilder(SERVICE_NAME) + .setSchemaDescriptor(new ZtpServiceFileDescriptorSupplier()) + .addMethod(getZtpGetDeviceRoleMethod()) + .addMethod(getZtpGetDeviceRolesByDeviceIdMethod()) + .addMethod(getZtpAddMethod()) + .addMethod(getZtpUpdateMethod()) + .addMethod(getZtpDeleteMethod()) + .addMethod(getZtpDeleteAllMethod()) + .build(); + } + } + } + return result; + } +} diff --git a/src/automation/target/kubernetes/kubernetes.yml b/src/ztp/target/kubernetes/kubernetes.yml similarity index 58% rename from src/automation/target/kubernetes/kubernetes.yml rename to src/ztp/target/kubernetes/kubernetes.yml index e0dc96c13046e09ae84f2afb4a4bb839c4166a1b..e3f3633657e236716fa9feaaca4c8f4af6d61a9c 100644 --- a/src/automation/target/kubernetes/kubernetes.yml +++ b/src/ztp/target/kubernetes/kubernetes.yml @@ -1,74 +1,61 @@ -# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. --- apiVersion: v1 kind: Service metadata: annotations: - app.quarkus.io/commit-id: 8d0654b519e90fe0127e7d1419adce25fa3a179d - app.quarkus.io/build-timestamp: 2023-07-10 - 09:42:53 +0000 + app.quarkus.io/commit-id: 9d36a29ba5ef1fb46f7b51a5c477bdc4410ba548 + app.quarkus.io/build-timestamp: 2023-11-08 - 11:15:43 +0000 prometheus.io/scrape: "true" prometheus.io/path: /q/metrics prometheus.io/port: "8080" prometheus.io/scheme: http labels: - app.kubernetes.io/name: automationservice - app: automationservice - name: automationservice + app.kubernetes.io/name: ztpservice + app: ztpservice + name: ztpservice spec: ports: - - name: http - port: 9192 - targetPort: 8080 - name: grpc-server port: 5050 targetPort: 5050 + - name: http + port: 9192 + targetPort: 8080 selector: - app.kubernetes.io/name: automationservice + app.kubernetes.io/name: ztpservice type: ClusterIP --- apiVersion: apps/v1 kind: Deployment metadata: annotations: - app.quarkus.io/commit-id: 8d0654b519e90fe0127e7d1419adce25fa3a179d - app.quarkus.io/build-timestamp: 2023-07-10 - 09:42:53 +0000 + app.quarkus.io/commit-id: 9d36a29ba5ef1fb46f7b51a5c477bdc4410ba548 + app.quarkus.io/build-timestamp: 2023-11-08 - 11:15:43 +0000 prometheus.io/scrape: "true" prometheus.io/path: /q/metrics prometheus.io/port: "8080" prometheus.io/scheme: http labels: - app: automationservice - app.kubernetes.io/name: automationservice - name: automationservice + app: ztpservice + app.kubernetes.io/name: ztpservice + name: ztpservice spec: replicas: 1 selector: matchLabels: - app.kubernetes.io/name: automationservice + app.kubernetes.io/name: ztpservice template: metadata: annotations: - app.quarkus.io/commit-id: 8d0654b519e90fe0127e7d1419adce25fa3a179d - app.quarkus.io/build-timestamp: 2023-07-10 - 09:42:53 +0000 + app.quarkus.io/commit-id: 9d36a29ba5ef1fb46f7b51a5c477bdc4410ba548 + app.quarkus.io/build-timestamp: 2023-11-08 - 11:15:43 +0000 prometheus.io/scrape: "true" prometheus.io/path: /q/metrics prometheus.io/port: "8080" prometheus.io/scheme: http labels: - app: automationservice - app.kubernetes.io/name: automationservice + app: ztpservice + app.kubernetes.io/name: ztpservice spec: containers: - env: @@ -76,11 +63,11 @@ spec: valueFrom: fieldRef: fieldPath: metadata.namespace - - name: DEVICE_SERVICE_HOST - value: deviceservice - name: CONTEXT_SERVICE_HOST value: contextservice - image: labs.etsi.org:5050/tfs/controller/automation:0.2.0 + - name: DEVICE_SERVICE_HOST + value: deviceservice + image: labs.etsi.org:5050/tfs/controller/ztp:0.2.0 imagePullPolicy: Always livenessProbe: failureThreshold: 3 @@ -92,14 +79,14 @@ spec: periodSeconds: 10 successThreshold: 1 timeoutSeconds: 10 - name: automationservice + name: ztpservice ports: - - containerPort: 8080 - name: http - protocol: TCP - containerPort: 5050 name: grpc-server protocol: TCP + - containerPort: 8080 + name: http + protocol: TCP readinessProbe: failureThreshold: 3 httpGet: diff --git a/src/automation/util/set_version.sh b/src/ztp/util/set_version.sh similarity index 95% rename from src/automation/util/set_version.sh rename to src/ztp/util/set_version.sh index 578d2cd25beddad2a04096c585af5e0a356fbf3c..f4b6b09ade8643c9e407588d057b847078c320cd 100755 --- a/src/automation/util/set_version.sh +++ b/src/ztp/util/set_version.sh @@ -28,4 +28,4 @@ if [ "$(git status --untracked-files=no --porcelain)" ]; then fi ./mvnw versions:set versions:commit -DnewVersion="${version}" -git commit -am "release(automation): ${version}" +git commit -am "release(ztp): ${version}"