xtend-gen
yang-gen-config
yang-gen-sal
+yang-gen-code
classes
out/
.externalToolBuilders
Map<String, Object> map = new HashMap<String, Object>();
for (DstCosts dstCosts : ecm.getDstCosts()) {
String dst = String.valueOf(dstCosts.getDst().getValue());
- String cost = dstCosts.getAugmentation(DstCosts1.class).getCostDefault();
+ String cost = dstCosts.getAugmentation(DstCosts1.class).getCostDefault().toString();
map.put(dst, cost(resp.meta.costType.mode, resp.meta.costType.metric, cost));
}
resp.answer.put(String.valueOf(src.getValue()), map);
@JsonProperty("cost-type")
public RFC7285CostType costType;
+ @JsonProperty("constraints")
+ public List<String> constraints = new ArrayList<String>();
+
@JsonProperty("endpoints")
public RFC7285QueryPairs endpoints;
}
return ecsr;
}
-
@Test
public void testECSAnswer() throws Exception {
RFC7285JSONMapper mapper = new RFC7285JSONMapper();
_ecsr.answer.get(endpoint).entrySet());
}
}
+
+ @Test
+ public void testEPSRequest() throws Exception {
+ /*
+ * {
+ * "properties" : [
+ * "my-default-networkmap.pid",
+ * "priv:ietf-example-prop"
+ * ],
+ * "endpoints" : [
+ * "ipv4:192.0.2.34",
+ * "ipv4:203.0.113.129"
+ * ]
+ * }
+ */
+ RFC7285JSONMapper mapper = new RFC7285JSONMapper();
+
+ RFC7285Endpoint.PropertyRequest req = new RFC7285Endpoint.PropertyRequest();
+ if (req.properties == null)
+ req.properties = new ArrayList<String>();
+ req.properties.add("my-default-networkmap.pid");
+ req.properties.add("priv:ietf-example-prop");
+
+ if (req.endpoints == null)
+ req.endpoints = new ArrayList<String>();
+
+ req.endpoints.add("ipv4:192.0.2.34");
+ req.endpoints.add("ipv4:203.0.113.129");
+
+ String epsrString = mapper.asJSON(req);
+ RFC7285Endpoint.PropertyRequest _req = mapper.asPropertyRequest(epsrString);
+
+ assertCollectionEquals(req.properties, _req.properties);
+ assertCollectionEquals(req.endpoints, _req.endpoints);
+ }
+
+ @Test
+ public void testEPSResponse() throws Exception {
+ /*
+ * {
+ * "meta" : {
+ * "dependent-vtags" : [
+ * {
+ * "resource-id": "my-default-network-map",
+ * "tag": "7915dc0290c2705481c491a2b4ffbec482b3cf62"
+ * }
+ * ]
+ * },
+ * "endpoint-properties": {
+ * "ipv4:192.0.2.34": {
+ * "my-default-network-map.pid": "PID1",
+ * "priv:ietf-example-prop": "1"
+ * },
+ * "ipv4:203.0.113.129": {
+ * "my-default-network-map.pid": "PID3"
+ * }
+ * }
+ * }
+ * */
+ RFC7285JSONMapper mapper = new RFC7285JSONMapper();
+
+ RFC7285Endpoint.PropertyResponse res = new RFC7285Endpoint.PropertyResponse();
+ RFC7285VersionTag vtag = new RFC7285VersionTag("my-default-network-map",
+ "7915dc0290c2705481c491a2b4ffbec482b3cf62");
+ res.meta.netmap_tags.add(vtag);
+
+ String endpoints[] = { "ipv4:192.0.2.34", "ipv4:203.0.113.129" };
+ String properties[] = { "my-default-network-map", "priv:itef-example-prop" };
+ for (String endpoint: endpoints) {
+ res.answer.put(endpoint, new LinkedHashMap<String, Object>());
+ }
+ res.answer.get(endpoints[0]).put(properties[0], "PID1");
+ res.answer.get(endpoints[0]).put(properties[1], new Integer(1));
+ res.answer.get(endpoints[1]).put(properties[0], "PID3");
+
+ String epsrString = mapper.asJSON(res);
+ RFC7285Endpoint.PropertyResponse _res = mapper.asPropertyResponse(epsrString);
+
+ assertCollectionEquals(res.meta.netmap_tags, _res.meta.netmap_tags);
+ for (String endpoint: endpoints) {
+ assertCollectionEquals(res.answer.get(endpoint).entrySet(),
+ _res.answer.get(endpoint).entrySet());
+ }
+ }
}
+++ /dev/null
-package org.opendaylight.yang.gen.v1.urn.opendaylight.alto.alto.host.tracker.impl.rev140528;
-
-public final class $YangModelBindingProvider implements org.opendaylight.yangtools.yang.binding.YangModelBindingProvider {
-
- public org.opendaylight.yangtools.yang.binding.YangModuleInfo getModuleInfo() {
- return $YangModuleInfoImpl.getInstance();
- }
-}
+++ /dev/null
-package org.opendaylight.yang.gen.v1.urn.opendaylight.alto.alto.host.tracker.impl.rev140528 ;
-import org.opendaylight.yangtools.yang.binding.YangModuleInfo;
-import java.util.Set;
-import java.util.HashSet;
-import com.google.common.collect.ImmutableSet;
-import java.io.InputStream;
-import java.io.IOException;
-public final class $YangModuleInfoImpl implements YangModuleInfo {
-
- private static final YangModuleInfo INSTANCE = new $YangModuleInfoImpl();
-
- private final String name = "alto-host-tracker-impl";
- private final String namespace = "urn:opendaylight:alto:alto-host-tracker-impl";
- private final String revision = "2014-05-28";
- private final String resourcePath = "/META-INF/yang/alto-host-tracker-impl.yang";
-
- private final Set<YangModuleInfo> importedModules;
-
- public static YangModuleInfo getInstance() {
- return INSTANCE;
- }
-
- private $YangModuleInfoImpl() {
- Set<YangModuleInfo> set = new HashSet<>();
- set.add(org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.controller.md.sal.binding.rev131028.$YangModuleInfoImpl.getInstance());
- set.add(org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.controller.config.rev130405.$YangModuleInfoImpl.getInstance());
- importedModules = ImmutableSet.copyOf(set);
-
- InputStream stream = $YangModuleInfoImpl.class.getResourceAsStream(resourcePath);
- if (stream == null) {
- throw new IllegalStateException("Resource '" + resourcePath + "' is missing");
- }
- try {
- stream.close();
- } catch (IOException e) {
- // Resource leak, but there is nothing we can do
- }
- }
-
- @Override
- public String getName() {
- return name;
- }
-
- @Override
- public String getRevision() {
- return revision;
- }
-
- @Override
- public String getNamespace() {
- return namespace;
- }
-
- @Override
- public InputStream getModuleSourceStream() throws IOException {
- InputStream stream = $YangModuleInfoImpl.class.getResourceAsStream(resourcePath);
- if (stream == null) {
- throw new IOException("Resource " + resourcePath + " is missing");
- }
- return stream;
- }
-
- @Override
- public Set<YangModuleInfo> getImportedModules() {
- return importedModules;
- }
-
- @Override
- public String toString() {
- StringBuilder sb = new StringBuilder(this.getClass().getCanonicalName());
- sb.append("[");
- sb.append("name = " + name);
- sb.append(", namespace = " + namespace);
- sb.append(", revision = " + revision);
- sb.append(", resourcePath = " + resourcePath);
- sb.append(", imports = " + importedModules);
- sb.append("]");
- return sb.toString();
- }
-
-
-}
+++ /dev/null
-package org.opendaylight.yang.gen.v1.urn.opendaylight.alto.alto.host.tracker.impl.rev140528;
-import org.opendaylight.yangtools.yang.common.QName;
-import org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.controller.config.rev130405.ModuleType;
-
-
-/**
- * <p>This class represents the following YANG schema fragment defined in module <b>alto-host-tracker-impl</b>
- * <br>(Source path: <i>META-INF/yang/alto-host-tracker-impl.yang</i>):
- * <pre>
- * identity alto-host-tracker-impl {
- * base "()IdentitySchemaNodeImpl[base=null, qname=(urn:opendaylight:params:xml:ns:yang:controller:config?revision=2013-04-05)module-type]";
- * status CURRENT;
- * }
- * </pre>
- * The schema path to identify an instance is
- * <i>alto-host-tracker-impl/alto-host-tracker-impl</i>
- *
- */
-public abstract class AltoHostTrackerImpl extends ModuleType
- {
- public static final QName QNAME = org.opendaylight.yangtools.yang.common.QName.cachedReference(org.opendaylight.yangtools.yang.common.QName.create("urn:opendaylight:alto:alto-host-tracker-impl","2014-05-28","alto-host-tracker-impl"));
-
- public AltoHostTrackerImpl() {
-
-
- }
-
-
-
-
-
-
-
-
-
-
-}
-
+++ /dev/null
-package org.opendaylight.yang.gen.v1.urn.opendaylight.alto.alto.host.tracker.impl.rev140528.modules.module.configuration;
-import org.opendaylight.yangtools.yang.common.QName;
-import org.opendaylight.yangtools.yang.binding.DataObject;
-import org.opendaylight.yang.gen.v1.urn.opendaylight.alto.alto.host.tracker.impl.rev140528.modules.module.configuration.alto.host.tracker.impl.DataBroker;
-import org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.controller.config.rev130405.modules.module.Configuration;
-import org.opendaylight.yangtools.yang.binding.Augmentable;
-
-
-/**
- * <p>This class represents the following YANG schema fragment defined in module <b>alto-host-tracker-impl</b>
- * <br>(Source path: <i>META-INF/yang/alto-host-tracker-impl.yang</i>):
- * <pre>
- * case alto-host-tracker-impl {
- * leaf topology-id {
- * type string;
- * }
- * container data-broker {
- * leaf type {
- * type leafref;
- * }
- * leaf name {
- * type leafref;
- * }
- * uses service-ref {
- * refine (urn:opendaylight:alto:alto-host-tracker-impl?revision=2014-05-28)type {
- * leaf type {
- * type leafref;
- * }
- * }
- * }
- * }
- * }
- * </pre>
- * The schema path to identify an instance is
- * <i>alto-host-tracker-impl/modules/module/configuration/(urn:opendaylight:alto:alto-host-tracker-impl?revision=2014-05-28)alto-host-tracker-impl</i>
- *
- */
-public interface AltoHostTrackerImpl
- extends
- DataObject,
- Augmentable<org.opendaylight.yang.gen.v1.urn.opendaylight.alto.alto.host.tracker.impl.rev140528.modules.module.configuration.AltoHostTrackerImpl>,
- Configuration
-{
-
-
-
- public static final QName QNAME = org.opendaylight.yangtools.yang.common.QName.cachedReference(org.opendaylight.yangtools.yang.common.QName.create("urn:opendaylight:alto:alto-host-tracker-impl","2014-05-28","alto-host-tracker-impl"));
-
- java.lang.String getTopologyId();
-
- DataBroker getDataBroker();
-
-}
-
+++ /dev/null
-package org.opendaylight.yang.gen.v1.urn.opendaylight.alto.alto.host.tracker.impl.rev140528.modules.module.configuration;
-import java.util.Collections;
-import java.util.Map;
-import org.opendaylight.yangtools.yang.binding.DataObject;
-import org.opendaylight.yangtools.yang.binding.AugmentationHolder;
-import java.util.HashMap;
-import org.opendaylight.yang.gen.v1.urn.opendaylight.alto.alto.host.tracker.impl.rev140528.modules.module.configuration.alto.host.tracker.impl.DataBroker;
-import org.opendaylight.yangtools.concepts.Builder;
-import org.opendaylight.yangtools.yang.binding.Augmentation;
-
-
-/**
- * Class that builds {@link org.opendaylight.yang.gen.v1.urn.opendaylight.alto.alto.host.tracker.impl.rev140528.modules.module.configuration.AltoHostTrackerImpl} instances.
- *
- * @see org.opendaylight.yang.gen.v1.urn.opendaylight.alto.alto.host.tracker.impl.rev140528.modules.module.configuration.AltoHostTrackerImpl
- *
- */
-public class AltoHostTrackerImplBuilder implements Builder <org.opendaylight.yang.gen.v1.urn.opendaylight.alto.alto.host.tracker.impl.rev140528.modules.module.configuration.AltoHostTrackerImpl> {
-
- private DataBroker _dataBroker;
- private java.lang.String _topologyId;
-
- Map<java.lang.Class<? extends Augmentation<org.opendaylight.yang.gen.v1.urn.opendaylight.alto.alto.host.tracker.impl.rev140528.modules.module.configuration.AltoHostTrackerImpl>>, Augmentation<org.opendaylight.yang.gen.v1.urn.opendaylight.alto.alto.host.tracker.impl.rev140528.modules.module.configuration.AltoHostTrackerImpl>> augmentation = new HashMap<>();
-
- public AltoHostTrackerImplBuilder() {
- }
-
- public AltoHostTrackerImplBuilder(AltoHostTrackerImpl base) {
- this._dataBroker = base.getDataBroker();
- this._topologyId = base.getTopologyId();
- if (base instanceof AltoHostTrackerImplImpl) {
- AltoHostTrackerImplImpl impl = (AltoHostTrackerImplImpl) base;
- this.augmentation = new HashMap<>(impl.augmentation);
- } else if (base instanceof AugmentationHolder) {
- @SuppressWarnings("unchecked")
- AugmentationHolder<org.opendaylight.yang.gen.v1.urn.opendaylight.alto.alto.host.tracker.impl.rev140528.modules.module.configuration.AltoHostTrackerImpl> casted =(AugmentationHolder<org.opendaylight.yang.gen.v1.urn.opendaylight.alto.alto.host.tracker.impl.rev140528.modules.module.configuration.AltoHostTrackerImpl>) base;
- this.augmentation = new HashMap<>(casted.augmentations());
- }
- }
-
-
- public DataBroker getDataBroker() {
- return _dataBroker;
- }
-
- public java.lang.String getTopologyId() {
- return _topologyId;
- }
-
- @SuppressWarnings("unchecked")
- public <E extends Augmentation<org.opendaylight.yang.gen.v1.urn.opendaylight.alto.alto.host.tracker.impl.rev140528.modules.module.configuration.AltoHostTrackerImpl>> E getAugmentation(java.lang.Class<E> augmentationType) {
- if (augmentationType == null) {
- throw new IllegalArgumentException("Augmentation Type reference cannot be NULL!");
- }
- return (E) augmentation.get(augmentationType);
- }
-
- public AltoHostTrackerImplBuilder setDataBroker(DataBroker value) {
- this._dataBroker = value;
- return this;
- }
-
- public AltoHostTrackerImplBuilder setTopologyId(java.lang.String value) {
- this._topologyId = value;
- return this;
- }
-
- public AltoHostTrackerImplBuilder addAugmentation(java.lang.Class<? extends Augmentation<org.opendaylight.yang.gen.v1.urn.opendaylight.alto.alto.host.tracker.impl.rev140528.modules.module.configuration.AltoHostTrackerImpl>> augmentationType, Augmentation<org.opendaylight.yang.gen.v1.urn.opendaylight.alto.alto.host.tracker.impl.rev140528.modules.module.configuration.AltoHostTrackerImpl> augmentation) {
- if (augmentation == null) {
- return removeAugmentation(augmentationType);
- }
- this.augmentation.put(augmentationType, augmentation);
- return this;
- }
-
- public AltoHostTrackerImplBuilder removeAugmentation(java.lang.Class<? extends Augmentation<org.opendaylight.yang.gen.v1.urn.opendaylight.alto.alto.host.tracker.impl.rev140528.modules.module.configuration.AltoHostTrackerImpl>> augmentationType) {
- this.augmentation.remove(augmentationType);
- return this;
- }
-
- public AltoHostTrackerImpl build() {
- return new AltoHostTrackerImplImpl(this);
- }
-
- private static final class AltoHostTrackerImplImpl implements AltoHostTrackerImpl {
-
- public java.lang.Class<org.opendaylight.yang.gen.v1.urn.opendaylight.alto.alto.host.tracker.impl.rev140528.modules.module.configuration.AltoHostTrackerImpl> getImplementedInterface() {
- return org.opendaylight.yang.gen.v1.urn.opendaylight.alto.alto.host.tracker.impl.rev140528.modules.module.configuration.AltoHostTrackerImpl.class;
- }
-
- private final DataBroker _dataBroker;
- private final java.lang.String _topologyId;
-
- private Map<java.lang.Class<? extends Augmentation<org.opendaylight.yang.gen.v1.urn.opendaylight.alto.alto.host.tracker.impl.rev140528.modules.module.configuration.AltoHostTrackerImpl>>, Augmentation<org.opendaylight.yang.gen.v1.urn.opendaylight.alto.alto.host.tracker.impl.rev140528.modules.module.configuration.AltoHostTrackerImpl>> augmentation = new HashMap<>();
-
- private AltoHostTrackerImplImpl(AltoHostTrackerImplBuilder base) {
- this._dataBroker = base.getDataBroker();
- this._topologyId = base.getTopologyId();
- switch (base.augmentation.size()) {
- case 0:
- this.augmentation = Collections.emptyMap();
- break;
- case 1:
- final Map.Entry<java.lang.Class<? extends Augmentation<org.opendaylight.yang.gen.v1.urn.opendaylight.alto.alto.host.tracker.impl.rev140528.modules.module.configuration.AltoHostTrackerImpl>>, Augmentation<org.opendaylight.yang.gen.v1.urn.opendaylight.alto.alto.host.tracker.impl.rev140528.modules.module.configuration.AltoHostTrackerImpl>> e = base.augmentation.entrySet().iterator().next();
- this.augmentation = Collections.<java.lang.Class<? extends Augmentation<org.opendaylight.yang.gen.v1.urn.opendaylight.alto.alto.host.tracker.impl.rev140528.modules.module.configuration.AltoHostTrackerImpl>>, Augmentation<org.opendaylight.yang.gen.v1.urn.opendaylight.alto.alto.host.tracker.impl.rev140528.modules.module.configuration.AltoHostTrackerImpl>>singletonMap(e.getKey(), e.getValue());
- break;
- default :
- this.augmentation = new HashMap<>(base.augmentation);
- }
- }
-
- @Override
- public DataBroker getDataBroker() {
- return _dataBroker;
- }
-
- @Override
- public java.lang.String getTopologyId() {
- return _topologyId;
- }
-
- @SuppressWarnings("unchecked")
- @Override
- public <E extends Augmentation<org.opendaylight.yang.gen.v1.urn.opendaylight.alto.alto.host.tracker.impl.rev140528.modules.module.configuration.AltoHostTrackerImpl>> E getAugmentation(java.lang.Class<E> augmentationType) {
- if (augmentationType == null) {
- throw new IllegalArgumentException("Augmentation Type reference cannot be NULL!");
- }
- return (E) augmentation.get(augmentationType);
- }
-
- @Override
- public int hashCode() {
- final int prime = 31;
- int result = 1;
- result = prime * result + ((_dataBroker == null) ? 0 : _dataBroker.hashCode());
- result = prime * result + ((_topologyId == null) ? 0 : _topologyId.hashCode());
- result = prime * result + ((augmentation == null) ? 0 : augmentation.hashCode());
- return result;
- }
-
- @Override
- public boolean equals(java.lang.Object obj) {
- if (this == obj) {
- return true;
- }
- if (!(obj instanceof DataObject)) {
- return false;
- }
- if (!org.opendaylight.yang.gen.v1.urn.opendaylight.alto.alto.host.tracker.impl.rev140528.modules.module.configuration.AltoHostTrackerImpl.class.equals(((DataObject)obj).getImplementedInterface())) {
- return false;
- }
- org.opendaylight.yang.gen.v1.urn.opendaylight.alto.alto.host.tracker.impl.rev140528.modules.module.configuration.AltoHostTrackerImpl other = (org.opendaylight.yang.gen.v1.urn.opendaylight.alto.alto.host.tracker.impl.rev140528.modules.module.configuration.AltoHostTrackerImpl)obj;
- if (_dataBroker == null) {
- if (other.getDataBroker() != null) {
- return false;
- }
- } else if(!_dataBroker.equals(other.getDataBroker())) {
- return false;
- }
- if (_topologyId == null) {
- if (other.getTopologyId() != null) {
- return false;
- }
- } else if(!_topologyId.equals(other.getTopologyId())) {
- return false;
- }
- if (getClass() == obj.getClass()) {
- // Simple case: we are comparing against self
- AltoHostTrackerImplImpl otherImpl = (AltoHostTrackerImplImpl) obj;
- if (augmentation == null) {
- if (otherImpl.augmentation != null) {
- return false;
- }
- } else if(!augmentation.equals(otherImpl.augmentation)) {
- return false;
- }
- } else {
- // Hard case: compare our augments with presence there...
- for (Map.Entry<java.lang.Class<? extends Augmentation<org.opendaylight.yang.gen.v1.urn.opendaylight.alto.alto.host.tracker.impl.rev140528.modules.module.configuration.AltoHostTrackerImpl>>, Augmentation<org.opendaylight.yang.gen.v1.urn.opendaylight.alto.alto.host.tracker.impl.rev140528.modules.module.configuration.AltoHostTrackerImpl>> e : augmentation.entrySet()) {
- if (!e.getValue().equals(other.getAugmentation(e.getKey()))) {
- return false;
- }
- }
- // .. and give the other one the chance to do the same
- if (!obj.equals(this)) {
- return false;
- }
- }
- return true;
- }
-
- @Override
- public java.lang.String toString() {
- java.lang.StringBuilder builder = new java.lang.StringBuilder ("AltoHostTrackerImpl [");
- boolean first = true;
-
- if (_dataBroker != null) {
- if (first) {
- first = false;
- } else {
- builder.append(", ");
- }
- builder.append("_dataBroker=");
- builder.append(_dataBroker);
- }
- if (_topologyId != null) {
- if (first) {
- first = false;
- } else {
- builder.append(", ");
- }
- builder.append("_topologyId=");
- builder.append(_topologyId);
- }
- if (first) {
- first = false;
- } else {
- builder.append(", ");
- }
- builder.append("augmentation=");
- builder.append(augmentation.values());
- return builder.append(']').toString();
- }
- }
-
-}
+++ /dev/null
-package org.opendaylight.yang.gen.v1.urn.opendaylight.alto.alto.host.tracker.impl.rev140528.modules.module.configuration.alto.host.tracker.impl;
-import org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.controller.config.rev130405.ServiceRef;
-import org.opendaylight.yangtools.yang.common.QName;
-import org.opendaylight.yangtools.yang.binding.ChildOf;
-import org.opendaylight.yangtools.yang.binding.Augmentable;
-import org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.controller.config.rev130405.modules.Module;
-
-
-/**
- * <p>This class represents the following YANG schema fragment defined in module <b>alto-host-tracker-impl</b>
- * <br>(Source path: <i>META-INF/yang/alto-host-tracker-impl.yang</i>):
- * <pre>
- * container data-broker {
- * leaf type {
- * type leafref;
- * }
- * leaf name {
- * type leafref;
- * }
- * uses service-ref {
- * refine (urn:opendaylight:alto:alto-host-tracker-impl?revision=2014-05-28)type {
- * leaf type {
- * type leafref;
- * }
- * }
- * }
- * }
- * </pre>
- * The schema path to identify an instance is
- * <i>alto-host-tracker-impl/modules/module/configuration/(urn:opendaylight:alto:alto-host-tracker-impl?revision=2014-05-28)alto-host-tracker-impl/data-broker</i>
- *
- * <p>To create instances of this class use {@link org.opendaylight.yang.gen.v1.urn.opendaylight.alto.alto.host.tracker.impl.rev140528.modules.module.configuration.alto.host.tracker.impl.DataBrokerBuilder}.
- * @see org.opendaylight.yang.gen.v1.urn.opendaylight.alto.alto.host.tracker.impl.rev140528.modules.module.configuration.alto.host.tracker.impl.DataBrokerBuilder
- *
- */
-public interface DataBroker
- extends
- ChildOf<Module>,
- Augmentable<org.opendaylight.yang.gen.v1.urn.opendaylight.alto.alto.host.tracker.impl.rev140528.modules.module.configuration.alto.host.tracker.impl.DataBroker>,
- ServiceRef
-{
-
-
-
- public static final QName QNAME = org.opendaylight.yangtools.yang.common.QName.cachedReference(org.opendaylight.yangtools.yang.common.QName.create("urn:opendaylight:alto:alto-host-tracker-impl","2014-05-28","data-broker"));
-
-
-}
-
+++ /dev/null
-package org.opendaylight.yang.gen.v1.urn.opendaylight.alto.alto.host.tracker.impl.rev140528.modules.module.configuration.alto.host.tracker.impl;
-import java.util.Collections;
-import java.util.Map;
-import org.opendaylight.yangtools.yang.binding.DataObject;
-import org.opendaylight.yangtools.yang.binding.AugmentationHolder;
-import java.util.HashMap;
-import org.opendaylight.yangtools.concepts.Builder;
-import org.opendaylight.yangtools.yang.binding.Augmentation;
-
-
-/**
- * Class that builds {@link org.opendaylight.yang.gen.v1.urn.opendaylight.alto.alto.host.tracker.impl.rev140528.modules.module.configuration.alto.host.tracker.impl.DataBroker} instances.
- *
- * @see org.opendaylight.yang.gen.v1.urn.opendaylight.alto.alto.host.tracker.impl.rev140528.modules.module.configuration.alto.host.tracker.impl.DataBroker
- *
- */
-public class DataBrokerBuilder implements Builder <org.opendaylight.yang.gen.v1.urn.opendaylight.alto.alto.host.tracker.impl.rev140528.modules.module.configuration.alto.host.tracker.impl.DataBroker> {
-
- private java.lang.Object _name;
- private java.lang.Class<? extends org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.controller.config.rev130405.ServiceType> _type;
-
- Map<java.lang.Class<? extends Augmentation<org.opendaylight.yang.gen.v1.urn.opendaylight.alto.alto.host.tracker.impl.rev140528.modules.module.configuration.alto.host.tracker.impl.DataBroker>>, Augmentation<org.opendaylight.yang.gen.v1.urn.opendaylight.alto.alto.host.tracker.impl.rev140528.modules.module.configuration.alto.host.tracker.impl.DataBroker>> augmentation = new HashMap<>();
-
- public DataBrokerBuilder() {
- }
- public DataBrokerBuilder(org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.controller.config.rev130405.ServiceRef arg) {
- this._type = arg.getType();
- this._name = arg.getName();
- }
-
- public DataBrokerBuilder(DataBroker base) {
- this._name = base.getName();
- this._type = base.getType();
- if (base instanceof DataBrokerImpl) {
- DataBrokerImpl impl = (DataBrokerImpl) base;
- this.augmentation = new HashMap<>(impl.augmentation);
- } else if (base instanceof AugmentationHolder) {
- @SuppressWarnings("unchecked")
- AugmentationHolder<org.opendaylight.yang.gen.v1.urn.opendaylight.alto.alto.host.tracker.impl.rev140528.modules.module.configuration.alto.host.tracker.impl.DataBroker> casted =(AugmentationHolder<org.opendaylight.yang.gen.v1.urn.opendaylight.alto.alto.host.tracker.impl.rev140528.modules.module.configuration.alto.host.tracker.impl.DataBroker>) base;
- this.augmentation = new HashMap<>(casted.augmentations());
- }
- }
-
- /**
- *Set fields from given grouping argument. Valid argument is instance of one of following types:
- * <ul>
- * <li>org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.controller.config.rev130405.ServiceRef</li>
- * </ul>
- *
- * @param arg grouping object
- * @throws IllegalArgumentException if given argument is none of valid types
- */
- public void fieldsFrom(DataObject arg) {
- boolean isValidArg = false;
- if (arg instanceof org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.controller.config.rev130405.ServiceRef) {
- this._type = ((org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.controller.config.rev130405.ServiceRef)arg).getType();
- this._name = ((org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.controller.config.rev130405.ServiceRef)arg).getName();
- isValidArg = true;
- }
- if (!isValidArg) {
- throw new IllegalArgumentException(
- "expected one of: [org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.controller.config.rev130405.ServiceRef] \n" +
- "but was: " + arg
- );
- }
- }
-
- public java.lang.Object getName() {
- return _name;
- }
-
- public java.lang.Class<? extends org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.controller.config.rev130405.ServiceType> getType() {
- return _type;
- }
-
- @SuppressWarnings("unchecked")
- public <E extends Augmentation<org.opendaylight.yang.gen.v1.urn.opendaylight.alto.alto.host.tracker.impl.rev140528.modules.module.configuration.alto.host.tracker.impl.DataBroker>> E getAugmentation(java.lang.Class<E> augmentationType) {
- if (augmentationType == null) {
- throw new IllegalArgumentException("Augmentation Type reference cannot be NULL!");
- }
- return (E) augmentation.get(augmentationType);
- }
-
- public DataBrokerBuilder setName(java.lang.Object value) {
- this._name = value;
- return this;
- }
-
- public DataBrokerBuilder setType(java.lang.Class<? extends org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.controller.config.rev130405.ServiceType> value) {
- this._type = value;
- return this;
- }
-
- public DataBrokerBuilder addAugmentation(java.lang.Class<? extends Augmentation<org.opendaylight.yang.gen.v1.urn.opendaylight.alto.alto.host.tracker.impl.rev140528.modules.module.configuration.alto.host.tracker.impl.DataBroker>> augmentationType, Augmentation<org.opendaylight.yang.gen.v1.urn.opendaylight.alto.alto.host.tracker.impl.rev140528.modules.module.configuration.alto.host.tracker.impl.DataBroker> augmentation) {
- if (augmentation == null) {
- return removeAugmentation(augmentationType);
- }
- this.augmentation.put(augmentationType, augmentation);
- return this;
- }
-
- public DataBrokerBuilder removeAugmentation(java.lang.Class<? extends Augmentation<org.opendaylight.yang.gen.v1.urn.opendaylight.alto.alto.host.tracker.impl.rev140528.modules.module.configuration.alto.host.tracker.impl.DataBroker>> augmentationType) {
- this.augmentation.remove(augmentationType);
- return this;
- }
-
- public DataBroker build() {
- return new DataBrokerImpl(this);
- }
-
- private static final class DataBrokerImpl implements DataBroker {
-
- public java.lang.Class<org.opendaylight.yang.gen.v1.urn.opendaylight.alto.alto.host.tracker.impl.rev140528.modules.module.configuration.alto.host.tracker.impl.DataBroker> getImplementedInterface() {
- return org.opendaylight.yang.gen.v1.urn.opendaylight.alto.alto.host.tracker.impl.rev140528.modules.module.configuration.alto.host.tracker.impl.DataBroker.class;
- }
-
- private final java.lang.Object _name;
- private final java.lang.Class<? extends org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.controller.config.rev130405.ServiceType> _type;
-
- private Map<java.lang.Class<? extends Augmentation<org.opendaylight.yang.gen.v1.urn.opendaylight.alto.alto.host.tracker.impl.rev140528.modules.module.configuration.alto.host.tracker.impl.DataBroker>>, Augmentation<org.opendaylight.yang.gen.v1.urn.opendaylight.alto.alto.host.tracker.impl.rev140528.modules.module.configuration.alto.host.tracker.impl.DataBroker>> augmentation = new HashMap<>();
-
- private DataBrokerImpl(DataBrokerBuilder base) {
- this._name = base.getName();
- this._type = base.getType();
- switch (base.augmentation.size()) {
- case 0:
- this.augmentation = Collections.emptyMap();
- break;
- case 1:
- final Map.Entry<java.lang.Class<? extends Augmentation<org.opendaylight.yang.gen.v1.urn.opendaylight.alto.alto.host.tracker.impl.rev140528.modules.module.configuration.alto.host.tracker.impl.DataBroker>>, Augmentation<org.opendaylight.yang.gen.v1.urn.opendaylight.alto.alto.host.tracker.impl.rev140528.modules.module.configuration.alto.host.tracker.impl.DataBroker>> e = base.augmentation.entrySet().iterator().next();
- this.augmentation = Collections.<java.lang.Class<? extends Augmentation<org.opendaylight.yang.gen.v1.urn.opendaylight.alto.alto.host.tracker.impl.rev140528.modules.module.configuration.alto.host.tracker.impl.DataBroker>>, Augmentation<org.opendaylight.yang.gen.v1.urn.opendaylight.alto.alto.host.tracker.impl.rev140528.modules.module.configuration.alto.host.tracker.impl.DataBroker>>singletonMap(e.getKey(), e.getValue());
- break;
- default :
- this.augmentation = new HashMap<>(base.augmentation);
- }
- }
-
- @Override
- public java.lang.Object getName() {
- return _name;
- }
-
- @Override
- public java.lang.Class<? extends org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.controller.config.rev130405.ServiceType> getType() {
- return _type;
- }
-
- @SuppressWarnings("unchecked")
- @Override
- public <E extends Augmentation<org.opendaylight.yang.gen.v1.urn.opendaylight.alto.alto.host.tracker.impl.rev140528.modules.module.configuration.alto.host.tracker.impl.DataBroker>> E getAugmentation(java.lang.Class<E> augmentationType) {
- if (augmentationType == null) {
- throw new IllegalArgumentException("Augmentation Type reference cannot be NULL!");
- }
- return (E) augmentation.get(augmentationType);
- }
-
- @Override
- public int hashCode() {
- final int prime = 31;
- int result = 1;
- result = prime * result + ((_name == null) ? 0 : _name.hashCode());
- result = prime * result + ((_type == null) ? 0 : _type.hashCode());
- result = prime * result + ((augmentation == null) ? 0 : augmentation.hashCode());
- return result;
- }
-
- @Override
- public boolean equals(java.lang.Object obj) {
- if (this == obj) {
- return true;
- }
- if (!(obj instanceof DataObject)) {
- return false;
- }
- if (!org.opendaylight.yang.gen.v1.urn.opendaylight.alto.alto.host.tracker.impl.rev140528.modules.module.configuration.alto.host.tracker.impl.DataBroker.class.equals(((DataObject)obj).getImplementedInterface())) {
- return false;
- }
- org.opendaylight.yang.gen.v1.urn.opendaylight.alto.alto.host.tracker.impl.rev140528.modules.module.configuration.alto.host.tracker.impl.DataBroker other = (org.opendaylight.yang.gen.v1.urn.opendaylight.alto.alto.host.tracker.impl.rev140528.modules.module.configuration.alto.host.tracker.impl.DataBroker)obj;
- if (_name == null) {
- if (other.getName() != null) {
- return false;
- }
- } else if(!_name.equals(other.getName())) {
- return false;
- }
- if (_type == null) {
- if (other.getType() != null) {
- return false;
- }
- } else if(!_type.equals(other.getType())) {
- return false;
- }
- if (getClass() == obj.getClass()) {
- // Simple case: we are comparing against self
- DataBrokerImpl otherImpl = (DataBrokerImpl) obj;
- if (augmentation == null) {
- if (otherImpl.augmentation != null) {
- return false;
- }
- } else if(!augmentation.equals(otherImpl.augmentation)) {
- return false;
- }
- } else {
- // Hard case: compare our augments with presence there...
- for (Map.Entry<java.lang.Class<? extends Augmentation<org.opendaylight.yang.gen.v1.urn.opendaylight.alto.alto.host.tracker.impl.rev140528.modules.module.configuration.alto.host.tracker.impl.DataBroker>>, Augmentation<org.opendaylight.yang.gen.v1.urn.opendaylight.alto.alto.host.tracker.impl.rev140528.modules.module.configuration.alto.host.tracker.impl.DataBroker>> e : augmentation.entrySet()) {
- if (!e.getValue().equals(other.getAugmentation(e.getKey()))) {
- return false;
- }
- }
- // .. and give the other one the chance to do the same
- if (!obj.equals(this)) {
- return false;
- }
- }
- return true;
- }
-
- @Override
- public java.lang.String toString() {
- java.lang.StringBuilder builder = new java.lang.StringBuilder ("DataBroker [");
- boolean first = true;
-
- if (_name != null) {
- if (first) {
- first = false;
- } else {
- builder.append(", ");
- }
- builder.append("_name=");
- builder.append(_name);
- }
- if (_type != null) {
- if (first) {
- first = false;
- } else {
- builder.append(", ");
- }
- builder.append("_type=");
- builder.append(_type);
- }
- if (first) {
- first = false;
- } else {
- builder.append(", ");
- }
- builder.append("augmentation=");
- builder.append(augmentation.values());
- return builder.append(']').toString();
- }
- }
-
-}
+++ /dev/null
-package org.opendaylight.yang.gen.v1.urn.opendaylight.alto.hosttracker.rev150416;
-
-public final class $YangModelBindingProvider implements org.opendaylight.yangtools.yang.binding.YangModelBindingProvider {
-
- public org.opendaylight.yangtools.yang.binding.YangModuleInfo getModuleInfo() {
- return $YangModuleInfoImpl.getInstance();
- }
-}
+++ /dev/null
-package org.opendaylight.yang.gen.v1.urn.opendaylight.alto.hosttracker.rev150416 ;
-import org.opendaylight.yangtools.yang.binding.YangModuleInfo;
-import java.util.Set;
-import java.util.HashSet;
-import com.google.common.collect.ImmutableSet;
-import java.io.InputStream;
-import java.io.IOException;
-public final class $YangModuleInfoImpl implements YangModuleInfo {
-
- private static final YangModuleInfo INSTANCE = new $YangModuleInfoImpl();
-
- private final String name = "alto-hosttracker-cost-service";
- private final String namespace = "urn:opendaylight:alto:hosttracker";
- private final String revision = "2015-04-16";
- private final String resourcePath = "/META-INF/yang/alto-hosttracker-cost-service.yang";
-
- private final Set<YangModuleInfo> importedModules;
-
- public static YangModuleInfo getInstance() {
- return INSTANCE;
- }
-
- private $YangModuleInfoImpl() {
- Set<YangModuleInfo> set = new HashSet<>();
- set.add(org.opendaylight.yang.gen.v1.urn.ietf.params.xml.ns.yang.ietf.yang.types.rev130715.$YangModuleInfoImpl.getInstance());
- set.add(org.opendaylight.yang.gen.v1.urn.opendaylight.alto.service.types.rev150404.$YangModuleInfoImpl.getInstance());
- set.add(org.opendaylight.yang.gen.v1.urn.opendaylight.alto.rev150404.$YangModuleInfoImpl.getInstance());
- importedModules = ImmutableSet.copyOf(set);
-
- InputStream stream = $YangModuleInfoImpl.class.getResourceAsStream(resourcePath);
- if (stream == null) {
- throw new IllegalStateException("Resource '" + resourcePath + "' is missing");
- }
- try {
- stream.close();
- } catch (IOException e) {
- // Resource leak, but there is nothing we can do
- }
- }
-
- @Override
- public String getName() {
- return name;
- }
-
- @Override
- public String getRevision() {
- return revision;
- }
-
- @Override
- public String getNamespace() {
- return namespace;
- }
-
- @Override
- public InputStream getModuleSourceStream() throws IOException {
- InputStream stream = $YangModuleInfoImpl.class.getResourceAsStream(resourcePath);
- if (stream == null) {
- throw new IOException("Resource " + resourcePath + " is missing");
- }
- return stream;
- }
-
- @Override
- public Set<YangModuleInfo> getImportedModules() {
- return importedModules;
- }
-
- @Override
- public String toString() {
- StringBuilder sb = new StringBuilder(this.getClass().getCanonicalName());
- sb.append("[");
- sb.append("name = " + name);
- sb.append(", namespace = " + namespace);
- sb.append(", revision = " + revision);
- sb.append(", resourcePath = " + resourcePath);
- sb.append(", imports = " + importedModules);
- sb.append("]");
- return sb.toString();
- }
-
-
-}
+++ /dev/null
-package org.opendaylight.yang.gen.v1.urn.opendaylight.alto.hosttracker.rev150416;
-import org.opendaylight.yangtools.yang.common.QName;
-import org.opendaylight.yangtools.yang.binding.DataObject;
-
-
-/**
- * cost set in hosttracker
- *
- * <p>This class represents the following YANG schema fragment defined in module <b>alto-hosttracker-cost-service</b>
- * <br>(Source path: <i>META-INF/yang/alto-hosttracker-cost-service.yang</i>):
- * <pre>
- * grouping cost {
- * leaf cost-value {
- * type int32;
- * }
- * }
- * </pre>
- * The schema path to identify an instance is
- * <i>alto-hosttracker-cost-service/cost</i>
- *
- */
-public interface Cost
- extends
- DataObject
-{
-
-
-
- public static final QName QNAME = org.opendaylight.yangtools.yang.common.QName.cachedReference(org.opendaylight.yangtools.yang.common.QName.create("urn:opendaylight:alto:hosttracker","2015-04-16","cost"));
-
- java.lang.Integer getCostValue();
-
-}
-
+++ /dev/null
-package org.opendaylight.yang.gen.v1.urn.opendaylight.alto.hosttracker.rev150416;
-import org.opendaylight.yangtools.yang.binding.DataObject;
-import org.opendaylight.yang.gen.v1.urn.opendaylight.alto.rev150404.cost.map.map.DstCosts;
-import org.opendaylight.yangtools.yang.binding.Augmentation;
-
-
-public interface DstCosts1
- extends
- DataObject,
- Augmentation<DstCosts>
-{
-
-
-
-
- java.lang.Integer getCostInHosttracker();
-
-}
-
+++ /dev/null
-package org.opendaylight.yang.gen.v1.urn.opendaylight.alto.hosttracker.rev150416;
-import org.opendaylight.yangtools.yang.binding.DataObject;
-import org.opendaylight.yangtools.concepts.Builder;
-
-
-/**
- * Class that builds {@link org.opendaylight.yang.gen.v1.urn.opendaylight.alto.hosttracker.rev150416.DstCosts1} instances.
- *
- * @see org.opendaylight.yang.gen.v1.urn.opendaylight.alto.hosttracker.rev150416.DstCosts1
- *
- */
-public class DstCosts1Builder implements Builder <org.opendaylight.yang.gen.v1.urn.opendaylight.alto.hosttracker.rev150416.DstCosts1> {
-
- private java.lang.Integer _costInHosttracker;
-
-
- public DstCosts1Builder() {
- }
-
- public DstCosts1Builder(DstCosts1 base) {
- this._costInHosttracker = base.getCostInHosttracker();
- }
-
-
- public java.lang.Integer getCostInHosttracker() {
- return _costInHosttracker;
- }
-
- public DstCosts1Builder setCostInHosttracker(java.lang.Integer value) {
- this._costInHosttracker = value;
- return this;
- }
-
- public DstCosts1 build() {
- return new DstCosts1Impl(this);
- }
-
- private static final class DstCosts1Impl implements DstCosts1 {
-
- public java.lang.Class<org.opendaylight.yang.gen.v1.urn.opendaylight.alto.hosttracker.rev150416.DstCosts1> getImplementedInterface() {
- return org.opendaylight.yang.gen.v1.urn.opendaylight.alto.hosttracker.rev150416.DstCosts1.class;
- }
-
- private final java.lang.Integer _costInHosttracker;
-
-
- private DstCosts1Impl(DstCosts1Builder base) {
- this._costInHosttracker = base.getCostInHosttracker();
- }
-
- @Override
- public java.lang.Integer getCostInHosttracker() {
- return _costInHosttracker;
- }
-
- @Override
- public int hashCode() {
- final int prime = 31;
- int result = 1;
- result = prime * result + ((_costInHosttracker == null) ? 0 : _costInHosttracker.hashCode());
- return result;
- }
-
- @Override
- public boolean equals(java.lang.Object obj) {
- if (this == obj) {
- return true;
- }
- if (!(obj instanceof DataObject)) {
- return false;
- }
- if (!org.opendaylight.yang.gen.v1.urn.opendaylight.alto.hosttracker.rev150416.DstCosts1.class.equals(((DataObject)obj).getImplementedInterface())) {
- return false;
- }
- org.opendaylight.yang.gen.v1.urn.opendaylight.alto.hosttracker.rev150416.DstCosts1 other = (org.opendaylight.yang.gen.v1.urn.opendaylight.alto.hosttracker.rev150416.DstCosts1)obj;
- if (_costInHosttracker == null) {
- if (other.getCostInHosttracker() != null) {
- return false;
- }
- } else if(!_costInHosttracker.equals(other.getCostInHosttracker())) {
- return false;
- }
- return true;
- }
-
- @Override
- public java.lang.String toString() {
- java.lang.StringBuilder builder = new java.lang.StringBuilder ("DstCosts1 [");
- boolean first = true;
-
- if (_costInHosttracker != null) {
- if (first) {
- first = false;
- } else {
- builder.append(", ");
- }
- builder.append("_costInHosttracker=");
- builder.append(_costInHosttracker);
- }
- return builder.append(']').toString();
- }
- }
-
-}
</dependency>
<dependency>
- <groupId>org.opendaylight.controller</groupId>
- <artifactId>commons.northbound</artifactId>
- <version>${controller.commons.northbound.version}</version>
+ <groupId>javax.servlet</groupId>
+ <artifactId>javax.servlet-api</artifactId>
+ <version>${servlet.version}</version>
</dependency>
<dependency>
private void checkCostRequest(HttpServletRequest httpRequest, RFC7285Endpoint.CostRequest request) throws AltoBadFormatException {
checkCostType(request.costType);
- checkEndponints(httpRequest, request.endpoints);
+ checkEndpoints(httpRequest, request.endpoints);
}
private void checkCostMapFilter(RFC7285CostMap.Filter filter) throws AltoBadFormatException {
checkConstraints(filter.constraints);
}
- private void checkEndponints(HttpServletRequest httpRequest, RFC7285QueryPairs endpoints) {
+ private void checkEndpoints(HttpServletRequest httpRequest, RFC7285QueryPairs endpoints) {
+ /*
+ * See https://tools.ietf.org/html/rfc7285#section-11.5.1.3
+ * */
String ipAddress = getClientIpAddress(httpRequest);
+ if ((endpoints.src.size() == 0) && (endpoints.dst.size() == 0)) {
+ throw new AltoBadFormatException("E_INVALID_FIELD_VALUE", "endpoints", "");
+ }
+
if (endpoints.src.size() == 0) {
endpoints.src.add(ipAddress);
}
NodeId srcNodeId = new NodeId(swSrcId);
NodeId dstNodeId = new NodeId(swDstId);
Number number = shortestPath.getDistance(srcNodeId, dstNodeId);
- DstCosts1 dst1 = null;
- if (number != null) {
- dst1 = new DstCosts1Builder().setCostDefault(
- Integer.toString(number.intValue())).build();
- } else {
- dst1 = new DstCosts1Builder().setCostDefault(
- Integer.toString(Integer.MAX_VALUE)).build();
+ if (number == null) {
+ number = Integer.MAX_VALUE;
}
+ DstCosts1 dst1 = new DstCosts1Builder()
+ .setCostDefault(new Integer(number.intValue()).toString()).build();
DstCosts dstCost = new DstCostsBuilder()
.addAugmentation(DstCosts1.class, dst1).setDst(teaDst)
.build();
PidName dstPid = dstPids.get(dst);
String cost = getCostDefault(srcPid, dstPid, costMaps);
if (cost != null) {
- DstCosts1 dstCost1 = new DstCosts1Builder().setCostDefault(
- cost).build();
+ DstCosts1 dstCost1 = new DstCosts1Builder()
+ .setCostDefault(cost).build();
DstCosts dstCosts = new DstCostsBuilder()
.setDst(dst)
.setKey(new org.opendaylight.yang.gen.v1.urn.opendaylight.alto.rev150404.endpoint.cost.service.output.endpoint.cost.service.endpoint.cost.map.DstCostsKey(
+++ /dev/null
-package org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.controller.config.alto.provider.impl.rev141119;
-
-public final class $YangModelBindingProvider implements org.opendaylight.yangtools.yang.binding.YangModelBindingProvider {
-
- public org.opendaylight.yangtools.yang.binding.YangModuleInfo getModuleInfo() {
- return $YangModuleInfoImpl.getInstance();
- }
-}
+++ /dev/null
-package org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.controller.config.alto.provider.impl.rev141119 ;
-import org.opendaylight.yangtools.yang.binding.YangModuleInfo;
-import java.util.Set;
-import java.util.HashSet;
-import com.google.common.collect.ImmutableSet;
-import java.io.InputStream;
-import java.io.IOException;
-public final class $YangModuleInfoImpl implements YangModuleInfo {
-
- private static final YangModuleInfo INSTANCE = new $YangModuleInfoImpl();
-
- private final String name = "alto-provider-impl";
- private final String namespace = "urn:opendaylight:params:xml:ns:yang:controller:config:alto-provider:impl";
- private final String revision = "2014-11-19";
- private final String resourcePath = "/META-INF/yang/alto-provider-impl.yang";
-
- private final Set<YangModuleInfo> importedModules;
-
- public static YangModuleInfo getInstance() {
- return INSTANCE;
- }
-
- private $YangModuleInfoImpl() {
- Set<YangModuleInfo> set = new HashSet<>();
- set.add(org.opendaylight.yang.gen.v1.urn.ietf.params.xml.ns.yang.rpc.context.rev130617.$YangModuleInfoImpl.getInstance());
- set.add(org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.controller.md.sal.binding.rev131028.$YangModuleInfoImpl.getInstance());
- set.add(org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.controller.config.rev130405.$YangModuleInfoImpl.getInstance());
- importedModules = ImmutableSet.copyOf(set);
-
- InputStream stream = $YangModuleInfoImpl.class.getResourceAsStream(resourcePath);
- if (stream == null) {
- throw new IllegalStateException("Resource '" + resourcePath + "' is missing");
- }
- try {
- stream.close();
- } catch (IOException e) {
- // Resource leak, but there is nothing we can do
- }
- }
-
- @Override
- public String getName() {
- return name;
- }
-
- @Override
- public String getRevision() {
- return revision;
- }
-
- @Override
- public String getNamespace() {
- return namespace;
- }
-
- @Override
- public InputStream getModuleSourceStream() throws IOException {
- InputStream stream = $YangModuleInfoImpl.class.getResourceAsStream(resourcePath);
- if (stream == null) {
- throw new IOException("Resource " + resourcePath + " is missing");
- }
- return stream;
- }
-
- @Override
- public Set<YangModuleInfo> getImportedModules() {
- return importedModules;
- }
-
- @Override
- public String toString() {
- StringBuilder sb = new StringBuilder(this.getClass().getCanonicalName());
- sb.append("[");
- sb.append("name = " + name);
- sb.append(", namespace = " + namespace);
- sb.append(", revision = " + revision);
- sb.append(", resourcePath = " + resourcePath);
- sb.append(", imports = " + importedModules);
- sb.append("]");
- return sb.toString();
- }
-
-
-}
+++ /dev/null
-package org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.controller.config.alto.provider.impl.rev141119;
-import org.opendaylight.yangtools.yang.common.QName;
-import org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.controller.config.rev130405.ModuleType;
-
-
-/**
- * <p>This class represents the following YANG schema fragment defined in module <b>alto-provider-impl</b>
- * <br>(Source path: <i>META-INF/yang/alto-provider-impl.yang</i>):
- * <pre>
- * identity alto-provider-impl {
- * base "()IdentitySchemaNodeImpl[base=null, qname=(urn:opendaylight:params:xml:ns:yang:controller:config?revision=2013-04-05)module-type]";
- * status CURRENT;
- * }
- * </pre>
- * The schema path to identify an instance is
- * <i>alto-provider-impl/alto-provider-impl</i>
- *
- */
-public abstract class AltoProviderImpl extends ModuleType
- {
- public static final QName QNAME = org.opendaylight.yangtools.yang.common.QName.cachedReference(org.opendaylight.yangtools.yang.common.QName.create("urn:opendaylight:params:xml:ns:yang:controller:config:alto-provider:impl","2014-11-19","alto-provider-impl"));
-
- public AltoProviderImpl() {
-
-
- }
-
-
-
-
-
-
-
-
-
-
-}
-
+++ /dev/null
-package org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.controller.config.alto.provider.impl.rev141119.modules.module.configuration;
-import org.opendaylight.yangtools.yang.common.QName;
-import org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.controller.config.alto.provider.impl.rev141119.modules.module.configuration.alto.provider.impl.RpcRegistry;
-import org.opendaylight.yangtools.yang.binding.DataObject;
-import org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.controller.config.alto.provider.impl.rev141119.modules.module.configuration.alto.provider.impl.DataBroker;
-import org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.controller.config.rev130405.modules.module.Configuration;
-import org.opendaylight.yangtools.yang.binding.Augmentable;
-
-
-/**
- * <p>This class represents the following YANG schema fragment defined in module <b>alto-provider-impl</b>
- * <br>(Source path: <i>META-INF/yang/alto-provider-impl.yang</i>):
- * <pre>
- * case alto-provider-impl {
- * container rpc-registry {
- * leaf type {
- * type leafref;
- * }
- * leaf name {
- * type leafref;
- * }
- * uses service-ref {
- * refine (urn:opendaylight:params:xml:ns:yang:controller:config:alto-provider:impl?revision=2014-11-19)type {
- * leaf type {
- * type leafref;
- * }
- * }
- * }
- * }
- * container data-broker {
- * leaf type {
- * type leafref;
- * }
- * leaf name {
- * type leafref;
- * }
- * uses service-ref {
- * refine (urn:opendaylight:params:xml:ns:yang:controller:config:alto-provider:impl?revision=2014-11-19)type {
- * leaf type {
- * type leafref;
- * }
- * }
- * }
- * }
- * }
- * </pre>
- * The schema path to identify an instance is
- * <i>alto-provider-impl/modules/module/configuration/(urn:opendaylight:params:xml:ns:yang:controller:config:alto-provider:impl?revision=2014-11-19)alto-provider-impl</i>
- *
- */
-public interface AltoProviderImpl
- extends
- DataObject,
- Augmentable<org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.controller.config.alto.provider.impl.rev141119.modules.module.configuration.AltoProviderImpl>,
- Configuration
-{
-
-
-
- public static final QName QNAME = org.opendaylight.yangtools.yang.common.QName.cachedReference(org.opendaylight.yangtools.yang.common.QName.create("urn:opendaylight:params:xml:ns:yang:controller:config:alto-provider:impl","2014-11-19","alto-provider-impl"));
-
- RpcRegistry getRpcRegistry();
-
- DataBroker getDataBroker();
-
-}
-
+++ /dev/null
-package org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.controller.config.alto.provider.impl.rev141119.modules.module.configuration;
-import java.util.Collections;
-import java.util.Map;
-import org.opendaylight.yangtools.yang.binding.DataObject;
-import org.opendaylight.yangtools.yang.binding.AugmentationHolder;
-import java.util.HashMap;
-import org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.controller.config.alto.provider.impl.rev141119.modules.module.configuration.alto.provider.impl.RpcRegistry;
-import org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.controller.config.alto.provider.impl.rev141119.modules.module.configuration.alto.provider.impl.DataBroker;
-import org.opendaylight.yangtools.concepts.Builder;
-import org.opendaylight.yangtools.yang.binding.Augmentation;
-
-
-/**
- * Class that builds {@link org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.controller.config.alto.provider.impl.rev141119.modules.module.configuration.AltoProviderImpl} instances.
- *
- * @see org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.controller.config.alto.provider.impl.rev141119.modules.module.configuration.AltoProviderImpl
- *
- */
-public class AltoProviderImplBuilder implements Builder <org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.controller.config.alto.provider.impl.rev141119.modules.module.configuration.AltoProviderImpl> {
-
- private DataBroker _dataBroker;
- private RpcRegistry _rpcRegistry;
-
- Map<java.lang.Class<? extends Augmentation<org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.controller.config.alto.provider.impl.rev141119.modules.module.configuration.AltoProviderImpl>>, Augmentation<org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.controller.config.alto.provider.impl.rev141119.modules.module.configuration.AltoProviderImpl>> augmentation = new HashMap<>();
-
- public AltoProviderImplBuilder() {
- }
-
- public AltoProviderImplBuilder(AltoProviderImpl base) {
- this._dataBroker = base.getDataBroker();
- this._rpcRegistry = base.getRpcRegistry();
- if (base instanceof AltoProviderImplImpl) {
- AltoProviderImplImpl impl = (AltoProviderImplImpl) base;
- this.augmentation = new HashMap<>(impl.augmentation);
- } else if (base instanceof AugmentationHolder) {
- @SuppressWarnings("unchecked")
- AugmentationHolder<org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.controller.config.alto.provider.impl.rev141119.modules.module.configuration.AltoProviderImpl> casted =(AugmentationHolder<org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.controller.config.alto.provider.impl.rev141119.modules.module.configuration.AltoProviderImpl>) base;
- this.augmentation = new HashMap<>(casted.augmentations());
- }
- }
-
-
- public DataBroker getDataBroker() {
- return _dataBroker;
- }
-
- public RpcRegistry getRpcRegistry() {
- return _rpcRegistry;
- }
-
- @SuppressWarnings("unchecked")
- public <E extends Augmentation<org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.controller.config.alto.provider.impl.rev141119.modules.module.configuration.AltoProviderImpl>> E getAugmentation(java.lang.Class<E> augmentationType) {
- if (augmentationType == null) {
- throw new IllegalArgumentException("Augmentation Type reference cannot be NULL!");
- }
- return (E) augmentation.get(augmentationType);
- }
-
- public AltoProviderImplBuilder setDataBroker(DataBroker value) {
- this._dataBroker = value;
- return this;
- }
-
- public AltoProviderImplBuilder setRpcRegistry(RpcRegistry value) {
- this._rpcRegistry = value;
- return this;
- }
-
- public AltoProviderImplBuilder addAugmentation(java.lang.Class<? extends Augmentation<org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.controller.config.alto.provider.impl.rev141119.modules.module.configuration.AltoProviderImpl>> augmentationType, Augmentation<org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.controller.config.alto.provider.impl.rev141119.modules.module.configuration.AltoProviderImpl> augmentation) {
- if (augmentation == null) {
- return removeAugmentation(augmentationType);
- }
- this.augmentation.put(augmentationType, augmentation);
- return this;
- }
-
- public AltoProviderImplBuilder removeAugmentation(java.lang.Class<? extends Augmentation<org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.controller.config.alto.provider.impl.rev141119.modules.module.configuration.AltoProviderImpl>> augmentationType) {
- this.augmentation.remove(augmentationType);
- return this;
- }
-
- public AltoProviderImpl build() {
- return new AltoProviderImplImpl(this);
- }
-
- private static final class AltoProviderImplImpl implements AltoProviderImpl {
-
- public java.lang.Class<org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.controller.config.alto.provider.impl.rev141119.modules.module.configuration.AltoProviderImpl> getImplementedInterface() {
- return org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.controller.config.alto.provider.impl.rev141119.modules.module.configuration.AltoProviderImpl.class;
- }
-
- private final DataBroker _dataBroker;
- private final RpcRegistry _rpcRegistry;
-
- private Map<java.lang.Class<? extends Augmentation<org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.controller.config.alto.provider.impl.rev141119.modules.module.configuration.AltoProviderImpl>>, Augmentation<org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.controller.config.alto.provider.impl.rev141119.modules.module.configuration.AltoProviderImpl>> augmentation = new HashMap<>();
-
- private AltoProviderImplImpl(AltoProviderImplBuilder base) {
- this._dataBroker = base.getDataBroker();
- this._rpcRegistry = base.getRpcRegistry();
- switch (base.augmentation.size()) {
- case 0:
- this.augmentation = Collections.emptyMap();
- break;
- case 1:
- final Map.Entry<java.lang.Class<? extends Augmentation<org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.controller.config.alto.provider.impl.rev141119.modules.module.configuration.AltoProviderImpl>>, Augmentation<org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.controller.config.alto.provider.impl.rev141119.modules.module.configuration.AltoProviderImpl>> e = base.augmentation.entrySet().iterator().next();
- this.augmentation = Collections.<java.lang.Class<? extends Augmentation<org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.controller.config.alto.provider.impl.rev141119.modules.module.configuration.AltoProviderImpl>>, Augmentation<org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.controller.config.alto.provider.impl.rev141119.modules.module.configuration.AltoProviderImpl>>singletonMap(e.getKey(), e.getValue());
- break;
- default :
- this.augmentation = new HashMap<>(base.augmentation);
- }
- }
-
- @Override
- public DataBroker getDataBroker() {
- return _dataBroker;
- }
-
- @Override
- public RpcRegistry getRpcRegistry() {
- return _rpcRegistry;
- }
-
- @SuppressWarnings("unchecked")
- @Override
- public <E extends Augmentation<org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.controller.config.alto.provider.impl.rev141119.modules.module.configuration.AltoProviderImpl>> E getAugmentation(java.lang.Class<E> augmentationType) {
- if (augmentationType == null) {
- throw new IllegalArgumentException("Augmentation Type reference cannot be NULL!");
- }
- return (E) augmentation.get(augmentationType);
- }
-
- @Override
- public int hashCode() {
- final int prime = 31;
- int result = 1;
- result = prime * result + ((_dataBroker == null) ? 0 : _dataBroker.hashCode());
- result = prime * result + ((_rpcRegistry == null) ? 0 : _rpcRegistry.hashCode());
- result = prime * result + ((augmentation == null) ? 0 : augmentation.hashCode());
- return result;
- }
-
- @Override
- public boolean equals(java.lang.Object obj) {
- if (this == obj) {
- return true;
- }
- if (!(obj instanceof DataObject)) {
- return false;
- }
- if (!org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.controller.config.alto.provider.impl.rev141119.modules.module.configuration.AltoProviderImpl.class.equals(((DataObject)obj).getImplementedInterface())) {
- return false;
- }
- org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.controller.config.alto.provider.impl.rev141119.modules.module.configuration.AltoProviderImpl other = (org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.controller.config.alto.provider.impl.rev141119.modules.module.configuration.AltoProviderImpl)obj;
- if (_dataBroker == null) {
- if (other.getDataBroker() != null) {
- return false;
- }
- } else if(!_dataBroker.equals(other.getDataBroker())) {
- return false;
- }
- if (_rpcRegistry == null) {
- if (other.getRpcRegistry() != null) {
- return false;
- }
- } else if(!_rpcRegistry.equals(other.getRpcRegistry())) {
- return false;
- }
- if (getClass() == obj.getClass()) {
- // Simple case: we are comparing against self
- AltoProviderImplImpl otherImpl = (AltoProviderImplImpl) obj;
- if (augmentation == null) {
- if (otherImpl.augmentation != null) {
- return false;
- }
- } else if(!augmentation.equals(otherImpl.augmentation)) {
- return false;
- }
- } else {
- // Hard case: compare our augments with presence there...
- for (Map.Entry<java.lang.Class<? extends Augmentation<org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.controller.config.alto.provider.impl.rev141119.modules.module.configuration.AltoProviderImpl>>, Augmentation<org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.controller.config.alto.provider.impl.rev141119.modules.module.configuration.AltoProviderImpl>> e : augmentation.entrySet()) {
- if (!e.getValue().equals(other.getAugmentation(e.getKey()))) {
- return false;
- }
- }
- // .. and give the other one the chance to do the same
- if (!obj.equals(this)) {
- return false;
- }
- }
- return true;
- }
-
- @Override
- public java.lang.String toString() {
- java.lang.StringBuilder builder = new java.lang.StringBuilder ("AltoProviderImpl [");
- boolean first = true;
-
- if (_dataBroker != null) {
- if (first) {
- first = false;
- } else {
- builder.append(", ");
- }
- builder.append("_dataBroker=");
- builder.append(_dataBroker);
- }
- if (_rpcRegistry != null) {
- if (first) {
- first = false;
- } else {
- builder.append(", ");
- }
- builder.append("_rpcRegistry=");
- builder.append(_rpcRegistry);
- }
- if (first) {
- first = false;
- } else {
- builder.append(", ");
- }
- builder.append("augmentation=");
- builder.append(augmentation.values());
- return builder.append(']').toString();
- }
- }
-
-}
+++ /dev/null
-package org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.controller.config.alto.provider.impl.rev141119.modules.module.configuration.alto.provider.impl;
-import org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.controller.config.rev130405.ServiceRef;
-import org.opendaylight.yangtools.yang.common.QName;
-import org.opendaylight.yangtools.yang.binding.ChildOf;
-import org.opendaylight.yangtools.yang.binding.Augmentable;
-import org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.controller.config.rev130405.modules.Module;
-
-
-/**
- * <p>This class represents the following YANG schema fragment defined in module <b>alto-provider-impl</b>
- * <br>(Source path: <i>META-INF/yang/alto-provider-impl.yang</i>):
- * <pre>
- * container data-broker {
- * leaf type {
- * type leafref;
- * }
- * leaf name {
- * type leafref;
- * }
- * uses service-ref {
- * refine (urn:opendaylight:params:xml:ns:yang:controller:config:alto-provider:impl?revision=2014-11-19)type {
- * leaf type {
- * type leafref;
- * }
- * }
- * }
- * }
- * </pre>
- * The schema path to identify an instance is
- * <i>alto-provider-impl/modules/module/configuration/(urn:opendaylight:params:xml:ns:yang:controller:config:alto-provider:impl?revision=2014-11-19)alto-provider-impl/data-broker</i>
- *
- * <p>To create instances of this class use {@link org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.controller.config.alto.provider.impl.rev141119.modules.module.configuration.alto.provider.impl.DataBrokerBuilder}.
- * @see org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.controller.config.alto.provider.impl.rev141119.modules.module.configuration.alto.provider.impl.DataBrokerBuilder
- *
- */
-public interface DataBroker
- extends
- ChildOf<Module>,
- Augmentable<org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.controller.config.alto.provider.impl.rev141119.modules.module.configuration.alto.provider.impl.DataBroker>,
- ServiceRef
-{
-
-
-
- public static final QName QNAME = org.opendaylight.yangtools.yang.common.QName.cachedReference(org.opendaylight.yangtools.yang.common.QName.create("urn:opendaylight:params:xml:ns:yang:controller:config:alto-provider:impl","2014-11-19","data-broker"));
-
-
-}
-
+++ /dev/null
-package org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.controller.config.alto.provider.impl.rev141119.modules.module.configuration.alto.provider.impl;
-import java.util.Collections;
-import java.util.Map;
-import org.opendaylight.yangtools.yang.binding.DataObject;
-import org.opendaylight.yangtools.yang.binding.AugmentationHolder;
-import java.util.HashMap;
-import org.opendaylight.yangtools.concepts.Builder;
-import org.opendaylight.yangtools.yang.binding.Augmentation;
-
-
-/**
- * Class that builds {@link org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.controller.config.alto.provider.impl.rev141119.modules.module.configuration.alto.provider.impl.DataBroker} instances.
- *
- * @see org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.controller.config.alto.provider.impl.rev141119.modules.module.configuration.alto.provider.impl.DataBroker
- *
- */
-public class DataBrokerBuilder implements Builder <org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.controller.config.alto.provider.impl.rev141119.modules.module.configuration.alto.provider.impl.DataBroker> {
-
- private java.lang.Object _name;
- private java.lang.Class<? extends org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.controller.config.rev130405.ServiceType> _type;
-
- Map<java.lang.Class<? extends Augmentation<org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.controller.config.alto.provider.impl.rev141119.modules.module.configuration.alto.provider.impl.DataBroker>>, Augmentation<org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.controller.config.alto.provider.impl.rev141119.modules.module.configuration.alto.provider.impl.DataBroker>> augmentation = new HashMap<>();
-
- public DataBrokerBuilder() {
- }
- public DataBrokerBuilder(org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.controller.config.rev130405.ServiceRef arg) {
- this._type = arg.getType();
- this._name = arg.getName();
- }
-
- public DataBrokerBuilder(DataBroker base) {
- this._name = base.getName();
- this._type = base.getType();
- if (base instanceof DataBrokerImpl) {
- DataBrokerImpl impl = (DataBrokerImpl) base;
- this.augmentation = new HashMap<>(impl.augmentation);
- } else if (base instanceof AugmentationHolder) {
- @SuppressWarnings("unchecked")
- AugmentationHolder<org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.controller.config.alto.provider.impl.rev141119.modules.module.configuration.alto.provider.impl.DataBroker> casted =(AugmentationHolder<org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.controller.config.alto.provider.impl.rev141119.modules.module.configuration.alto.provider.impl.DataBroker>) base;
- this.augmentation = new HashMap<>(casted.augmentations());
- }
- }
-
- /**
- *Set fields from given grouping argument. Valid argument is instance of one of following types:
- * <ul>
- * <li>org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.controller.config.rev130405.ServiceRef</li>
- * </ul>
- *
- * @param arg grouping object
- * @throws IllegalArgumentException if given argument is none of valid types
- */
- public void fieldsFrom(DataObject arg) {
- boolean isValidArg = false;
- if (arg instanceof org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.controller.config.rev130405.ServiceRef) {
- this._type = ((org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.controller.config.rev130405.ServiceRef)arg).getType();
- this._name = ((org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.controller.config.rev130405.ServiceRef)arg).getName();
- isValidArg = true;
- }
- if (!isValidArg) {
- throw new IllegalArgumentException(
- "expected one of: [org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.controller.config.rev130405.ServiceRef] \n" +
- "but was: " + arg
- );
- }
- }
-
- public java.lang.Object getName() {
- return _name;
- }
-
- public java.lang.Class<? extends org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.controller.config.rev130405.ServiceType> getType() {
- return _type;
- }
-
- @SuppressWarnings("unchecked")
- public <E extends Augmentation<org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.controller.config.alto.provider.impl.rev141119.modules.module.configuration.alto.provider.impl.DataBroker>> E getAugmentation(java.lang.Class<E> augmentationType) {
- if (augmentationType == null) {
- throw new IllegalArgumentException("Augmentation Type reference cannot be NULL!");
- }
- return (E) augmentation.get(augmentationType);
- }
-
- public DataBrokerBuilder setName(java.lang.Object value) {
- this._name = value;
- return this;
- }
-
- public DataBrokerBuilder setType(java.lang.Class<? extends org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.controller.config.rev130405.ServiceType> value) {
- this._type = value;
- return this;
- }
-
- public DataBrokerBuilder addAugmentation(java.lang.Class<? extends Augmentation<org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.controller.config.alto.provider.impl.rev141119.modules.module.configuration.alto.provider.impl.DataBroker>> augmentationType, Augmentation<org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.controller.config.alto.provider.impl.rev141119.modules.module.configuration.alto.provider.impl.DataBroker> augmentation) {
- if (augmentation == null) {
- return removeAugmentation(augmentationType);
- }
- this.augmentation.put(augmentationType, augmentation);
- return this;
- }
-
- public DataBrokerBuilder removeAugmentation(java.lang.Class<? extends Augmentation<org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.controller.config.alto.provider.impl.rev141119.modules.module.configuration.alto.provider.impl.DataBroker>> augmentationType) {
- this.augmentation.remove(augmentationType);
- return this;
- }
-
- public DataBroker build() {
- return new DataBrokerImpl(this);
- }
-
- private static final class DataBrokerImpl implements DataBroker {
-
- public java.lang.Class<org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.controller.config.alto.provider.impl.rev141119.modules.module.configuration.alto.provider.impl.DataBroker> getImplementedInterface() {
- return org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.controller.config.alto.provider.impl.rev141119.modules.module.configuration.alto.provider.impl.DataBroker.class;
- }
-
- private final java.lang.Object _name;
- private final java.lang.Class<? extends org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.controller.config.rev130405.ServiceType> _type;
-
- private Map<java.lang.Class<? extends Augmentation<org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.controller.config.alto.provider.impl.rev141119.modules.module.configuration.alto.provider.impl.DataBroker>>, Augmentation<org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.controller.config.alto.provider.impl.rev141119.modules.module.configuration.alto.provider.impl.DataBroker>> augmentation = new HashMap<>();
-
- private DataBrokerImpl(DataBrokerBuilder base) {
- this._name = base.getName();
- this._type = base.getType();
- switch (base.augmentation.size()) {
- case 0:
- this.augmentation = Collections.emptyMap();
- break;
- case 1:
- final Map.Entry<java.lang.Class<? extends Augmentation<org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.controller.config.alto.provider.impl.rev141119.modules.module.configuration.alto.provider.impl.DataBroker>>, Augmentation<org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.controller.config.alto.provider.impl.rev141119.modules.module.configuration.alto.provider.impl.DataBroker>> e = base.augmentation.entrySet().iterator().next();
- this.augmentation = Collections.<java.lang.Class<? extends Augmentation<org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.controller.config.alto.provider.impl.rev141119.modules.module.configuration.alto.provider.impl.DataBroker>>, Augmentation<org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.controller.config.alto.provider.impl.rev141119.modules.module.configuration.alto.provider.impl.DataBroker>>singletonMap(e.getKey(), e.getValue());
- break;
- default :
- this.augmentation = new HashMap<>(base.augmentation);
- }
- }
-
- @Override
- public java.lang.Object getName() {
- return _name;
- }
-
- @Override
- public java.lang.Class<? extends org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.controller.config.rev130405.ServiceType> getType() {
- return _type;
- }
-
- @SuppressWarnings("unchecked")
- @Override
- public <E extends Augmentation<org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.controller.config.alto.provider.impl.rev141119.modules.module.configuration.alto.provider.impl.DataBroker>> E getAugmentation(java.lang.Class<E> augmentationType) {
- if (augmentationType == null) {
- throw new IllegalArgumentException("Augmentation Type reference cannot be NULL!");
- }
- return (E) augmentation.get(augmentationType);
- }
-
- @Override
- public int hashCode() {
- final int prime = 31;
- int result = 1;
- result = prime * result + ((_name == null) ? 0 : _name.hashCode());
- result = prime * result + ((_type == null) ? 0 : _type.hashCode());
- result = prime * result + ((augmentation == null) ? 0 : augmentation.hashCode());
- return result;
- }
-
- @Override
- public boolean equals(java.lang.Object obj) {
- if (this == obj) {
- return true;
- }
- if (!(obj instanceof DataObject)) {
- return false;
- }
- if (!org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.controller.config.alto.provider.impl.rev141119.modules.module.configuration.alto.provider.impl.DataBroker.class.equals(((DataObject)obj).getImplementedInterface())) {
- return false;
- }
- org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.controller.config.alto.provider.impl.rev141119.modules.module.configuration.alto.provider.impl.DataBroker other = (org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.controller.config.alto.provider.impl.rev141119.modules.module.configuration.alto.provider.impl.DataBroker)obj;
- if (_name == null) {
- if (other.getName() != null) {
- return false;
- }
- } else if(!_name.equals(other.getName())) {
- return false;
- }
- if (_type == null) {
- if (other.getType() != null) {
- return false;
- }
- } else if(!_type.equals(other.getType())) {
- return false;
- }
- if (getClass() == obj.getClass()) {
- // Simple case: we are comparing against self
- DataBrokerImpl otherImpl = (DataBrokerImpl) obj;
- if (augmentation == null) {
- if (otherImpl.augmentation != null) {
- return false;
- }
- } else if(!augmentation.equals(otherImpl.augmentation)) {
- return false;
- }
- } else {
- // Hard case: compare our augments with presence there...
- for (Map.Entry<java.lang.Class<? extends Augmentation<org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.controller.config.alto.provider.impl.rev141119.modules.module.configuration.alto.provider.impl.DataBroker>>, Augmentation<org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.controller.config.alto.provider.impl.rev141119.modules.module.configuration.alto.provider.impl.DataBroker>> e : augmentation.entrySet()) {
- if (!e.getValue().equals(other.getAugmentation(e.getKey()))) {
- return false;
- }
- }
- // .. and give the other one the chance to do the same
- if (!obj.equals(this)) {
- return false;
- }
- }
- return true;
- }
-
- @Override
- public java.lang.String toString() {
- java.lang.StringBuilder builder = new java.lang.StringBuilder ("DataBroker [");
- boolean first = true;
-
- if (_name != null) {
- if (first) {
- first = false;
- } else {
- builder.append(", ");
- }
- builder.append("_name=");
- builder.append(_name);
- }
- if (_type != null) {
- if (first) {
- first = false;
- } else {
- builder.append(", ");
- }
- builder.append("_type=");
- builder.append(_type);
- }
- if (first) {
- first = false;
- } else {
- builder.append(", ");
- }
- builder.append("augmentation=");
- builder.append(augmentation.values());
- return builder.append(']').toString();
- }
- }
-
-}
+++ /dev/null
-package org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.controller.config.alto.provider.impl.rev141119.modules.module.configuration.alto.provider.impl;
-import org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.controller.config.rev130405.ServiceRef;
-import org.opendaylight.yangtools.yang.common.QName;
-import org.opendaylight.yangtools.yang.binding.ChildOf;
-import org.opendaylight.yangtools.yang.binding.Augmentable;
-import org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.controller.config.rev130405.modules.Module;
-
-
-/**
- * <p>This class represents the following YANG schema fragment defined in module <b>alto-provider-impl</b>
- * <br>(Source path: <i>META-INF/yang/alto-provider-impl.yang</i>):
- * <pre>
- * container rpc-registry {
- * leaf type {
- * type leafref;
- * }
- * leaf name {
- * type leafref;
- * }
- * uses service-ref {
- * refine (urn:opendaylight:params:xml:ns:yang:controller:config:alto-provider:impl?revision=2014-11-19)type {
- * leaf type {
- * type leafref;
- * }
- * }
- * }
- * }
- * </pre>
- * The schema path to identify an instance is
- * <i>alto-provider-impl/modules/module/configuration/(urn:opendaylight:params:xml:ns:yang:controller:config:alto-provider:impl?revision=2014-11-19)alto-provider-impl/rpc-registry</i>
- *
- * <p>To create instances of this class use {@link org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.controller.config.alto.provider.impl.rev141119.modules.module.configuration.alto.provider.impl.RpcRegistryBuilder}.
- * @see org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.controller.config.alto.provider.impl.rev141119.modules.module.configuration.alto.provider.impl.RpcRegistryBuilder
- *
- */
-public interface RpcRegistry
- extends
- ChildOf<Module>,
- Augmentable<org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.controller.config.alto.provider.impl.rev141119.modules.module.configuration.alto.provider.impl.RpcRegistry>,
- ServiceRef
-{
-
-
-
- public static final QName QNAME = org.opendaylight.yangtools.yang.common.QName.cachedReference(org.opendaylight.yangtools.yang.common.QName.create("urn:opendaylight:params:xml:ns:yang:controller:config:alto-provider:impl","2014-11-19","rpc-registry"));
-
-
-}
-
+++ /dev/null
-package org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.controller.config.alto.provider.impl.rev141119.modules.module.configuration.alto.provider.impl;
-import java.util.Collections;
-import java.util.Map;
-import org.opendaylight.yangtools.yang.binding.DataObject;
-import org.opendaylight.yangtools.yang.binding.AugmentationHolder;
-import java.util.HashMap;
-import org.opendaylight.yangtools.concepts.Builder;
-import org.opendaylight.yangtools.yang.binding.Augmentation;
-
-
-/**
- * Class that builds {@link org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.controller.config.alto.provider.impl.rev141119.modules.module.configuration.alto.provider.impl.RpcRegistry} instances.
- *
- * @see org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.controller.config.alto.provider.impl.rev141119.modules.module.configuration.alto.provider.impl.RpcRegistry
- *
- */
-public class RpcRegistryBuilder implements Builder <org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.controller.config.alto.provider.impl.rev141119.modules.module.configuration.alto.provider.impl.RpcRegistry> {
-
- private java.lang.Object _name;
- private java.lang.Class<? extends org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.controller.config.rev130405.ServiceType> _type;
-
- Map<java.lang.Class<? extends Augmentation<org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.controller.config.alto.provider.impl.rev141119.modules.module.configuration.alto.provider.impl.RpcRegistry>>, Augmentation<org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.controller.config.alto.provider.impl.rev141119.modules.module.configuration.alto.provider.impl.RpcRegistry>> augmentation = new HashMap<>();
-
- public RpcRegistryBuilder() {
- }
- public RpcRegistryBuilder(org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.controller.config.rev130405.ServiceRef arg) {
- this._type = arg.getType();
- this._name = arg.getName();
- }
-
- public RpcRegistryBuilder(RpcRegistry base) {
- this._name = base.getName();
- this._type = base.getType();
- if (base instanceof RpcRegistryImpl) {
- RpcRegistryImpl impl = (RpcRegistryImpl) base;
- this.augmentation = new HashMap<>(impl.augmentation);
- } else if (base instanceof AugmentationHolder) {
- @SuppressWarnings("unchecked")
- AugmentationHolder<org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.controller.config.alto.provider.impl.rev141119.modules.module.configuration.alto.provider.impl.RpcRegistry> casted =(AugmentationHolder<org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.controller.config.alto.provider.impl.rev141119.modules.module.configuration.alto.provider.impl.RpcRegistry>) base;
- this.augmentation = new HashMap<>(casted.augmentations());
- }
- }
-
- /**
- *Set fields from given grouping argument. Valid argument is instance of one of following types:
- * <ul>
- * <li>org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.controller.config.rev130405.ServiceRef</li>
- * </ul>
- *
- * @param arg grouping object
- * @throws IllegalArgumentException if given argument is none of valid types
- */
- public void fieldsFrom(DataObject arg) {
- boolean isValidArg = false;
- if (arg instanceof org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.controller.config.rev130405.ServiceRef) {
- this._type = ((org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.controller.config.rev130405.ServiceRef)arg).getType();
- this._name = ((org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.controller.config.rev130405.ServiceRef)arg).getName();
- isValidArg = true;
- }
- if (!isValidArg) {
- throw new IllegalArgumentException(
- "expected one of: [org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.controller.config.rev130405.ServiceRef] \n" +
- "but was: " + arg
- );
- }
- }
-
- public java.lang.Object getName() {
- return _name;
- }
-
- public java.lang.Class<? extends org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.controller.config.rev130405.ServiceType> getType() {
- return _type;
- }
-
- @SuppressWarnings("unchecked")
- public <E extends Augmentation<org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.controller.config.alto.provider.impl.rev141119.modules.module.configuration.alto.provider.impl.RpcRegistry>> E getAugmentation(java.lang.Class<E> augmentationType) {
- if (augmentationType == null) {
- throw new IllegalArgumentException("Augmentation Type reference cannot be NULL!");
- }
- return (E) augmentation.get(augmentationType);
- }
-
- public RpcRegistryBuilder setName(java.lang.Object value) {
- this._name = value;
- return this;
- }
-
- public RpcRegistryBuilder setType(java.lang.Class<? extends org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.controller.config.rev130405.ServiceType> value) {
- this._type = value;
- return this;
- }
-
- public RpcRegistryBuilder addAugmentation(java.lang.Class<? extends Augmentation<org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.controller.config.alto.provider.impl.rev141119.modules.module.configuration.alto.provider.impl.RpcRegistry>> augmentationType, Augmentation<org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.controller.config.alto.provider.impl.rev141119.modules.module.configuration.alto.provider.impl.RpcRegistry> augmentation) {
- if (augmentation == null) {
- return removeAugmentation(augmentationType);
- }
- this.augmentation.put(augmentationType, augmentation);
- return this;
- }
-
- public RpcRegistryBuilder removeAugmentation(java.lang.Class<? extends Augmentation<org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.controller.config.alto.provider.impl.rev141119.modules.module.configuration.alto.provider.impl.RpcRegistry>> augmentationType) {
- this.augmentation.remove(augmentationType);
- return this;
- }
-
- public RpcRegistry build() {
- return new RpcRegistryImpl(this);
- }
-
- private static final class RpcRegistryImpl implements RpcRegistry {
-
- public java.lang.Class<org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.controller.config.alto.provider.impl.rev141119.modules.module.configuration.alto.provider.impl.RpcRegistry> getImplementedInterface() {
- return org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.controller.config.alto.provider.impl.rev141119.modules.module.configuration.alto.provider.impl.RpcRegistry.class;
- }
-
- private final java.lang.Object _name;
- private final java.lang.Class<? extends org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.controller.config.rev130405.ServiceType> _type;
-
- private Map<java.lang.Class<? extends Augmentation<org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.controller.config.alto.provider.impl.rev141119.modules.module.configuration.alto.provider.impl.RpcRegistry>>, Augmentation<org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.controller.config.alto.provider.impl.rev141119.modules.module.configuration.alto.provider.impl.RpcRegistry>> augmentation = new HashMap<>();
-
- private RpcRegistryImpl(RpcRegistryBuilder base) {
- this._name = base.getName();
- this._type = base.getType();
- switch (base.augmentation.size()) {
- case 0:
- this.augmentation = Collections.emptyMap();
- break;
- case 1:
- final Map.Entry<java.lang.Class<? extends Augmentation<org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.controller.config.alto.provider.impl.rev141119.modules.module.configuration.alto.provider.impl.RpcRegistry>>, Augmentation<org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.controller.config.alto.provider.impl.rev141119.modules.module.configuration.alto.provider.impl.RpcRegistry>> e = base.augmentation.entrySet().iterator().next();
- this.augmentation = Collections.<java.lang.Class<? extends Augmentation<org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.controller.config.alto.provider.impl.rev141119.modules.module.configuration.alto.provider.impl.RpcRegistry>>, Augmentation<org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.controller.config.alto.provider.impl.rev141119.modules.module.configuration.alto.provider.impl.RpcRegistry>>singletonMap(e.getKey(), e.getValue());
- break;
- default :
- this.augmentation = new HashMap<>(base.augmentation);
- }
- }
-
- @Override
- public java.lang.Object getName() {
- return _name;
- }
-
- @Override
- public java.lang.Class<? extends org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.controller.config.rev130405.ServiceType> getType() {
- return _type;
- }
-
- @SuppressWarnings("unchecked")
- @Override
- public <E extends Augmentation<org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.controller.config.alto.provider.impl.rev141119.modules.module.configuration.alto.provider.impl.RpcRegistry>> E getAugmentation(java.lang.Class<E> augmentationType) {
- if (augmentationType == null) {
- throw new IllegalArgumentException("Augmentation Type reference cannot be NULL!");
- }
- return (E) augmentation.get(augmentationType);
- }
-
- @Override
- public int hashCode() {
- final int prime = 31;
- int result = 1;
- result = prime * result + ((_name == null) ? 0 : _name.hashCode());
- result = prime * result + ((_type == null) ? 0 : _type.hashCode());
- result = prime * result + ((augmentation == null) ? 0 : augmentation.hashCode());
- return result;
- }
-
- @Override
- public boolean equals(java.lang.Object obj) {
- if (this == obj) {
- return true;
- }
- if (!(obj instanceof DataObject)) {
- return false;
- }
- if (!org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.controller.config.alto.provider.impl.rev141119.modules.module.configuration.alto.provider.impl.RpcRegistry.class.equals(((DataObject)obj).getImplementedInterface())) {
- return false;
- }
- org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.controller.config.alto.provider.impl.rev141119.modules.module.configuration.alto.provider.impl.RpcRegistry other = (org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.controller.config.alto.provider.impl.rev141119.modules.module.configuration.alto.provider.impl.RpcRegistry)obj;
- if (_name == null) {
- if (other.getName() != null) {
- return false;
- }
- } else if(!_name.equals(other.getName())) {
- return false;
- }
- if (_type == null) {
- if (other.getType() != null) {
- return false;
- }
- } else if(!_type.equals(other.getType())) {
- return false;
- }
- if (getClass() == obj.getClass()) {
- // Simple case: we are comparing against self
- RpcRegistryImpl otherImpl = (RpcRegistryImpl) obj;
- if (augmentation == null) {
- if (otherImpl.augmentation != null) {
- return false;
- }
- } else if(!augmentation.equals(otherImpl.augmentation)) {
- return false;
- }
- } else {
- // Hard case: compare our augments with presence there...
- for (Map.Entry<java.lang.Class<? extends Augmentation<org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.controller.config.alto.provider.impl.rev141119.modules.module.configuration.alto.provider.impl.RpcRegistry>>, Augmentation<org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.controller.config.alto.provider.impl.rev141119.modules.module.configuration.alto.provider.impl.RpcRegistry>> e : augmentation.entrySet()) {
- if (!e.getValue().equals(other.getAugmentation(e.getKey()))) {
- return false;
- }
- }
- // .. and give the other one the chance to do the same
- if (!obj.equals(this)) {
- return false;
- }
- }
- return true;
- }
-
- @Override
- public java.lang.String toString() {
- java.lang.StringBuilder builder = new java.lang.StringBuilder ("RpcRegistry [");
- boolean first = true;
-
- if (_name != null) {
- if (first) {
- first = false;
- } else {
- builder.append(", ");
- }
- builder.append("_name=");
- builder.append(_name);
- }
- if (_type != null) {
- if (first) {
- first = false;
- } else {
- builder.append(", ");
- }
- builder.append("_type=");
- builder.append(_type);
- }
- if (first) {
- first = false;
- } else {
- builder.append(", ");
- }
- builder.append("augmentation=");
- builder.append(augmentation.values());
- return builder.append(']').toString();
- }
- }
-
-}
+++ /dev/null
-package org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.controller.config.alto.provider.impl.rev141119.modules.module.state;
-import org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.controller.config.rev130405.modules.module.State;
-import org.opendaylight.yangtools.yang.common.QName;
-import org.opendaylight.yangtools.yang.binding.DataObject;
-import org.opendaylight.yangtools.yang.binding.Augmentable;
-
-
-/**
- * <p>This class represents the following YANG schema fragment defined in module <b>alto-provider-impl</b>
- * <br>(Source path: <i>META-INF/yang/alto-provider-impl.yang</i>):
- * <pre>
- * case alto-provider-impl {
- * }
- * </pre>
- * The schema path to identify an instance is
- * <i>alto-provider-impl/modules/module/state/(urn:opendaylight:params:xml:ns:yang:controller:config:alto-provider:impl?revision=2014-11-19)alto-provider-impl</i>
- *
- */
-public interface AltoProviderImpl
- extends
- DataObject,
- Augmentable<org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.controller.config.alto.provider.impl.rev141119.modules.module.state.AltoProviderImpl>,
- State
-{
-
-
-
- public static final QName QNAME = org.opendaylight.yangtools.yang.common.QName.cachedReference(org.opendaylight.yangtools.yang.common.QName.create("urn:opendaylight:params:xml:ns:yang:controller:config:alto-provider:impl","2014-11-19","alto-provider-impl"));
-
-
-}
-
+++ /dev/null
-package org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.controller.config.alto.provider.impl.rev141119.modules.module.state;
-import java.util.Collections;
-import java.util.Map;
-import org.opendaylight.yangtools.yang.binding.DataObject;
-import org.opendaylight.yangtools.yang.binding.AugmentationHolder;
-import java.util.HashMap;
-import org.opendaylight.yangtools.concepts.Builder;
-import org.opendaylight.yangtools.yang.binding.Augmentation;
-
-
-/**
- * Class that builds {@link org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.controller.config.alto.provider.impl.rev141119.modules.module.state.AltoProviderImpl} instances.
- *
- * @see org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.controller.config.alto.provider.impl.rev141119.modules.module.state.AltoProviderImpl
- *
- */
-public class AltoProviderImplBuilder implements Builder <org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.controller.config.alto.provider.impl.rev141119.modules.module.state.AltoProviderImpl> {
-
-
- Map<java.lang.Class<? extends Augmentation<org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.controller.config.alto.provider.impl.rev141119.modules.module.state.AltoProviderImpl>>, Augmentation<org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.controller.config.alto.provider.impl.rev141119.modules.module.state.AltoProviderImpl>> augmentation = new HashMap<>();
-
- public AltoProviderImplBuilder() {
- }
-
- public AltoProviderImplBuilder(AltoProviderImpl base) {
- if (base instanceof AltoProviderImplImpl) {
- AltoProviderImplImpl impl = (AltoProviderImplImpl) base;
- this.augmentation = new HashMap<>(impl.augmentation);
- } else if (base instanceof AugmentationHolder) {
- @SuppressWarnings("unchecked")
- AugmentationHolder<org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.controller.config.alto.provider.impl.rev141119.modules.module.state.AltoProviderImpl> casted =(AugmentationHolder<org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.controller.config.alto.provider.impl.rev141119.modules.module.state.AltoProviderImpl>) base;
- this.augmentation = new HashMap<>(casted.augmentations());
- }
- }
-
-
-
- @SuppressWarnings("unchecked")
- public <E extends Augmentation<org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.controller.config.alto.provider.impl.rev141119.modules.module.state.AltoProviderImpl>> E getAugmentation(java.lang.Class<E> augmentationType) {
- if (augmentationType == null) {
- throw new IllegalArgumentException("Augmentation Type reference cannot be NULL!");
- }
- return (E) augmentation.get(augmentationType);
- }
-
-
- public AltoProviderImplBuilder addAugmentation(java.lang.Class<? extends Augmentation<org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.controller.config.alto.provider.impl.rev141119.modules.module.state.AltoProviderImpl>> augmentationType, Augmentation<org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.controller.config.alto.provider.impl.rev141119.modules.module.state.AltoProviderImpl> augmentation) {
- if (augmentation == null) {
- return removeAugmentation(augmentationType);
- }
- this.augmentation.put(augmentationType, augmentation);
- return this;
- }
-
- public AltoProviderImplBuilder removeAugmentation(java.lang.Class<? extends Augmentation<org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.controller.config.alto.provider.impl.rev141119.modules.module.state.AltoProviderImpl>> augmentationType) {
- this.augmentation.remove(augmentationType);
- return this;
- }
-
- public AltoProviderImpl build() {
- return new AltoProviderImplImpl(this);
- }
-
- private static final class AltoProviderImplImpl implements AltoProviderImpl {
-
- public java.lang.Class<org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.controller.config.alto.provider.impl.rev141119.modules.module.state.AltoProviderImpl> getImplementedInterface() {
- return org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.controller.config.alto.provider.impl.rev141119.modules.module.state.AltoProviderImpl.class;
- }
-
-
- private Map<java.lang.Class<? extends Augmentation<org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.controller.config.alto.provider.impl.rev141119.modules.module.state.AltoProviderImpl>>, Augmentation<org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.controller.config.alto.provider.impl.rev141119.modules.module.state.AltoProviderImpl>> augmentation = new HashMap<>();
-
- private AltoProviderImplImpl(AltoProviderImplBuilder base) {
- switch (base.augmentation.size()) {
- case 0:
- this.augmentation = Collections.emptyMap();
- break;
- case 1:
- final Map.Entry<java.lang.Class<? extends Augmentation<org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.controller.config.alto.provider.impl.rev141119.modules.module.state.AltoProviderImpl>>, Augmentation<org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.controller.config.alto.provider.impl.rev141119.modules.module.state.AltoProviderImpl>> e = base.augmentation.entrySet().iterator().next();
- this.augmentation = Collections.<java.lang.Class<? extends Augmentation<org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.controller.config.alto.provider.impl.rev141119.modules.module.state.AltoProviderImpl>>, Augmentation<org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.controller.config.alto.provider.impl.rev141119.modules.module.state.AltoProviderImpl>>singletonMap(e.getKey(), e.getValue());
- break;
- default :
- this.augmentation = new HashMap<>(base.augmentation);
- }
- }
-
-
- @SuppressWarnings("unchecked")
- @Override
- public <E extends Augmentation<org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.controller.config.alto.provider.impl.rev141119.modules.module.state.AltoProviderImpl>> E getAugmentation(java.lang.Class<E> augmentationType) {
- if (augmentationType == null) {
- throw new IllegalArgumentException("Augmentation Type reference cannot be NULL!");
- }
- return (E) augmentation.get(augmentationType);
- }
-
- @Override
- public int hashCode() {
- final int prime = 31;
- int result = 1;
- result = prime * result + ((augmentation == null) ? 0 : augmentation.hashCode());
- return result;
- }
-
- @Override
- public boolean equals(java.lang.Object obj) {
- if (this == obj) {
- return true;
- }
- if (!(obj instanceof DataObject)) {
- return false;
- }
- if (!org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.controller.config.alto.provider.impl.rev141119.modules.module.state.AltoProviderImpl.class.equals(((DataObject)obj).getImplementedInterface())) {
- return false;
- }
- org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.controller.config.alto.provider.impl.rev141119.modules.module.state.AltoProviderImpl other = (org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.controller.config.alto.provider.impl.rev141119.modules.module.state.AltoProviderImpl)obj;
- if (getClass() == obj.getClass()) {
- // Simple case: we are comparing against self
- AltoProviderImplImpl otherImpl = (AltoProviderImplImpl) obj;
- if (augmentation == null) {
- if (otherImpl.augmentation != null) {
- return false;
- }
- } else if(!augmentation.equals(otherImpl.augmentation)) {
- return false;
- }
- } else {
- // Hard case: compare our augments with presence there...
- for (Map.Entry<java.lang.Class<? extends Augmentation<org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.controller.config.alto.provider.impl.rev141119.modules.module.state.AltoProviderImpl>>, Augmentation<org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.controller.config.alto.provider.impl.rev141119.modules.module.state.AltoProviderImpl>> e : augmentation.entrySet()) {
- if (!e.getValue().equals(other.getAugmentation(e.getKey()))) {
- return false;
- }
- }
- // .. and give the other one the chance to do the same
- if (!obj.equals(this)) {
- return false;
- }
- }
- return true;
- }
-
- @Override
- public java.lang.String toString() {
- java.lang.StringBuilder builder = new java.lang.StringBuilder ("AltoProviderImpl [");
- boolean first = true;
-
- if (first) {
- first = false;
- } else {
- builder.append(", ");
- }
- builder.append("augmentation=");
- builder.append(augmentation.values());
- return builder.append(']').toString();
- }
- }
-
-}
List<TypedEndpointAddress> teaList2 = new ArrayList<TypedEndpointAddress>();
teaList2.add(tea2);
- DstCosts1 dc1 = new DstCosts1Builder().setCostDefault(Integer.toString(1)).build();
+ DstCosts1 dc1 = new DstCosts1Builder().setCostDefault("1").build();
DstCosts dc = new DstCostsBuilder().setDst(tea2).addAugmentation(DstCosts1.class, dc1).build();
List<DstCosts> dcList = new ArrayList<DstCosts>();
<commons.juli.version>7.0.53.v201406060720</commons.juli.version>
<commons.tomcat.api.version>7.0.53.v201406060720</commons.tomcat.api.version>
<commons.tomcat.util.version>7.0.53.v201406070630</commons.tomcat.util.version>
+ <servlet.version>3.0.1</servlet.version>
</properties>
<dependencyManagement>