blob: 19d1db7816d12442f421691c14374bda572e6c3e [file] [log] [blame]
Scott Baker8e6647a2016-06-20 17:16:20 -07001from core.models import User, TenantRootPrivilege, TenantRootRole
Scott Bakerc15556d2017-05-06 09:55:01 -07002from services.rcord.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