X-Git-Url: https://osm.etsi.org/gitweb/?a=blobdiff_plain;ds=sidebyside;f=src%2Femuvim%2Fapi%2Fopenstack%2Fresources%2Fport_pair.py;fp=src%2Femuvim%2Fapi%2Fopenstack%2Fresources%2Fport_pair.py;h=38b983ef9cbe0154d9ce561318c1107229e571b6;hb=7b38ee1ed94ec3e9124e8e5b9c21cf224d39edc3;hp=0000000000000000000000000000000000000000;hpb=4e37abbc1a06ffa40ed11c7c6a16c1fe95403161;p=osm%2Fvim-emu.git diff --git a/src/emuvim/api/openstack/resources/port_pair.py b/src/emuvim/api/openstack/resources/port_pair.py new file mode 100644 index 0000000..38b983e --- /dev/null +++ b/src/emuvim/api/openstack/resources/port_pair.py @@ -0,0 +1,23 @@ +import uuid + + +class PortPair(object): + def __init__(self, name): + self.id = str(uuid.uuid4()) + self.tenant_id = "abcdefghijklmnopqrstuvwxyz123456" + self.name = name + self.description = "" + self.ingress = None + self.egress = None + self.service_function_parameters = dict() + + def create_dict(self, compute): + representation = { + "name": self.name, + "tenant_id": self.tenant_id, + "description": self.description, + "ingress": self.ingress.id, + "egress": self.egress.id, + "id": self.id + } + return representation