1 import osm_im
.vnfd
as vnfd_catalog
2 from pyangbind
.lib
.serialise
import pybindJSONDecoder
11 short-name: cirros_vnf
12 description: Simple VNF example with a cirros
16 # Place the logo as png in icons directory and provide the name here
19 # Management interface
23 # Atleast one VDU need to be specified
27 description: cirros_vnfd-VM
30 # Flavour of the VM to be instantiated for the VDU
31 # flavor below can fit into m1.micro
37 # Image/checksum or image including the full path
42 # Specify the external interfaces
43 # There can be multiple interfaces defined
50 external-connection-point-ref: eth0
57 class PythonTest(unittest
.TestCase
):
60 def test_python_compatibility(self
):
61 """A simple test to verify Python compatibility.
63 This test exercises basic IM interoperability with supported versions
64 of Python in order to verify the IM libraries compatibility.
66 As of 30 Nov 2017, the IM library fails with Python3. This invokes that
67 failing code so that it can be repeatably tested:
69 ValueError: '_pybind_generated_by' in __slots__ conflicts with class variable
73 data
= yaml
.load(VNFD_YAML
)
75 myvnfd
= vnfd_catalog
.vnfd()
76 pybindJSONDecoder
.load_ietf_json(data
, None, None, obj
=myvnfd
)