CORD-1177: Brought VTN service over to xproto

Change-Id: I668688418f478073b0dba91d56663212670c9c70
diff --git a/xos/attic/header.py b/xos/attic/header.py
new file mode 100644
index 0000000..55d37fb
--- /dev/null
+++ b/xos/attic/header.py
@@ -0,0 +1,15 @@
+from django.db import models
+from django.db.models import *
+from core.models import Service
+from core.models.plcorebase import StrippedCharField
+import os
+from django.db import models, transaction
+from django.forms.models import model_to_dict
+import traceback
+from xos.exceptions import *
+from xos.config import Config
+
+class ConfigurationError(Exception):
+    pass
+
+VTN_KIND = "VTN"
diff --git a/xos/header.py b/xos/header.py
new file mode 120000
index 0000000..721b5c0
--- /dev/null
+++ b/xos/header.py
@@ -0,0 +1 @@
+attic/header.py
\ No newline at end of file
diff --git a/xos/models.py b/xos/models.py
deleted file mode 100644
index ec2162a..0000000
--- a/xos/models.py
+++ /dev/null
@@ -1,39 +0,0 @@
-from django.db import models
-from core.models import Service
-from core.models.plcorebase import StrippedCharField
-import os
-from django.db import models, transaction
-from django.forms.models import model_to_dict
-import traceback
-from xos.exceptions import *
-from xos.config import Config
-
-class ConfigurationError(Exception):
-    pass
-
-VTN_KIND = "VTN"
-
-# -------------------------------------------
-# VTN
-# -------------------------------------------
-
-class VTNService(Service):
-    KIND = VTN_KIND
-
-    class Meta:
-        app_label = "vtn"
-        verbose_name = "VTN Service"
-
-    privateGatewayMac = StrippedCharField(max_length=30, default="00:00:00:00:00:01")
-    localManagementIp = StrippedCharField(max_length=30, default="172.27.0.1/24")
-    ovsdbPort = models.IntegerField(default=6641)
-    sshPort = models.IntegerField(default=22)
-    sshUser = StrippedCharField(max_length=30, default="root")
-    sshKeyFile = StrippedCharField(max_length=1024, default="/root/node_key")
-    mgmtSubnetBits = models.IntegerField(default=24)
-    xosEndpoint = StrippedCharField(max_length=1024, default="http://xos/")
-    xosUser = StrippedCharField(max_length=255, default="padmin@vicci.org")
-    xosPassword = StrippedCharField(max_length=255, default="letmein")
-    vtnAPIVersion = models.IntegerField(default=1)
-    controllerPort = StrippedCharField(max_length=255, default="onos-cord:6653")
-
diff --git a/xos/vtn-onboard.yaml b/xos/vtn-onboard.yaml
index d454214..a999bce 100644
--- a/xos/vtn-onboard.yaml
+++ b/xos/vtn-onboard.yaml
@@ -13,7 +13,7 @@
           base_url: file:///opt/xos_services/vtn/xos/
           # The following will concatenate with base_url automatically, if
           # base_url is non-null.
-          models: models.py
+          xproto: ./
           admin: admin.py
           django_library: synchronizer/vtnnetport.py
           admin_template: templates/vtnadmin.html
diff --git a/xos/vtn.xproto b/xos/vtn.xproto
new file mode 100644
index 0000000..bd7ff54
--- /dev/null
+++ b/xos/vtn.xproto
@@ -0,0 +1,18 @@
+option kind = "VTN";
+option name = "vtn";
+option verbose_name = "VTN Service";
+
+message VTNService (Service){
+     required string privateGatewayMac = 1 [default = "00:00:00:00:00:01", max_length = 30, content_type = "stripped", blank = False, null = False, db_index = False];
+     required string localManagementIp = 2 [default = "172.27.0.1/24", max_length = 30, content_type = "stripped", blank = False, null = False, db_index = False];
+     required int32 ovsdbPort = 3 [default = 6641, null = False, db_index = False, blank = False];
+     required int32 sshPort = 4 [default = 22, null = False, db_index = False, blank = False];
+     required string sshUser = 5 [default = "root", max_length = 30, content_type = "stripped", blank = False, null = False, db_index = False];
+     required string sshKeyFile = 6 [default = "/root/node_key", max_length = 1024, content_type = "stripped", blank = False, null = False, db_index = False];
+     required int32 mgmtSubnetBits = 7 [default = 24, null = False, db_index = False, blank = False];
+     required string xosEndpoint = 8 [default = "http://xos/", max_length = 1024, content_type = "stripped", blank = False, null = False, db_index = False];
+     required string xosUser = 9 [default = "padmin@vicci.org", max_length = 255, content_type = "stripped", blank = False, null = False, db_index = False];
+     required string xosPassword = 10 [default = "letmein", max_length = 255, content_type = "stripped", blank = False, null = False, db_index = False];
+     required int32 vtnAPIVersion = 11 [default = 1, null = False, db_index = False, blank = False];
+     required string controllerPort = 12 [default = "onos-cord:6653", max_length = 255, content_type = "stripped", blank = False, null = False, db_index = False];
+}