@Test public void policyUriBuilderTest() { String target = "/restconf/operational/resolved-policy:resolved-policies/resolved-policy/" + tenantId.getValue() + "/" + consEpg.getValue() + "/" + tenantId.getValue() + "/" + provEpg.getValue() + "/"; Assert.assertEquals(target, resolvedPolicyListener.buildPolicyUris(resolvedPolicy)); }
@VisibleForTesting String buildPolicyUris(ResolvedPolicy resolvedPolicy) { StringBuilder base = new StringBuilder("/restconf/operational/resolved-policy:resolved-policies/resolved-policy/"); base.append(resolvedPolicy.getConsumerTenantId().getValue()); base.append("/"); base.append(resolvedPolicy.getConsumerEpgId().getValue()); base.append("/"); base.append(resolvedPolicy.getProviderTenantId().getValue()); base.append("/"); base.append(resolvedPolicy.getProviderEpgId().getValue()); base.append("/"); return base.toString(); }
ResolvedPolicyListener extends DataTreeChangeHandler<ResolvedPolicy> { @VisibleForTesting String buildPolicyUris(ResolvedPolicy resolvedPolicy) { StringBuilder base = new StringBuilder("/restconf/operational/resolved-policy:resolved-policies/resolved-policy/"); base.append(resolvedPolicy.getConsumerTenantId().getValue()); base.append("/"); base.append(resolvedPolicy.getConsumerEpgId().getValue()); base.append("/"); base.append(resolvedPolicy.getProviderTenantId().getValue()); base.append("/"); base.append(resolvedPolicy.getProviderEpgId().getValue()); base.append("/"); return base.toString(); } }
ResolvedPolicyListener extends DataTreeChangeHandler<ResolvedPolicy> { @VisibleForTesting String buildPolicyUris(ResolvedPolicy resolvedPolicy) { StringBuilder base = new StringBuilder("/restconf/operational/resolved-policy:resolved-policies/resolved-policy/"); base.append(resolvedPolicy.getConsumerTenantId().getValue()); base.append("/"); base.append(resolvedPolicy.getConsumerEpgId().getValue()); base.append("/"); base.append(resolvedPolicy.getProviderTenantId().getValue()); base.append("/"); base.append(resolvedPolicy.getProviderEpgId().getValue()); base.append("/"); return base.toString(); } ResolvedPolicyListener(DataBroker dataBroker, IovisorModuleManager iovisorModuleManager); }
ResolvedPolicyListener extends DataTreeChangeHandler<ResolvedPolicy> { @VisibleForTesting String buildPolicyUris(ResolvedPolicy resolvedPolicy) { StringBuilder base = new StringBuilder("/restconf/operational/resolved-policy:resolved-policies/resolved-policy/"); base.append(resolvedPolicy.getConsumerTenantId().getValue()); base.append("/"); base.append(resolvedPolicy.getConsumerEpgId().getValue()); base.append("/"); base.append(resolvedPolicy.getProviderTenantId().getValue()); base.append("/"); base.append(resolvedPolicy.getProviderEpgId().getValue()); base.append("/"); return base.toString(); } ResolvedPolicyListener(DataBroker dataBroker, IovisorModuleManager iovisorModuleManager);  }
ResolvedPolicyListener extends DataTreeChangeHandler<ResolvedPolicy> { @VisibleForTesting String buildPolicyUris(ResolvedPolicy resolvedPolicy) { StringBuilder base = new StringBuilder("/restconf/operational/resolved-policy:resolved-policies/resolved-policy/"); base.append(resolvedPolicy.getConsumerTenantId().getValue()); base.append("/"); base.append(resolvedPolicy.getConsumerEpgId().getValue()); base.append("/"); base.append(resolvedPolicy.getProviderTenantId().getValue()); base.append("/"); base.append(resolvedPolicy.getProviderEpgId().getValue()); base.append("/"); return base.toString(); } ResolvedPolicyListener(DataBroker dataBroker, IovisorModuleManager iovisorModuleManager);   }