Scott Baker | c3ce3e7 | 2016-06-20 17:35:19 -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 | import traceback |
| 12 | from xos.exceptions import * |
| 13 | from xos.config import Config |
| 14 | |
| 15 | class ConfigurationError(Exception): |
| 16 | pass |
| 17 | |
| 18 | VTN_KIND = "VTN" |
| 19 | |
| 20 | # ------------------------------------------- |
| 21 | # VTN |
| 22 | # ------------------------------------------- |
| 23 | |
| 24 | class VTNService(Service): |
| 25 | KIND = VTN_KIND |
| 26 | |
| 27 | class Meta: |
| 28 | app_label = "vtn" |
| 29 | verbose_name = "VTN Service" |
| 30 | proxy = True |
| 31 | |
| 32 | simple_attributes = ( ("privateGatewayMac", "00:00:00:00:00:01"), |
| 33 | ("localManagementIp", "172.27.0.1/24"), |
| 34 | ("ovsdbPort", "6641"), |
| 35 | ("sshPort", "22"), |
| 36 | ("sshUser", "root"), |
| 37 | ("sshKeyFile", "/root/node_key") , |
| 38 | ("mgmtSubnetBits", "24"), |
| 39 | ("xosEndpoint", "http://xos/"), |
| 40 | ("xosUser", "padmin@vicci.org"), |
| 41 | ("xosPassword", "letmein"), |
Scott Baker | b3a80de | 2016-09-06 16:51:27 -0700 | [diff] [blame] | 42 | ("vtnAPIVersion", 1), |
Scott Baker | ff01668 | 2016-11-28 09:53:13 -0800 | [diff] [blame] | 43 | ("controllerPort", "onos-cord:6653"), |
Scott Baker | c3ce3e7 | 2016-06-20 17:35:19 -0700 | [diff] [blame] | 44 | |
| 45 | ) |
| 46 | |
| 47 | VTNService.setup_simple_attributes() |