blob: 69f66523dcbc12d3bbab8ec0377142bf89b935d1 [file] [log] [blame]
Matteo Scandolo5e293c92017-08-08 13:05:23 -07001
2# Copyright 2017-present Open Networking Foundation
3#
4# Licensed under the Apache License, Version 2.0 (the "License");
5# you may not use this file except in compliance with the License.
6# You may obtain a copy of the License at
7#
8# http://www.apache.org/licenses/LICENSE-2.0
9#
10# Unless required by applicable law or agreed to in writing, software
11# distributed under the License is distributed on an "AS IS" BASIS,
12# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13# See the License for the specific language governing permissions and
14# limitations under the License.
15
16
Scott Bakerd7590f72017-07-18 11:37:22 -070017#from core.models import User, TenantRootPrivilege, TenantRootRole
Scott Bakerc15556d2017-05-06 09:55:01 -070018from services.rcord.models import CordSubscriberRoot
Scott Baker8e6647a2016-06-20 17:16:20 -070019from xosresource import XOSResource
20
21class XOSCORDSubscriber(XOSResource):
22 provides = "tosca.nodes.CORDSubscriber"
23 xos_model = CordSubscriberRoot
24 copyin_props = ["service_specific_id", "firewall_enable", "url_filter_enable", "cdn_enable", "url_filter_level"]
25
Scott Bakerd7590f72017-07-18 11:37:22 -070026# def postprocess(self, obj):
27# rolemap = ( ("tosca.relationships.AdminPrivilege", "admin"), ("tosca.relationships.AccessPrivilege", "access"), )
28# self.postprocess_privileges(TenantRootRole, TenantRootPrivilege, rolemap, obj, "tenant_root")
Scott Baker8e6647a2016-06-20 17:16:20 -070029
30 def can_delete(self, obj):
31 return super(XOSCORDSubscriber, self).can_delete(obj)
32