Merge branch 'master' of github.com:open-cloud/xos
diff --git a/xos/core/models/slice.py b/xos/core/models/slice.py
index 2679eb7..12c1ea2 100644
--- a/xos/core/models/slice.py
+++ b/xos/core/models/slice.py
@@ -32,6 +32,7 @@
max_instances = models.IntegerField(default=10)
service = models.ForeignKey(Service, related_name='slices', null=True, blank=True)
network = models.CharField(null=True, blank=True, max_length=256, choices=NETWORK_CHOICES)
+ exposed_ports = models.CharField(null=True, blank=True, max_length=256)
tags = generic.GenericRelation(Tag)
serviceClass = models.ForeignKey(ServiceClass, related_name = "slices", null=True, default=get_default_serviceclass)
creator = models.ForeignKey(User, related_name='slices', blank=True, null=True)
diff --git a/xos/tosca/custom_types/xos.m4 b/xos/tosca/custom_types/xos.m4
index 0c817c9..20a537a 100644
--- a/xos/tosca/custom_types/xos.m4
+++ b/xos/tosca/custom_types/xos.m4
@@ -663,6 +663,10 @@
type: string
required: false
description: type of networking to use for this slice
+ exposed_ports:
+ type: string
+ required: false
+ description: comma-separated list of protocol _space_ port that represent ports the slice should expose
tosca.nodes.Node:
derived_from: tosca.nodes.Root
diff --git a/xos/tosca/custom_types/xos.yaml b/xos/tosca/custom_types/xos.yaml
index a4f5d97..1b5db39 100644
--- a/xos/tosca/custom_types/xos.yaml
+++ b/xos/tosca/custom_types/xos.yaml
@@ -920,6 +920,10 @@
type: string
required: false
description: type of networking to use for this slice
+ exposed_ports:
+ type: string
+ required: false
+ description: comma-separated list of protocol _space_ port that represent ports the slice should expose
tosca.nodes.Node:
derived_from: tosca.nodes.Root
diff --git a/xos/tosca/resources/slice.py b/xos/tosca/resources/slice.py
index ca11b77..7dcbd59 100644
--- a/xos/tosca/resources/slice.py
+++ b/xos/tosca/resources/slice.py
@@ -12,7 +12,7 @@
class XOSSlice(XOSResource):
provides = "tosca.nodes.Slice"
xos_model = Slice
- copyin_props = ["enabled", "description", "slice_url", "max_instances", "default_isolation", "network"]
+ copyin_props = ["enabled", "description", "slice_url", "max_instances", "default_isolation", "network", "exposed_ports"]
def get_xos_args(self):
args = super(XOSSlice, self).get_xos_args()