Defining TOSCA resource for NetworkDevice
Change-Id: I1bf5397b12ccb0bd9af3f9d07f3e527c1c3eade8
diff --git a/xos/tosca/resources/metronetservice.py b/xos/tosca/resources/metronetservice.py
index c488d97..7d898c3 100644
--- a/xos/tosca/resources/metronetservice.py
+++ b/xos/tosca/resources/metronetservice.py
@@ -5,11 +5,19 @@
sys.path.append("/opt/tosca")
from translator.toscalib.tosca_template import ToscaTemplate
-from services.metronetwork.models import MetroNetworkService
+from services.metronetwork.models import MetroNetworkService, NetworkDevice
from service import XOSService
+from xosresource import XOSResource
+
class XOSMetroNetworkService(XOSService):
provides = "tosca.nodes.MetroNetworkService"
xos_model = MetroNetworkService
copyin_props = ["view_url", "icon_url", "enabled", "published", "versionNumber"]
+
+
+class MetroNetworkDevice(XOSResource):
+ provides = "tosca.nodes.MetroNetworkDevice"
+ xos_model = NetworkDevice
+ copyin_props = ["name", "administrativeState", "username", "password", "authType", "restCtrlUrl"]