CORD-879 eliminate unused object file
Change-Id: I959b86350a64c8f2f08fbbaca3878638ff5f6f8d
diff --git a/xos/core/xoslib/objects/cordsubscriber.py b/xos/core/xoslib/objects/cordsubscriber.py
deleted file mode 100644
index d97bd5a..0000000
--- a/xos/core/xoslib/objects/cordsubscriber.py
+++ /dev/null
@@ -1,99 +0,0 @@
-from core.models import Slice, SlicePrivilege, SliceRole, Instance, Site, Node, User
-from services.volt.models import VOLTTenant, CordSubscriberRoot
-from plus import PlusObjectMixin
-from operator import itemgetter, attrgetter
-from rest_framework.exceptions import APIException
-
-class CordSubscriber(CordSubscriberRoot):
- class Meta:
- proxy = True
-
- def __init__(self, *args, **kwargs):
- super(CordSubscriber, self).__init__(*args, **kwargs)
-
- def __unicode__(self):
- return u"cordSubscriber-%s" % str(self.id)
-
- passthroughs = ( # the following are now fields of CordSubscriberRoot
- # ("firewall_enable", "vcpe.firewall_enable"),
- # ("firewall_rules", "vcpe.firewall_rules"),
- # ("url_filter_enable", "vcpe.url_filter_enable"),
- # ("url_filter_rules", "vcpe.url_filter_rules"),
- # ("url_filter_level", "vcpe.url_filter_level"),
- # ("users", "vcpe.users"),
- # ("services", "vcpe.services"),
- # ("cdn_enable", "vcpe.cdn_enable"),
- # uplink_speed, downlink_speed, status, enable_uverse
-
- ("c_tag", "volt.c_tag"),
- ("s_tag", "volt.s_tag"),
-
- ("bbs_account", "volt.vcpe.bbs_account"),
- ("ssh_command", "volt.vcpe.ssh_command"),
- ("image", "volt.vcpe.image.id"),
- ("image_name", "volt.vcpe.image.name"),
- ("instance", "volt.vcpe.instance.id"),
- ("instance_name", "volt.vcpe.instance.name"),
- ("routeable_subnet", "volt.vcpe.vbng.routeable_subnet"),
- ("vcpe_id", "volt.vcpe.id"),
- ("vbng_id", "volt.vcpe.vbng.id"),
- ("nat_ip", "volt.vcpe.nat_ip"),
- ("lan_ip", "volt.vcpe.lan_ip"),
- ("private_ip", "volt.vcpe.private_ip"),
- ("wan_ip", "volt.vcpe.wan_ip"),
- ("wan_mac", "volt.vcpe.wan_mac"),
- ("vcpe_synced", "volt.vcpe.is_synced"),
- ("wan_container_ip", "volt.vcpe.wan_container_ip"),
- )
-
- def __getattr__(self, key):
- #print "XXX getattr", self, key
- for (member_name, passthrough_name) in self.passthroughs:
- if key==member_name:
- parts = passthrough_name.split(".")
- obj = self
- for part in parts[:-1]:
- obj = getattr(obj, part)
- if not obj:
- return None
- return getattr(obj, parts[-1])
-
- raise AttributeError("getattr: %r object has no attribute %r" %
- (self.__class__, key))
-
- def __setattr__(self, key, value):
- for (member_name, passthrough_name) in self.passthroughs:
- if key==member_name:
- parts = passthrough_name.split(".")
- obj = self
- for part in parts[:-1]:
- obj = getattr(obj, part)
- if not obj:
- return
- setattr(obj, parts[-1], value)
-
- super(CordSubscriber, self).__setattr__(key, value)
-
- def save(self, *args, **kwargs):
- super(CordSubscriber, self).save(*args, **kwargs)
-
- # in case the vcpe or vbng fields were altered
- # TODO: dirty detection?
- if (self.volt):
- print "save volt"
- self.volt.save()
- if (self.volt.vcpe):
- print "save vcpe"
- self.volt.vcpe.save()
- if (self.volt.vcpe.vbng):
- print "save vbng", self.volt.vcpe.vbng
- print "attr", self.volt.vcpe.vbng.service_specific_attribute
- self.volt.vcpe.vbng.save()
-
-
-
-
-
-
-
-