blob: b25bda7c92b1253c9ab1ccbbcfb20fe52b3e4047 [file] [log] [blame]
Scott Baker8e6647a2016-06-20 17:16:20 -07001from core.models import User, TenantRootPrivilege, TenantRootRole
2from services.volt.models import CordSubscriberRoot
Scott Baker8e6647a2016-06-20 17:16:20 -07003from xosresource import XOSResource
4
5class XOSCORDSubscriber(XOSResource):
6 provides = "tosca.nodes.CORDSubscriber"
7 xos_model = CordSubscriberRoot
8 copyin_props = ["service_specific_id", "firewall_enable", "url_filter_enable", "cdn_enable", "url_filter_level"]
9
10 def postprocess(self, obj):
11 rolemap = ( ("tosca.relationships.AdminPrivilege", "admin"), ("tosca.relationships.AccessPrivilege", "access"), )
12 self.postprocess_privileges(TenantRootRole, TenantRootPrivilege, rolemap, obj, "tenant_root")
13
14 def can_delete(self, obj):
15 return super(XOSCORDSubscriber, self).can_delete(obj)
16