Ignoring requests to create ONOS Service Instances as ONOS does not sit in the subscriber chain
Change-Id: I6dfaa063c8e11d28cd44b0715ecbc5e40f4a295f
diff --git a/VERSION b/VERSION
index 05580bc..ac2cdeb 100644
--- a/VERSION
+++ b/VERSION
@@ -1 +1 @@
-2.1.3-dev0
+2.1.3
diff --git a/xos/synchronizer/models/convenience/onos_service.py b/xos/synchronizer/models/convenience/onos_service.py
new file mode 100644
index 0000000..940ab01
--- /dev/null
+++ b/xos/synchronizer/models/convenience/onos_service.py
@@ -0,0 +1,43 @@
+
+# Copyright 2017-present Open Networking Foundation
+#
+# Licensed under the Apache License, Version 2.0 (the "License");
+# you may not use this file except in compliance with the License.
+# You may obtain a copy of the License at
+#
+# http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing, software
+# distributed under the License is distributed on an "AS IS" BASIS,
+# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+# See the License for the specific language governing permissions and
+# limitations under the License.
+
+
+from xosapi.orm import register_convenience_wrapper
+from xosapi.convenience.service import ORMWrapperService
+
+class ORMWrapperOnosService(ORMWrapperService):
+
+ """ Calling convention. Assume the subscribing service does approximately (needs some checks to see
+ if the methods exist before calling them) the following in its model_policy:
+
+ if not eastbound_service.validate_links(self):
+ eastbound_service.acquire_service_instance(self)
+ """
+
+ def acquire_service_instance(self, subscriber_service_instance):
+ """
+ Never acquire a ServiceInstance on the ONOS Service,
+ those are ONOS apps, simply return true
+ """
+ return True
+
+ def validate_links(self, subscriber_service_instance):
+ """
+ In the case of the ONOS service there are no links between ServiceInstances and ONOSApps,
+ so alway return an empty list
+ """
+ return []
+
+register_convenience_wrapper("ONOSService", ORMWrapperOnosService)