blob: 2c1b70796b1b421a67529233347c209606e55750 [file] [log] [blame]
Matteo Scandolo6288d5a2017-08-08 13:05:26 -07001# Copyright 2017-present Open Networking Foundation
2#
3# Licensed under the Apache License, Version 2.0 (the "License");
4# you may not use this file except in compliance with the License.
5# You may obtain a copy of the License at
6#
7# http://www.apache.org/licenses/LICENSE-2.0
8#
9# Unless required by applicable law or agreed to in writing, software
10# distributed under the License is distributed on an "AS IS" BASIS,
11# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12# See the License for the specific language governing permissions and
13# limitations under the License.
Sapan Bhatia51a804c2017-05-03 17:24:37 +020014from django.db import models
Andrea Campanella2a2df422017-08-30 16:59:17 +020015from core.models import Service, XOSBase, Slice, Instance, TenantWithContainer, Node, Image, User, Flavor, NetworkParameter, NetworkParameterType, Port, AddressPool, User
16from core.models.xosbase import StrippedCharField
Sapan Bhatia51a804c2017-05-03 17:24:37 +020017import os
18from django.db import models, transaction
Sapan Bhatia51a804c2017-05-03 17:24:37 +020019from django.forms.models import model_to_dict
Andrea Campanella2a2df422017-08-30 16:59:17 +020020from django.db.models import *
Sapan Bhatia51a804c2017-05-03 17:24:37 +020021from operator import itemgetter, attrgetter, methodcaller
22from core.models import Tag
23from core.models.service import LeastLoadedNodeScheduler
Andrea Campanella2a2df422017-08-30 16:59:17 +020024from services.addressmanager.models import AddressManagerService, AddressManagerServiceInstance
Sapan Bhatia51a804c2017-05-03 17:24:37 +020025import traceback
26from xos.exceptions import *
Andrea Campanella2a2df422017-08-30 16:59:17 +020027from django.contrib.contenttypes.models import ContentType
Sapan Bhatia51a804c2017-05-03 17:24:37 +020028
29class ConfigurationError(Exception):
30 pass
31
32VEG_KIND = "vEG"
33CORD_SUBSCRIBER_KIND = "CordSubscriberRoot"
Andrea Campanella2a2df422017-08-30 16:59:17 +020034