blob: 5cdb2ef9411aa5d7288273857e0a566b1c15568e [file] [log] [blame]
Scott Baker8e6647a2016-06-20 17:16:20 -07001import os
2import pdb
3import sys
4import tempfile
5sys.path.append("/opt/tosca")
6from translator.toscalib.tosca_template import ToscaTemplate
7import pdb
8
9from core.models import User, TenantRootPrivilege, TenantRootRole
10from services.volt.models import CordSubscriberRoot
11
12from xosresource import XOSResource
13
14class XOSCORDSubscriber(XOSResource):
15 provides = "tosca.nodes.CORDSubscriber"
16 xos_model = CordSubscriberRoot
17 copyin_props = ["service_specific_id", "firewall_enable", "url_filter_enable", "cdn_enable", "url_filter_level"]
18
19 def postprocess(self, obj):
20 rolemap = ( ("tosca.relationships.AdminPrivilege", "admin"), ("tosca.relationships.AccessPrivilege", "access"), )
21 self.postprocess_privileges(TenantRootRole, TenantRootPrivilege, rolemap, obj, "tenant_root")
22
23 def can_delete(self, obj):
24 return super(XOSCORDSubscriber, self).can_delete(obj)
25