blob: 1320bf778e1e4e605b2de45660a75cc83d915571 [file] [log] [blame]
Matteo Scandoloa86e0a12017-08-08 13:05:27 -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
Sapan Bhatia084c0982017-04-21 14:47:40 +020017from django.db import models
Scott Bakerc7958a92017-07-18 11:07:00 -070018from core.models import Service, XOSBase, Slice, Instance, ServiceInstance, TenantWithContainer, Node, Image, User, Flavor, NetworkParameter, NetworkParameterType, Port, AddressPool
Sapan Bhatia7c0ed0f2017-05-19 23:10:53 +020019from core.models.xosbase import StrippedCharField
Sapan Bhatia084c0982017-04-21 14:47:40 +020020import os
21from django.db import models, transaction
22from django.forms.models import model_to_dict
23from django.db.models import *
24from operator import itemgetter, attrgetter, methodcaller
Sapan Bhatia084c0982017-04-21 14:47:40 +020025import traceback
26from xos.exceptions import *
Sapan Bhatia084c0982017-04-21 14:47:40 +020027from django.contrib.contenttypes.models import ContentType
28from django.contrib.contenttypes.fields import GenericForeignKey
29
30class ConfigurationError(Exception):
Matteo Scandolo15f11b92017-05-30 17:31:02 -070031 # FIXME log the error
Sapan Bhatia084c0982017-04-21 14:47:40 +020032 pass
33
34VTR_KIND = "vTR"