| Scott Baker | 026d161 | 2016-04-20 16:58:44 -0700 | [diff] [blame] | 1 | from django.db import models |
| 2 | from core.models import Service, PlCoreBase, Slice, Instance, Tenant, TenantWithContainer, Node, Image, User, Flavor, Subscriber, NetworkParameter, NetworkParameterType, Port, AddressPool |
| 3 | from core.models.plcorebase import StrippedCharField |
| 4 | import os |
| 5 | from django.db import models, transaction |
| 6 | from django.forms.models import model_to_dict |
| 7 | from django.db.models import Q |
| 8 | from operator import itemgetter, attrgetter, methodcaller |
| 9 | from core.models import Tag |
| 10 | from core.models.service import LeastLoadedNodeScheduler |
| 11 | from services.cord.models import CordSubscriberRoot |
| 12 | import traceback |
| 13 | from xos.exceptions import * |
| 14 | from xos.config import Config |
| 15 | |
| 16 | class ConfigurationError(Exception): |
| 17 | pass |
| 18 | |
| 19 | VTN_KIND = "VTN" |
| 20 | |
| 21 | # ------------------------------------------- |
| 22 | # VTN |
| 23 | # ------------------------------------------- |
| 24 | |
| 25 | class VTNService(Service): |
| 26 | KIND = VTN_KIND |
| 27 | |
| 28 | class Meta: |
| 29 | app_label = "vtn" |
| 30 | verbose_name = "VTN Service" |
| 31 | proxy = True |
| 32 | |
| 33 | simple_attributes = ( ("privateGatewayMac", "00:00:00:00:00:01"), |
| 34 | ("localManagementIp", "172.27.0.1/24"), |
| 35 | ("ovsdbPort", "6641"), |
| 36 | ("sshPort", "22"), |
| 37 | ("sshUser", "root"), |
| 38 | ("sshKeyFile", "/root/node_key") , |
| 39 | ("mgmtSubnetBits", "24"), |
| 40 | |
| 41 | ) |
| 42 | |
| 43 | VTNService.setup_simple_attributes() |
| 44 | |