start renaming NetworkSliver to Port
diff --git a/xos/core/admin.py b/xos/core/admin.py
index 4de3c7a..a5d4c2b 100644
--- a/xos/core/admin.py
+++ b/xos/core/admin.py
@@ -1242,7 +1242,7 @@
class SliverPortInline(XOSTabularInline):
fields = ['backend_status_icon', 'network', 'sliver', 'ip']
readonly_fields = ("backend_status_icon", "ip", )
- model = NetworkSliver
+ model = Port
selflink_fieldname = "network"
extra = 0
verbose_name_plural = "Ports"
@@ -1670,7 +1670,7 @@
class NetworkPortInline(XOSTabularInline):
fields = ['backend_status_icon', 'network', 'sliver', 'ip']
readonly_fields = ("backend_status_icon", "ip", )
- model = NetworkSliver
+ model = Port
selflink_fieldname = "sliver"
extra = 0
verbose_name_plural = "Ports"
diff --git a/xos/core/models/__init__.py b/xos/core/models/__init__.py
index 6ade26b..d7bf036 100644
--- a/xos/core/models/__init__.py
+++ b/xos/core/models/__init__.py
@@ -26,7 +26,7 @@
from .sliver import Sliver
from .reservation import ReservedResource
from .reservation import Reservation
-from .network import Network, NetworkParameterType, NetworkParameter, NetworkSliver, NetworkTemplate, Router, NetworkSlice, ControllerNetwork
+from .network import Network, NetworkParameterType, NetworkParameter, NetworkSliver, Port, NetworkTemplate, Router, NetworkSlice, ControllerNetwork
from .billing import Account, Invoice, Charge, UsableObject, Payment
from .program import Program
diff --git a/xos/core/models/network.py b/xos/core/models/network.py
index d7a8baa..d9a7d51 100644
--- a/xos/core/models/network.py
+++ b/xos/core/models/network.py
@@ -207,6 +207,9 @@
return qs
class NetworkSliver(PlCoreBase):
+ # Please use "Port" instead of "NetworkSliver". NetworkSliver will soon be
+ # removed.
+
network = models.ForeignKey(Network,related_name='networkslivers')
sliver = models.ForeignKey(Sliver, null=True, blank=True, related_name='networkslivers')
ip = models.GenericIPAddressField(help_text="Sliver ip address", blank=True, null=True)
@@ -253,6 +256,11 @@
qs = NetworkSliver.objects.filter(id__in=sliver_ids)
return qs
+class Port(NetworkSliver):
+ # Rename in progress: NetworkSliver->Port
+ class Meta:
+ proxy = True
+
class Router(PlCoreBase):
name = models.CharField(max_length=32)
owner = models.ForeignKey(Slice, related_name="routers")