fix more deprecation warnings
diff --git a/xos/core/admin.py b/xos/core/admin.py
index 0c29bea..5974495 100644
--- a/xos/core/admin.py
+++ b/xos/core/admin.py
@@ -12,7 +12,7 @@
ReadOnlyPasswordHashField)
from django.contrib.auth.models import Group
from django.contrib.auth.signals import user_logged_in
-from django.contrib.contenttypes import generic
+from django.contrib.contenttypes.admin import GenericTabularInline
from django.core.exceptions import PermissionDenied, ValidationError
from django.core.urlresolvers import NoReverseMatch, resolve, reverse
from django.forms.utils import flatatt, to_current_timezone
@@ -415,7 +415,7 @@
backend_status_icon.short_description = ""
-class PlStackGenericTabularInline(generic.GenericTabularInline):
+class PlStackGenericTabularInline(GenericTabularInline):
def has_add_permission(self, request):
return not request.user.isReadOnlyUser()
diff --git a/xos/core/models/billing.py b/xos/core/models/billing.py
index 6e517b4..48c8a38 100644
--- a/xos/core/models/billing.py
+++ b/xos/core/models/billing.py
@@ -5,7 +5,6 @@
from core.models import PlCoreBase, Site, Slice, Instance, Deployment
from core.models.plcorebase import StrippedCharField
from django.contrib.contenttypes.models import ContentType
-from django.contrib.contenttypes import generic
from django.db.models import Sum
from django.utils import timezone
diff --git a/xos/core/models/dashboard.py b/xos/core/models/dashboard.py
index e667261..42f51e5 100644
--- a/xos/core/models/dashboard.py
+++ b/xos/core/models/dashboard.py
@@ -3,7 +3,6 @@
from core.models import PlCoreBase, Controller, Deployment
from core.models.plcorebase import StrippedCharField
from core.models.site import ControllerLinkManager, ControllerLinkDeletionManager
-from django.contrib.contenttypes import generic
class DashboardView(PlCoreBase):
name = StrippedCharField(max_length=200, unique=True, help_text="Name of the View")
diff --git a/xos/core/models/flavor.py b/xos/core/models/flavor.py
index 8251eb1..693a5f8 100644
--- a/xos/core/models/flavor.py
+++ b/xos/core/models/flavor.py
@@ -4,7 +4,6 @@
from core.models import PlCoreBase, Deployment
from core.models.plcorebase import StrippedCharField
from django.contrib.contenttypes.models import ContentType
-from django.contrib.contenttypes import generic
class Flavor(PlCoreBase):
name = StrippedCharField(max_length=32, help_text="name of this flavor, as displayed to users")
diff --git a/xos/core/models/instance.py b/xos/core/models/instance.py
index 6ba7cbf..37d3424 100644
--- a/xos/core/models/instance.py
+++ b/xos/core/models/instance.py
@@ -13,7 +13,7 @@
from core.models import User
from core.models import Tag
from core.models import Flavor
-from django.contrib.contenttypes import generic
+from django.contrib.contenttypes.fields import GenericRelation
from xos.config import Config
from django.core.exceptions import PermissionDenied, ValidationError
@@ -95,7 +95,7 @@
node = models.ForeignKey(Node, related_name='instances')
numberCores = models.IntegerField(verbose_name="Number of Cores", help_text="Number of cores for instance", default=0)
flavor = models.ForeignKey(Flavor, help_text="Flavor of this instance", default=get_default_flavor)
- tags = generic.GenericRelation(Tag)
+ tags = GenericRelation(Tag)
userData = models.TextField(blank=True, null=True, help_text="user_data passed to instance during creation")
isolation = models.CharField(null=False, blank=False, max_length=30, choices=ISOLATION_CHOICES, default="vm")
volumes = models.TextField(null=True, blank=True, help_text="Comma-separated list of directories to expose to parent context")
diff --git a/xos/core/models/network.py b/xos/core/models/network.py
index 8373814..c2ff524 100644
--- a/xos/core/models/network.py
+++ b/xos/core/models/network.py
@@ -5,7 +5,7 @@
from core.models import PlCoreBase, Site, Slice, Instance, Controller, Service
from core.models import ControllerLinkManager,ControllerLinkDeletionManager
from django.contrib.contenttypes.models import ContentType
-from django.contrib.contenttypes import generic
+from django.contrib.contenttypes.fields import GenericForeignKey
from django.core.exceptions import ValidationError
from django.db.models import Q
@@ -342,7 +342,7 @@
# The required fields to do a ObjectType lookup, and object_id assignment
content_type = models.ForeignKey(ContentType)
object_id = models.PositiveIntegerField()
- content_object = generic.GenericForeignKey('content_type', 'object_id')
+ content_object = GenericForeignKey('content_type', 'object_id')
def __unicode__(self):
return self.parameter.name
diff --git a/xos/core/models/node.py b/xos/core/models/node.py
index d464532..f655ab0 100644
--- a/xos/core/models/node.py
+++ b/xos/core/models/node.py
@@ -4,7 +4,7 @@
from core.models.plcorebase import StrippedCharField
from core.models import Site, SiteDeployment, SitePrivilege
from core.models import Tag
-from django.contrib.contenttypes import generic
+from django.contrib.contenttypes.fields import GenericRelation
# Create your models here.
@@ -12,7 +12,7 @@
name = StrippedCharField(max_length=200, unique=True, help_text="Name of the Node")
site_deployment = models.ForeignKey(SiteDeployment, related_name='nodes')
site = models.ForeignKey(Site, null=True, blank=True, related_name='nodes')
- tags = generic.GenericRelation(Tag)
+ tags = GenericRelation(Tag)
def __unicode__(self): return u'%s' % (self.name)
diff --git a/xos/core/models/site.py b/xos/core/models/site.py
index 77b96ac..31e69a6 100644
--- a/xos/core/models/site.py
+++ b/xos/core/models/site.py
@@ -1,7 +1,7 @@
import os
from django.db import models
from django.db.models import Q
-from django.contrib.contenttypes import generic
+from django.contrib.contenttypes.fields import GenericRelation
from django.core.exceptions import PermissionDenied
from geoposition.fields import GeopositionField
from core.models import PlCoreBase,PlCoreBaseManager,PlCoreBaseDeletionManager
@@ -110,7 +110,7 @@
#deployments = models.ManyToManyField('Deployment', blank=True, related_name='sites')
deployments = models.ManyToManyField('Deployment', through='SiteDeployment', blank=True, help_text="Select which sites are allowed to host nodes in this deployment", related_name='sites')
- tags = generic.GenericRelation(Tag)
+ tags = GenericRelation(Tag)
def __unicode__(self): return u'%s' % (self.name)
diff --git a/xos/core/models/slice.py b/xos/core/models/slice.py
index 3934f3f..ebf5b6c 100644
--- a/xos/core/models/slice.py
+++ b/xos/core/models/slice.py
@@ -9,7 +9,7 @@
from core.models import ServiceClass
#from core.models.serviceclass import get_default_serviceclass
from core.models import Tag
-from django.contrib.contenttypes import generic
+from django.contrib.contenttypes.fields import GenericRelation
from core.models import Service
from core.models import Controller
from core.models import Flavor, Image
@@ -33,7 +33,7 @@
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)
+ tags = GenericRelation(Tag)
serviceClass = models.ForeignKey(ServiceClass, related_name = "slices", null=True, blank=True) # DEPRECATED
creator = models.ForeignKey(User, related_name='slices', blank=True, null=True)
diff --git a/xos/services/ceilometer/admin.py b/xos/services/ceilometer/admin.py
index b12340e..7ca5c2c 100644
--- a/xos/services/ceilometer/admin.py
+++ b/xos/services/ceilometer/admin.py
@@ -8,7 +8,6 @@
from django.contrib.auth.forms import ReadOnlyPasswordHashField
from django.contrib.auth.signals import user_logged_in
from django.utils import timezone
-from django.contrib.contenttypes import generic
from suit.widgets import LinkedSelect
from core.admin import ServiceAppAdmin,SliceInline,ServiceAttrAsTabInline, ReadOnlyAwareAdmin, XOSTabularInline, ServicePrivilegeInline, TenantRootTenantInline, TenantRootPrivilegeInline, TenantAttrAsTabInline
from core.middleware import get_request
diff --git a/xos/services/cord/admin.py b/xos/services/cord/admin.py
index 331cf1c..e84ea5b 100644
--- a/xos/services/cord/admin.py
+++ b/xos/services/cord/admin.py
@@ -8,7 +8,6 @@
from django.contrib.auth.forms import ReadOnlyPasswordHashField
from django.contrib.auth.signals import user_logged_in
from django.utils import timezone
-from django.contrib.contenttypes import generic
from suit.widgets import LinkedSelect
from core.admin import ServiceAppAdmin,SliceInline,ServiceAttrAsTabInline, ReadOnlyAwareAdmin, XOSTabularInline, ServicePrivilegeInline, TenantRootTenantInline, TenantRootPrivilegeInline
from core.middleware import get_request
diff --git a/xos/services/fabric/admin.py b/xos/services/fabric/admin.py
index 5dc5923..e9269fd 100644
--- a/xos/services/fabric/admin.py
+++ b/xos/services/fabric/admin.py
@@ -8,7 +8,6 @@
from django.contrib.auth.forms import ReadOnlyPasswordHashField
from django.contrib.auth.signals import user_logged_in
from django.utils import timezone
-from django.contrib.contenttypes import generic
from suit.widgets import LinkedSelect
from core.models import AddressPool
from core.admin import ServiceAppAdmin,SliceInline,ServiceAttrAsTabInline, ReadOnlyAwareAdmin, XOSTabularInline, ServicePrivilegeInline, TenantRootTenantInline, TenantRootPrivilegeInline
diff --git a/xos/services/hpc/admin.py b/xos/services/hpc/admin.py
index 208f5af..19f5190 100644
--- a/xos/services/hpc/admin.py
+++ b/xos/services/hpc/admin.py
@@ -8,7 +8,6 @@
from django.contrib.auth.forms import ReadOnlyPasswordHashField
from django.contrib.auth.signals import user_logged_in
from django.utils import timezone
-from django.contrib.contenttypes import generic
from suit.widgets import LinkedSelect
from core.admin import ServiceAppAdmin,SliceInline,ServiceAttrAsTabInline, ReadOnlyAwareAdmin, XOSTabularInline, SliderWidget, ServicePrivilegeInline
from core.middleware import get_request
diff --git a/xos/services/onos/admin.py b/xos/services/onos/admin.py
index f7347ae..6ec2432 100644
--- a/xos/services/onos/admin.py
+++ b/xos/services/onos/admin.py
@@ -8,7 +8,6 @@
from django.contrib.auth.forms import ReadOnlyPasswordHashField
from django.contrib.auth.signals import user_logged_in
from django.utils import timezone
-from django.contrib.contenttypes import generic
from suit.widgets import LinkedSelect
from core.admin import ServiceAppAdmin,SliceInline,ServiceAttrAsTabInline, ReadOnlyAwareAdmin, XOSTabularInline, ServicePrivilegeInline, TenantRootTenantInline, TenantRootPrivilegeInline, TenantAttrAsTabInline
from core.middleware import get_request
diff --git a/xos/services/requestrouter/admin.py b/xos/services/requestrouter/admin.py
index 6d9e2fe..a17bc44 100644
--- a/xos/services/requestrouter/admin.py
+++ b/xos/services/requestrouter/admin.py
@@ -8,7 +8,6 @@
from django.contrib.auth.forms import ReadOnlyPasswordHashField
from django.contrib.auth.signals import user_logged_in
from django.utils import timezone
-from django.contrib.contenttypes import generic
from suit.widgets import LinkedSelect
from core.admin import ServiceAppAdmin,SliceInline,ServiceAttrAsTabInline, ReadOnlyAwareAdmin, ServicePrivilegeInline
diff --git a/xos/services/syndicate_storage/admin.py b/xos/services/syndicate_storage/admin.py
index 779f83b..afe4de9 100644
--- a/xos/services/syndicate_storage/admin.py
+++ b/xos/services/syndicate_storage/admin.py
@@ -8,7 +8,6 @@
from django.contrib.auth.forms import ReadOnlyPasswordHashField
from django.contrib.auth.signals import user_logged_in
from django.utils import timezone
-from django.contrib.contenttypes import generic
from suit.widgets import LinkedSelect
from core.admin import ReadOnlyAwareAdmin,ServiceAppAdmin,SliceInline,ServiceAttrAsTabInline,XOSBaseAdmin, XOSTabularInline
from suit.widgets import LinkedSelect
diff --git a/xos/services/vrouter/admin.py b/xos/services/vrouter/admin.py
index f8953a7..5d179f7 100644
--- a/xos/services/vrouter/admin.py
+++ b/xos/services/vrouter/admin.py
@@ -8,7 +8,6 @@
from django.contrib.auth.forms import ReadOnlyPasswordHashField
from django.contrib.auth.signals import user_logged_in
from django.utils import timezone
-from django.contrib.contenttypes import generic
from suit.widgets import LinkedSelect
from core.models import AddressPool
from core.admin import ServiceAppAdmin,SliceInline,ServiceAttrAsTabInline, ReadOnlyAwareAdmin, XOSTabularInline, ServicePrivilegeInline, AddressPoolInline
diff --git a/xos/services/vtn/admin.py b/xos/services/vtn/admin.py
index 8020922..026cc08 100644
--- a/xos/services/vtn/admin.py
+++ b/xos/services/vtn/admin.py
@@ -8,7 +8,6 @@
from django.contrib.auth.forms import ReadOnlyPasswordHashField
from django.contrib.auth.signals import user_logged_in
from django.utils import timezone
-from django.contrib.contenttypes import generic
from suit.widgets import LinkedSelect
from core.admin import ServiceAppAdmin,SliceInline,ServiceAttrAsTabInline, ReadOnlyAwareAdmin, XOSTabularInline, ServicePrivilegeInline, TenantRootTenantInline, TenantRootPrivilegeInline
from core.middleware import get_request
diff --git a/xos/services/vtr/admin.py b/xos/services/vtr/admin.py
index 6f6d978..9b288a5 100644
--- a/xos/services/vtr/admin.py
+++ b/xos/services/vtr/admin.py
@@ -8,7 +8,6 @@
from django.contrib.auth.forms import ReadOnlyPasswordHashField
from django.contrib.auth.signals import user_logged_in
from django.utils import timezone
-from django.contrib.contenttypes import generic
from suit.widgets import LinkedSelect
from core.admin import ServiceAppAdmin,SliceInline,ServiceAttrAsTabInline, ReadOnlyAwareAdmin, XOSTabularInline, ServicePrivilegeInline, TenantRootTenantInline, TenantRootPrivilegeInline
from core.middleware import get_request