WIP: adding metronet as a tosca service
Change-Id: I59e2bdc7c168aa388dc634b94f3c3353351b5ed2
diff --git a/xos/tosca/resources/metronetservice.py b/xos/tosca/resources/metronetservice.py
index 5514d28..3ed5e59 100644
--- a/xos/tosca/resources/metronetservice.py
+++ b/xos/tosca/resources/metronetservice.py
@@ -11,3 +11,22 @@
provides = "tosca.nodes.MetroNetworkDevice"
xos_model = NetworkDevice
copyin_props = ["id", "name", "administrativeState", "username", "password", "authType", "restCtrlUrl"]
+
+class VnodGlobalService(XOSService):
+ provides = "tosca.nodes.VNodGlobalService"
+ xos_model = VnodGlobalService
+ copyin_props = ["view_url", "icon_url", "enabled", "published", "public_key", "versionNumber"]
+
+ def get_xos_args(self):
+ args = super(VnodGlobalService, self).get_xos_args()
+
+ profile = self.get_requirement("tosca.relationships.UsesBandwidthProfile", throw_exception=False)
+ if profile:
+ profile = self.get_xos_object(BandwidthProfile, name=profile)
+ args["bandwidthProfile"] = profile
+ return args
+
+class XOSMetronetBandwithProficle(XOSResource):
+ provides = "tosca.nodes.EcordBandwidthProfile"
+ xos_model = BandwidthProfile
+ copyin_props = ['bwpcfgcbs','bwpcfgebs','bwpcfgcir','bwpcfgeir','name']
\ No newline at end of file