Matteo Scandolo | 770c49f | 2016-09-23 15:07:38 -0700 | [diff] [blame] | 1 | import os |
| 2 | import pdb |
| 3 | import sys |
| 4 | import tempfile |
| 5 | sys.path.append("/opt/tosca") |
| 6 | from translator.toscalib.tosca_template import ToscaTemplate |
| 7 | |
Matteo Scandolo | ddce4ec | 2016-09-26 13:11:03 -0700 | [diff] [blame] | 8 | from services.metronetwork.models import MetroNetworkService, NetworkDevice |
Matteo Scandolo | 770c49f | 2016-09-23 15:07:38 -0700 | [diff] [blame] | 9 | |
| 10 | from service import XOSService |
Matteo Scandolo | ddce4ec | 2016-09-26 13:11:03 -0700 | [diff] [blame] | 11 | from xosresource import XOSResource |
| 12 | |
Matteo Scandolo | 770c49f | 2016-09-23 15:07:38 -0700 | [diff] [blame] | 13 | |
| 14 | class XOSMetroNetworkService(XOSService): |
| 15 | provides = "tosca.nodes.MetroNetworkService" |
| 16 | xos_model = MetroNetworkService |
| 17 | copyin_props = ["view_url", "icon_url", "enabled", "published", "versionNumber"] |
Matteo Scandolo | ddce4ec | 2016-09-26 13:11:03 -0700 | [diff] [blame] | 18 | |
| 19 | |
| 20 | class MetroNetworkDevice(XOSResource): |
| 21 | provides = "tosca.nodes.MetroNetworkDevice" |
| 22 | xos_model = NetworkDevice |
| 23 | copyin_props = ["name", "administrativeState", "username", "password", "authType", "restCtrlUrl"] |