From 831e8509994442fb2fcbc2f460761e888608a0f9 Mon Sep 17 00:00:00 2001 From: pfamelis Date: Tue, 7 Nov 2023 14:05:03 +0200 Subject: [PATCH 1/3] fix: policy fixes --- src/policy/jacoco.exec | Bin 0 -> 43756 bytes .../eu/teraflow/policy/PolicyServiceImpl.java | 119 +- .../grpc/context/ContextOuterClass.java | 1979 ++++++++++++----- src/policy/target/kubernetes/kubernetes.yml | 80 +- 4 files changed, 1508 insertions(+), 670 deletions(-) create mode 100644 src/policy/jacoco.exec diff --git a/src/policy/jacoco.exec b/src/policy/jacoco.exec new file mode 100644 index 0000000000000000000000000000000000000000..1aaf10e44c52d67a9ddaf8de0aa78da148adc51f GIT binary patch literal 43756 zcmeHQ3s@6Z+MXCCAZk3Vwceu@?P|4vT$I|1c&8{{AgC;>4q?D(NH7E~-mu>BN2Qjk zi`7=^)(T##^@i4hQmeIYch|e?idbE!Zn0=pw1V@0a|y|iqYe`)*iN2@Ofq3+&hfXzX?9szlM-qf$arv@-|KpA!Jy5A~P42Dz#8IL%mE>um z%w(*=G|e-?WYFu9JxQIxGe~C`m1Lm8lM|?c#-w<+3I&Qas=DN~Yx8eHgSjS*GV4i$ zemZ6L@Xk_ZXGLmvPud;1JMv7HR-2s_0e|qO&4%w0TeBkA_ekv-IGKHB68z6@I9(4F zY~PX-NghZcJTXrg!6uGLRDY8(MsLxZj1lm}7}8=g2hjxknxjBbIq7pdoygB6d@%RW znT!_d9gAnYDTXq51}B;fBy*pk)KtpAWV2C)8Z{r$=HYwU0~!)-F*mSf^Qvp$9PXh` zzPBgpm8Q&bEq!pcW4j5C_bOLDRF^Iyh(cPy{-|;M7dYdBlz+WH`r0eLpAtj)OpfPk zb6Ao^Z%l?VV{*54|{a5z3wvcC(Jcm z<=L7;n1!@Zu6NNU|Mma;Da5@G@fzkL{y~FG=4qrk#`ZAPEYyLBKKK5RwI_%!nCq%O zjLYGRJ-0x{^5+*>qOQk_C>JRGSiOA~HR$TKE?J5*qnZ#sFi*8*4zA?d`XD`Jh)Enw zS)jKzR1m0m_bT%9_J>KLJ6{Fj>bqV&w0MiEB2LNVx>P9^C`fz<@K&l&qw@CjgElwc#a0G3UrhRv5}5?L z(F6)hS$X!W4C1P&Cd3t~+XDsay*~Q$yr|hHv9<~_r3cfdH^y1b6=WceGKVDS!R{qd z_0>opNv8JvaMd>Ab!@rV+q!{MDWj#bGG?JEEq=J0d%O33QI!E@$2G#{d)0lAGUww= zf2DRIw*4e>rp420VxVhIBa?&U6ATCjA9VDsTg%hCO?ijtE4F%Y^~PAH7r-2%1;aY* ziaOiq7FH)+BIZfMvsV!7tEpX+@ zHr%Je6!hOk-|xOYF=pozo-o)}K5Z3ncl7n4Io)H14PJ&VT)xaa`7+_lm`R?>4HaEk zIWKKT-%p6HnEY^M5tqC7av>icjy} zD+qZ}l%eiNChB#sUfgr2UJCl4u*KyC5o1?8;lh3~?o@A;64F!n6d zfn6&U_7Ja!x1YDaE+(3VcFRX|P;WVPNQQVa#FHT&GeFA_PdL59kBcmnks%&qH285< zhIlf>vmpTcPcp=_Qbkp5i45_61BmAnLk0Ng{Jl7cm!Hob(UMgNh^uZuzA?yYupJ*|YdTy#4W*~#6l6nIftvBc` z$@SgEb9*#R=hBau_gr|Z@=B@l-S)MD{aBXEpGl#ad%(8`S82_C>q#PzAj-Kf@DuYh zywr073HC$f+hv+2<}lw>Xz9>%Q_{=U^(Ee@ehKs^6G$DGdnbv!lw*qN-o!t=J-)mVggtb zrjon*{WQH%rxmk^H>=V8!1xIL3k{UDMV~Gl^J{+dZP~Ajpb2^CTUqSYU|yZ&P@N@1 z+tU3aCx@Q-jtF>aEm_TzhxJ3hB)uVqGB>6*=;S|&#(S#qCc{XJZsH5zd_wOv zYqKL`?$#!R|5FPXp2d&D&<(635cFc7!4J>3X>wve(YG46U`Q{A-UNgBhAWTaW^S0^ zM)--j8JH2PLz6QLa0jVmt2+w6m)~~fzP>ZDPAvz60u~>}!OiNO{iCjxeT2P6SXUf< z*j!OSAPEdBV1}|3q?izLvsHF$4R&Y}KF-!On6d`fFO7IDKR6+Agej4ADTBF};v0`DJslk#n!1i?k7w<_i)%ass6?Gvp8$ltdkTRj7P$K5MNPad-kftxMt!C8&hhrA z=BI5qJVlGeOAbkA2U20;e>*pI-i%gX`u*jH5#r2&-87-n97GJ*?~z%s_AU{KsYGFm zfgWRb2kS60)TCqA6F~RzI8frYzUz!LL(pd;=JHLkNxFTfgjVf9$89fKK0QE}kr1iL5I3*G-ux6z1;>sN?C z@3xl6BSXGD!_&RS{yfqvOvu+|vZpITlB@L~O=+~m_f?~5Utm~}TU zDuK)1yH|7o)yvPD<#FH70B-`U&io+XED3qmWe!)takzb-<*LjpuvSvi>ps7Rl)JbZ zt1^MPeauT62#`sx1hNs9a}x4$&Kg_JNd}O**Z_*+FyWoox#NTN zGB&J%<(x7$gxy`jnPjc**pb9~%Gj{#em!B0+OwxJHk7fURM+$$d8?0%4K4OteOM?f zV?*nrSE0RqhFg7l`ctt!u{~K#xVlRx?&#S<#)dLB{M~K!k+C5xs$rrrJbr^d!*{`! zXPGx-ib>uEE^h;WCfmSeY$#*Hy0;Bn7p?Q@NqKX;;f?_-SZuiC?I0N&%GglGhOh{+ zrOX@3yrCQ-ND$~vNMy(%f?(?d6NIe4HAGM~1Ng`uUn@h#tvHYa_=pPN(ji%+1Lm8l{G4l<^lc1ll(KRYup5SKQTH0L1{` z*l1s`UI8rb+O4S19bGbH{3YWr8GrEs6y-e?w($5>m(z2kfgC@vGOj+q0#S~i_`JtY zl<}90zaUQdZyUfG$gcojA0H;VVXC6{f6Lk9o0+$N*U=4aJ7eYOhIJ#lp%j@CsSyz+ z$(zX04cX;zLZ21qs<9z3m)aCok)s>dhB%BI-LT4*E^F8vIl7@7-B5~@j8cwnXs?_k zM>j-rbVFER?hyG&j&3M6x}hAS5Y#2*7=;djNgS}eEoiVDqp&V$hq7Fmy74publv>E|1uW4Y1~dV6rkz9;Lb&-#NE4Q{;l#mVoV zAcSd+S^?UJ86dSu5c5mnjgd-u(yNgFv0UwZXlq&bxzcYZ>pt_so3^Dl+%A7v_xY)j zwfRQGgyv<}4#>LC3~kMXdgoYbS@)SGSDvQ5>jBKZgI;%y=ss5y)5@yM@}`dJt1`z% z`$YTs`o%K9tigl9%emuq3PfPGX2*RW`lE<=*H#{%34gEXzQ6Uxbse{hms|iTmV)hD zaw5qCDcEiCwxJDr8W#=}!g=ds7+LTj8X{i8YmNeSeJgI4;l@jou))lE9g9IG^EA>N zWAnnP0&7yVuZH}?Qk}ID{H{)_!qx6#yG|XnUJ0gMKN9V*V|_gEpq^R_yOZ*7dAlRW zu6ixgsc`$J+nn2W{f$_S6S7jfUMcE0)3|J^)QJ6a`aB#uV9!Sd*ueLXBdIFI< z(*2%JcrR;Pa8068+K*Xtzi}OOGgXAbgit__fs>6u4fDa-kWsoecizM*$y8mO$-~i> zxr|nhGUww=f2CH^vb@xli~cpx{K^YhIVp#yT0mljNpBNSl=J%Yre!VfEL-TLbV;zw zw(rJmEjlJD0hKnrIinw1$7I)nAFZBMdg5QCh!z0(uyVpS(aqVDcD{Y6Z38uST&r3Y z+^7Wi0ig{L*=XVt+h+5u)u*u14R*Rr*7=JYO`zOX+aeZR?z0J-UNLT=aYcV$VV=3` zAlAM(+`y_2S}Cltu#4~LovH8TVTI#xmxI`x&S&KM+_r0WV*vwKMpd`xYEbClcGMTY z+`93Eo)wxDPnq>P(l9)Mf~A2bb3+g!lByMFUh-O#xtk9*6<00-Sx$gA#e=$CjVSLQ zCtd!iBI>ibtwyf*!geX4-M5p7fk#hMlq7w1ac@cWbxfTQZyV`)@MjlIf+#7h=s~`z zWB)yDyeK`ox}}_^YUR6q_Ku+8;u-~X7MuDGqmK7&mwol>-S@+*Eb<+Es430{R$<9l z$kbl1&nRkSe3HnRO$T%3*pq9Qch-6lZ7~1|#v47r=;@UCek0Iflp-R{$WGJr!^`Y} zrZ2M!(Ld8EkM7ed?l+p&N%o?XXctd+| z`kCy}+p}(HwRf|!;PZ6tLGG|U3%;{wvqo#T!^bn(H{fq{gM_uE*FCkOMpzK!Pzr9+7e4j8rM3G_q`m%3V7^m%^k3Jt46d1n}3o&qY+3ek(gwtYi8TnsE zt=RnI1refeRx$*)sIg|WERQd6>k?PxKX56YyjDVQE*FjQJmY$9gF|@yWX>6 zH9d-&B=FszHfJj6pFWjUNC3M=3jqOdF%er8@X zY33feAa!|_*08_`eotZC%<%8bE0_PHX*KA&F=qf)!G+9`aZ59=JQb=TPI9EipKiQ! z-UTT`XoU*Z@jWXqAqm{+u|0u7#_c{su;Z)HvVcu=BnO=2UTY^njl6S2I)hqrY1{Sx zSejkLPU5SM+bry6iMfhEB$<0vpxWkM+tU3aCx@Q-&Kcws*c3^iaKRW#RuoAAK};to z*kHpilkTRK6|Oc5Gm4%Rkj znujE%kf3|u<(v?5vsHF$jYNV$8Vw2JwAwp$BA_!`IOA|y$n3Olv8GH|+;)5&+T*~ zKUV}Ez_^Pl)TsTb`Dq&tPtjs;;E;68rjEKqk1CMIffBd%U1x~hdLdCp!6 z0;R_m6uSqF$-qt#h3!8KR#j2KF)j*ew4w^#xtX-@Gw)wTvFYaC-djpmuQ=}<)22X9 z$gzc`tUUWw260ss#lWvL1GcK5AS7)5z0i%)eI!!ZL471CHSk@qT1Dmz5ATP~tFReZ zX(48fjOBXr#AS(xS2^itT`;V}E@=VlU|LvBa*vx&ihi#?xyMXhou=uEuB@DwwxjPS t)p83~C{fMua$aM99_f{)E)&5MTgiCFd22U7KIc0!p1(~M&uUM^{{u?r#)AL= literal 0 HcmV?d00001 diff --git a/src/policy/src/main/java/eu/teraflow/policy/PolicyServiceImpl.java b/src/policy/src/main/java/eu/teraflow/policy/PolicyServiceImpl.java index 8462e0b9d..fb56f9de2 100644 --- a/src/policy/src/main/java/eu/teraflow/policy/PolicyServiceImpl.java +++ b/src/policy/src/main/java/eu/teraflow/policy/PolicyServiceImpl.java @@ -48,6 +48,7 @@ import eu.teraflow.policy.service.ServiceService; import io.smallrye.mutiny.Multi; import io.smallrye.mutiny.Uni; import io.smallrye.mutiny.groups.UniJoin; +import io.smallrye.mutiny.subscription.Cancellable; import java.time.Instant; import java.util.ArrayList; import java.util.Arrays; @@ -118,6 +119,7 @@ public class PolicyServiceImpl implements PolicyService { new ConcurrentHashMap<>(); private ConcurrentHashMap alarmPolicyRuleDeviceMap = new ConcurrentHashMap<>(); + private ConcurrentHashMap subscriptionList = new ConcurrentHashMap<>(); @Inject public PolicyServiceImpl( @@ -196,48 +198,60 @@ public class PolicyServiceImpl implements PolicyService { "Invalid PolicyRuleConditions in PolicyRule with ID: %s", policyRuleBasic.getPolicyRuleId())); return policyRuleState; + } else { + contextService + .setPolicyRule(policyRule) + .subscribe() + .with( + policyId -> { + setPolicyRuleServiceToContext( + policyRuleService, VALIDATED_POLICYRULE_STATE); + noAlarms = 0; + + // Create an alarmIds list that contains the promised ids returned from + // setKpiAlarm + List> alarmIds = new ArrayList>(); + for (AlarmDescriptor alarmDescriptor : alarmDescriptorList) { + LOGGER.infof("alarmDescriptor:"); + LOGGER.infof(alarmDescriptor.toString()); + alarmIds.add(monitoringService.setKpiAlarm(alarmDescriptor)); + } + LOGGER.infof("THIS IS A TEST!"); + LOGGER.infof("%s", alarmIds); + // Transform the alarmIds into promised alarms returned from the + // getAlarmResponseStream + List> alarmResponseStreamList = new ArrayList<>(); + for (Uni alarmId : alarmIds) { + alarmResponseStreamList.add( + alarmId + .onItem() + .transformToMulti( + id -> { + alarmPolicyRuleServiceMap.put(id, policyRuleService); + + // TODO: Create infinite subscription + var alarmSubscription = + new AlarmSubscription(id, 259200, 5000); + return monitoringService.getAlarmResponseStream( + alarmSubscription); + })); + } + + // Merge the promised alarms into one stream (Multi Object) + final var multi = + Multi.createBy().merging().streams(alarmResponseStreamList); + setPolicyRuleServiceToContext( + policyRuleService, PROVISIONED_POLICYRULE_STATE); + + subscriptionList.put(policyId, monitorAlarmResponseForService(multi)); + + // TODO: Resubscribe to the stream, if it has ended + + // TODO: Redesign evaluation of action + // evaluateAction(policyRule, alarmDescriptorList, multi); + }); + return VALIDATED_POLICYRULE_STATE; } - contextService.setPolicyRule(policyRule).subscribe().with(x -> {}); - setPolicyRuleServiceToContext(policyRuleService, VALIDATED_POLICYRULE_STATE); - noAlarms = 0; - - // Create an alarmIds list that contains the promised ids returned from setKpiAlarm - List> alarmIds = new ArrayList>(); - for (AlarmDescriptor alarmDescriptor : alarmDescriptorList) { - LOGGER.infof("alarmDescriptor:"); - LOGGER.infof(alarmDescriptor.toString()); - alarmIds.add(monitoringService.setKpiAlarm(alarmDescriptor)); - } - - // Transform the alarmIds into promised alarms returned from the - // getAlarmResponseStream - List> alarmResponseStreamList = new ArrayList<>(); - for (Uni alarmId : alarmIds) { - alarmResponseStreamList.add( - alarmId - .onItem() - .transformToMulti( - id -> { - alarmPolicyRuleServiceMap.put(id, policyRuleService); - - // TODO: Create infinite subscription - var alarmSubscription = new AlarmSubscription(id, 259200, 5000); - return monitoringService.getAlarmResponseStream(alarmSubscription); - })); - } - - // Merge the promised alarms into one stream (Multi Object) - final var multi = Multi.createBy().merging().streams(alarmResponseStreamList); - setPolicyRuleServiceToContext(policyRuleService, PROVISIONED_POLICYRULE_STATE); - - monitorAlarmResponseForService(multi); - - // TODO: Resubscribe to the stream, if it has ended - - // TODO: Redesign evaluation of action - // evaluateAction(policyRule, alarmDescriptorList, multi); - - return VALIDATED_POLICYRULE_STATE; }); } @@ -428,6 +442,7 @@ public class PolicyServiceImpl implements PolicyService { .transform( policyRule -> { var policyRuleBasic = policyRule.getPolicyRuleType().getPolicyRuleBasic(); + String policyId = policyRuleBasic.getPolicyRuleId(); policyRule .getPolicyRuleType() @@ -443,6 +458,9 @@ public class PolicyServiceImpl implements PolicyService { "DeletePolicy with id: " + VALID_MESSAGE, policyRuleBasic.getPolicyRuleId())); + contextService.removePolicyRule(policyId).subscribe().with(x -> {}); + subscriptionList.get(policyId).cancel(); + return policyRuleBasic.getPolicyRuleState(); }); } @@ -485,8 +503,8 @@ public class PolicyServiceImpl implements PolicyService { return alarmDescriptorList; } - private void monitorAlarmResponseForService(Multi multi) { - multi + private Cancellable monitorAlarmResponseForService(Multi multi) { + return multi .subscribe() .with( alarmResponse -> { @@ -725,7 +743,7 @@ public class PolicyServiceImpl implements PolicyService { // TODO: Temp fix for AlarmDescriptor object AlarmDescriptor alarmDescriptor = new AlarmDescriptor( - "alarmId-" + gen(), + "", "alarmDescription", "alarmName-" + gen(), policyRuleCondition.getKpiId(), @@ -770,12 +788,7 @@ public class PolicyServiceImpl implements PolicyService { final var kpiValueRange = convertPolicyRuleConditionToKpiValueRange(policyRuleCondition); return new AlarmDescriptor( - "alarmId-" + gen(), - "alarmDescription", - "alarmName-" + gen(), - kpiId, - kpiValueRange, - getTimeStamp()); + "", "alarmDescription", "alarmName-" + gen(), kpiId, kpiValueRange, getTimeStamp()); } private AlarmDescriptor createAlarmDescriptorWithRange( @@ -800,7 +813,7 @@ public class PolicyServiceImpl implements PolicyService { } return new AlarmDescriptor( - "alarmId-" + gen(), + "", "alarmDescription", "alarmName-" + gen(), kpiId, @@ -899,7 +912,7 @@ public class PolicyServiceImpl implements PolicyService { final var policyRuleTypeService = new PolicyRuleTypeService(policyRuleService); final var policyRule = new PolicyRule(policyRuleTypeService); - contextService.setPolicyRule(policyRule); + contextService.setPolicyRule(policyRule).subscribe().with(x -> {}); } private void setPolicyRuleDeviceToContext( @@ -912,6 +925,6 @@ public class PolicyServiceImpl implements PolicyService { final var policyRuleTypeService = new PolicyRuleTypeDevice(policyRuleDevice); final var policyRule = new PolicyRule(policyRuleTypeService); - contextService.setPolicyRule(policyRule); + contextService.setPolicyRule(policyRule).subscribe().with(x -> {}); } } diff --git a/src/policy/target/generated-sources/grpc/context/ContextOuterClass.java b/src/policy/target/generated-sources/grpc/context/ContextOuterClass.java index be7596350..85bc0d278 100644 --- a/src/policy/target/generated-sources/grpc/context/ContextOuterClass.java +++ b/src/policy/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/policy/target/kubernetes/kubernetes.yml b/src/policy/target/kubernetes/kubernetes.yml index 0f97b9338..18c90107f 100644 --- a/src/policy/target/kubernetes/kubernetes.yml +++ b/src/policy/target/kubernetes/kubernetes.yml @@ -1,74 +1,63 @@ -# 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:41:26 +0000 + app.quarkus.io/commit-id: 447bcf0c8224e0b15715f54d82a0936dd93f5542 + app.quarkus.io/build-timestamp: 2023-11-07 - 12:10:37 +0000 prometheus.io/scrape: "true" prometheus.io/path: /q/metrics prometheus.io/port: "8080" prometheus.io/scheme: http labels: - app.kubernetes.io/name: policyservice - app: policyservice - name: policyservice + app.kubernetes.io/name: policy + app.kubernetes.io/version: 0.1.0 + name: policy spec: ports: - name: http - port: 9192 + port: 80 targetPort: 8080 - name: grpc-server - port: 6060 - targetPort: 6060 + port: 9000 + targetPort: 9000 selector: - app.kubernetes.io/name: policyservice + app.kubernetes.io/name: policy + app.kubernetes.io/version: 0.1.0 type: ClusterIP --- apiVersion: apps/v1 kind: Deployment metadata: annotations: - app.quarkus.io/commit-id: 8d0654b519e90fe0127e7d1419adce25fa3a179d - app.quarkus.io/build-timestamp: 2023-07-10 - 09:41:26 +0000 + app.quarkus.io/commit-id: 447bcf0c8224e0b15715f54d82a0936dd93f5542 + app.quarkus.io/build-timestamp: 2023-11-07 - 12:10:37 +0000 prometheus.io/scrape: "true" prometheus.io/path: /q/metrics prometheus.io/port: "8080" prometheus.io/scheme: http labels: - app: policyservice - app.kubernetes.io/name: policyservice - name: policyservice + app.kubernetes.io/name: policy + app.kubernetes.io/version: 0.1.0 + name: policy spec: replicas: 1 selector: matchLabels: - app.kubernetes.io/name: policyservice + app.kubernetes.io/name: policy + app.kubernetes.io/version: 0.1.0 template: metadata: annotations: - app.quarkus.io/commit-id: 8d0654b519e90fe0127e7d1419adce25fa3a179d - app.quarkus.io/build-timestamp: 2023-07-10 - 09:41:26 +0000 + app.quarkus.io/commit-id: 447bcf0c8224e0b15715f54d82a0936dd93f5542 + app.quarkus.io/build-timestamp: 2023-11-07 - 12:10:37 +0000 prometheus.io/scrape: "true" prometheus.io/path: /q/metrics prometheus.io/port: "8080" prometheus.io/scheme: http labels: - app: policyservice - app.kubernetes.io/name: policyservice + app.kubernetes.io/name: policy + app.kubernetes.io/version: 0.1.0 spec: containers: - env: @@ -76,13 +65,7 @@ spec: valueFrom: fieldRef: fieldPath: metadata.namespace - - name: CONTEXT_SERVICE_HOST - value: contextservice - - name: SERVICE_SERVICE_HOST - value: serviceservice - - name: MONITORING_SERVICE_HOST - value: monitoringservice - image: labs.etsi.org:5050/tfs/controller/policy:0.1.0 + image: nuc8/policy:0.1.0 imagePullPolicy: Always livenessProbe: failureThreshold: 3 @@ -90,16 +73,16 @@ spec: path: /q/health/live port: 8080 scheme: HTTP - initialDelaySeconds: 2 - periodSeconds: 10 + initialDelaySeconds: 0 + periodSeconds: 30 successThreshold: 1 timeoutSeconds: 10 - name: policyservice + name: policy ports: - containerPort: 8080 name: http protocol: TCP - - containerPort: 6060 + - containerPort: 9000 name: grpc-server protocol: TCP readinessProbe: @@ -108,14 +91,7 @@ spec: path: /q/health/ready port: 8080 scheme: HTTP - initialDelaySeconds: 2 - periodSeconds: 10 + initialDelaySeconds: 0 + periodSeconds: 30 successThreshold: 1 timeoutSeconds: 10 - resources: - limits: - cpu: 500m - memory: 2048Mi - requests: - cpu: 50m - memory: 512Mi -- GitLab From 27a1d09c1be68d83e4824ecf80a93bf141d534f4 Mon Sep 17 00:00:00 2001 From: gifrerenom Date: Thu, 9 Nov 2023 17:02:36 +0000 Subject: [PATCH 2/3] Policy component: - Remove unneeded jacoco.exec file - Updated Kubernetes.yml file --- src/policy/jacoco.exec | Bin 43756 -> 0 bytes src/policy/target/kubernetes/kubernetes.yml | 44 +++++++++++++------- 2 files changed, 28 insertions(+), 16 deletions(-) delete mode 100644 src/policy/jacoco.exec diff --git a/src/policy/jacoco.exec b/src/policy/jacoco.exec deleted file mode 100644 index 1aaf10e44c52d67a9ddaf8de0aa78da148adc51f..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 43756 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 diff --git a/src/policy/target/kubernetes/kubernetes.yml b/src/policy/target/kubernetes/kubernetes.yml index 18c90107f..aa42e6021 100644 --- a/src/policy/target/kubernetes/kubernetes.yml +++ b/src/policy/target/kubernetes/kubernetes.yml @@ -1,3 +1,16 @@ +# 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 @@ -10,20 +23,19 @@ metadata: prometheus.io/port: "8080" prometheus.io/scheme: http labels: - app.kubernetes.io/name: policy + app.kubernetes.io/name: policyservice app.kubernetes.io/version: 0.1.0 - name: policy + name: policyservice spec: ports: - name: http - port: 80 + port: 9192 targetPort: 8080 - name: grpc-server - port: 9000 - targetPort: 9000 + port: 6060 + targetPort: 6060 selector: - app.kubernetes.io/name: policy - app.kubernetes.io/version: 0.1.0 + app.kubernetes.io/name: policyservice type: ClusterIP --- apiVersion: apps/v1 @@ -37,14 +49,14 @@ metadata: prometheus.io/port: "8080" prometheus.io/scheme: http labels: - app.kubernetes.io/name: policy + app.kubernetes.io/name: policyservice app.kubernetes.io/version: 0.1.0 - name: policy + name: policyservice spec: replicas: 1 selector: matchLabels: - app.kubernetes.io/name: policy + app.kubernetes.io/name: policyservice app.kubernetes.io/version: 0.1.0 template: metadata: @@ -56,7 +68,7 @@ spec: prometheus.io/port: "8080" prometheus.io/scheme: http labels: - app.kubernetes.io/name: policy + app.kubernetes.io/name: policyservice app.kubernetes.io/version: 0.1.0 spec: containers: @@ -65,7 +77,7 @@ spec: valueFrom: fieldRef: fieldPath: metadata.namespace - image: nuc8/policy:0.1.0 + image: labs.etsi.org:5050/tfs/controller/policy:0.1.0 imagePullPolicy: Always livenessProbe: failureThreshold: 3 @@ -73,16 +85,16 @@ spec: path: /q/health/live port: 8080 scheme: HTTP - initialDelaySeconds: 0 - periodSeconds: 30 + initialDelaySeconds: 2 + periodSeconds: 10 successThreshold: 1 timeoutSeconds: 10 - name: policy + name: policyservice ports: - containerPort: 8080 name: http protocol: TCP - - containerPort: 9000 + - containerPort: 6060 name: grpc-server protocol: TCP readinessProbe: -- GitLab From 169e17680f6649e22d78fdf33e95f0cdc5fde1bb Mon Sep 17 00:00:00 2001 From: gifrerenom Date: Thu, 9 Nov 2023 17:07:35 +0000 Subject: [PATCH 3/3] Policy component: - Remove unneeded log message - Updated Kubernetes.yml file --- .../eu/teraflow/policy/PolicyServiceImpl.java | 4 ++-- src/policy/target/kubernetes/kubernetes.yml | 24 ++++++++++++++----- 2 files changed, 20 insertions(+), 8 deletions(-) diff --git a/src/policy/src/main/java/eu/teraflow/policy/PolicyServiceImpl.java b/src/policy/src/main/java/eu/teraflow/policy/PolicyServiceImpl.java index fb56f9de2..3caadf92e 100644 --- a/src/policy/src/main/java/eu/teraflow/policy/PolicyServiceImpl.java +++ b/src/policy/src/main/java/eu/teraflow/policy/PolicyServiceImpl.java @@ -216,8 +216,8 @@ public class PolicyServiceImpl implements PolicyService { LOGGER.infof(alarmDescriptor.toString()); alarmIds.add(monitoringService.setKpiAlarm(alarmDescriptor)); } - LOGGER.infof("THIS IS A TEST!"); - LOGGER.infof("%s", alarmIds); + //LOGGER.infof("THIS IS A TEST!"); + //LOGGER.infof("%s", alarmIds); // Transform the alarmIds into promised alarms returned from the // getAlarmResponseStream List> alarmResponseStreamList = new ArrayList<>(); diff --git a/src/policy/target/kubernetes/kubernetes.yml b/src/policy/target/kubernetes/kubernetes.yml index aa42e6021..5a576268f 100644 --- a/src/policy/target/kubernetes/kubernetes.yml +++ b/src/policy/target/kubernetes/kubernetes.yml @@ -24,7 +24,7 @@ metadata: prometheus.io/scheme: http labels: app.kubernetes.io/name: policyservice - app.kubernetes.io/version: 0.1.0 + app: policyservice name: policyservice spec: ports: @@ -49,15 +49,14 @@ metadata: prometheus.io/port: "8080" prometheus.io/scheme: http labels: + app: policyservice app.kubernetes.io/name: policyservice - app.kubernetes.io/version: 0.1.0 name: policyservice spec: replicas: 1 selector: matchLabels: app.kubernetes.io/name: policyservice - app.kubernetes.io/version: 0.1.0 template: metadata: annotations: @@ -68,8 +67,8 @@ spec: prometheus.io/port: "8080" prometheus.io/scheme: http labels: + app: policyservice app.kubernetes.io/name: policyservice - app.kubernetes.io/version: 0.1.0 spec: containers: - env: @@ -77,6 +76,12 @@ spec: valueFrom: fieldRef: fieldPath: metadata.namespace + - name: CONTEXT_SERVICE_HOST + value: contextservice + - name: SERVICE_SERVICE_HOST + value: serviceservice + - name: MONITORING_SERVICE_HOST + value: monitoringservice image: labs.etsi.org:5050/tfs/controller/policy:0.1.0 imagePullPolicy: Always livenessProbe: @@ -103,7 +108,14 @@ spec: path: /q/health/ready port: 8080 scheme: HTTP - initialDelaySeconds: 0 - periodSeconds: 30 + initialDelaySeconds: 2 + periodSeconds: 10 successThreshold: 1 timeoutSeconds: 10 + resources: + limits: + cpu: 500m + memory: 2048Mi + requests: + cpu: 50m + memory: 512Mi -- GitLab