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