blob: 3341fc4e50d3cecc7f6bb8739d9f2023ad658837 [file] [log] [blame]
Matteo Scandoloeb0d11c2017-08-08 13:05:26 -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
Murat Parlakisik638c65f2017-05-31 11:10:24 +030017# Monitoring models
18from django.db import models
19from django.core.validators import URLValidator
20from core.models import Service, PlCoreBase, Slice, Instance, Tenant, TenantWithContainer, Node, Image, User, Flavor, ServiceDependency, ServiceMonitoringAgentInfo
21from core.models.plcorebase import StrippedCharField
22import os
23from django.db import models, transaction
24from django.forms.models import model_to_dict
25from django.db.models import Q
26from operator import itemgetter, attrgetter, methodcaller
27import traceback
28from xos.exceptions import *
29from core.models import SlicePrivilege, SitePrivilege
30from sets import Set
31from urlparse import urlparse
32
33class ConfigurationError(Exception):
34 pass
35
36
37CEILOMETER_KIND = "ceilometer"
38#Ensure the length of name for 'kind' attribute is below 30
39CEILOMETER_PUBLISH_TENANT_KIND = "ceilo-publish-tenant"
40CEILOMETER_PUBLISH_TENANT_OS_KIND = "ceilo-os-publish-tenant"
41CEILOMETER_PUBLISH_TENANT_ONOS_KIND = "ceilo-onos-publish-tenant"
42CEILOMETER_PUBLISH_TENANT_USER_KIND = "ceilo-user-publish-tenant"