Provide IntentServiceManager and MplsLabelManagerService classes
[vpnservice.git] / vpnintent / impl / src / main / java / org / opendaylight / vpnservice / utils / IidFactory.java
diff --git a/vpnintent/impl/src/main/java/org/opendaylight/vpnservice/utils/IidFactory.java b/vpnintent/impl/src/main/java/org/opendaylight/vpnservice/utils/IidFactory.java
new file mode 100644 (file)
index 0000000..d05b69f
--- /dev/null
@@ -0,0 +1,25 @@
+/*
+ * Copyright (c) 2016 Inocybe Technologies and others.  All rights reserved.
+ *
+ * This program and the accompanying materials are made available under the
+ * terms of the Eclipse Public License v1.0 which accompanies this distribution,
+ * and is available at http://www.eclipse.org/legal/epl-v10.html
+ */
+
+package org.opendaylight.vpnservice.utils;
+
+import org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.vpnintent.rev150105.MplsLabels;
+import org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.vpnintent.rev150105.labels.Label;
+import org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.vpnintent.rev150105.labels.LabelKey;
+import org.opendaylight.yangtools.yang.binding.InstanceIdentifier;
+
+public class IidFactory {
+
+    public static InstanceIdentifier<MplsLabels> getMplsLabelsIid() {
+        return InstanceIdentifier.builder(MplsLabels.class).build();
+    }
+
+    public static InstanceIdentifier<Label> getLabelIid(Long label) {
+        return InstanceIdentifier.create(MplsLabels.class).child(Label.class, new LabelKey(label));
+    }
+}