Scott Baker | c3ce3e7 | 2016-06-20 17:35:19 -0700 | [diff] [blame] | 1 | from django.db import models |
Scott Baker | 34726b8 | 2017-03-13 17:21:54 -0700 | [diff] [blame] | 2 | from core.models import Service |
Scott Baker | c3ce3e7 | 2016-06-20 17:35:19 -0700 | [diff] [blame] | 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 |
Scott Baker | c3ce3e7 | 2016-06-20 17:35:19 -0700 | [diff] [blame] | 7 | import traceback |
| 8 | from xos.exceptions import * |
| 9 | from xos.config import Config |
| 10 | |
| 11 | class ConfigurationError(Exception): |
| 12 | pass |
| 13 | |
| 14 | VTN_KIND = "VTN" |
| 15 | |
| 16 | # ------------------------------------------- |
| 17 | # VTN |
| 18 | # ------------------------------------------- |
| 19 | |
| 20 | class VTNService(Service): |
| 21 | KIND = VTN_KIND |
| 22 | |
| 23 | class Meta: |
| 24 | app_label = "vtn" |
| 25 | verbose_name = "VTN Service" |
Scott Baker | c3ce3e7 | 2016-06-20 17:35:19 -0700 | [diff] [blame] | 26 | |
Scott Baker | 34726b8 | 2017-03-13 17:21:54 -0700 | [diff] [blame] | 27 | privateGatewayMac = StrippedCharField(max_length=30, default="00:00:00:00:00:01") |
| 28 | localManagementIp = StrippedCharField(max_length=30, default="172.27.0.1/24") |
| 29 | ovsdbPort = models.IntegerField(default=6641) |
| 30 | sshPort = models.IntegerField(default=22) |
| 31 | sshUser = StrippedCharField(max_length=30, default="root") |
| 32 | sshKeyFile = StrippedCharField(max_length=1024, default="/root/node_key") |
| 33 | mgmtSubnetBits = models.IntegerField(default=24) |
| 34 | xosEndpoint = StrippedCharField(max_length=1024, default="http://xos/") |
| 35 | xosUser = StrippedCharField(max_length=255, default="padmin@vicci.org") |
| 36 | xosPassword = StrippedCharField(max_length=255, default="letmein") |
| 37 | vtnAPIVersion = models.IntegerField(default=1) |
| 38 | controllerPort = StrippedCharField(max_length=255, default="onos-cord:6653") |
Scott Baker | c3ce3e7 | 2016-06-20 17:35:19 -0700 | [diff] [blame] | 39 | |