SEBA-566 Add linting and fix errors in fabric

Change-Id: Iae12d32931e95a84035614ddc81968bc9e1d34ae
diff --git a/Makefile b/Makefile
index ada7bb8..fd718d3 100644
--- a/Makefile
+++ b/Makefile
@@ -52,7 +52,7 @@
 docker-push:
 	docker push ${DOCKER_IMAGENAME}
 
-test: test-unit test-migration
+test: test-unit test-migration test-xproto
 
 test-unit:
 	tox
@@ -60,7 +60,7 @@
 venv-service:
 	virtualenv $@;\
     source ./$@/bin/activate ; set -u ;\
-    pip install -r requirements.txt xosmigrate~=3.0.1
+    pip install -r requirements.txt xosmigrate~=3.2.1
 
 create-migration: venv-service
 	source ./venv-service/bin/activate; set -u;\
@@ -70,6 +70,10 @@
 	source ./venv-service/bin/activate; set -u;\
     cd xos; xos-migrate --xos-dir ${XOS_DIR} --services-dir ${SERVICES_DIR} -s ${SERVICE_NAME} --check
 
+test-xproto: venv-service
+	source ./venv-service/bin/activate; set -u;\
+    xosgenx --lint --strict xos/synchronizer/models/fabric.xproto
+
 clean:
 	find . -name '*.pyc' | xargs rm -f
 	rm -rf \
diff --git a/VERSION b/VERSION
index ccbccc3..84e6d84 100644
--- a/VERSION
+++ b/VERSION
@@ -1 +1 @@
-2.2.0
+2.2.1-dev
diff --git a/requirements.txt b/requirements.txt
index a1a09fc..f0dff7f 100644
--- a/requirements.txt
+++ b/requirements.txt
@@ -1,4 +1,4 @@
-xossynchronizer~=3.0.1
-xosapi~=3.0.1
-xoskafka~=3.0.1
+xossynchronizer~=3.2.1
+xosapi~=3.2.1
+xoskafka~=3.2.1
 ipaddress~=1.0.22
diff --git a/xos/synchronizer/migrations/0005_auto_20190409_1831.py b/xos/synchronizer/migrations/0005_auto_20190409_1831.py
new file mode 100644
index 0000000..eb568eb
--- /dev/null
+++ b/xos/synchronizer/migrations/0005_auto_20190409_1831.py
@@ -0,0 +1,59 @@
+# Copyright 2017-present Open Networking Foundation
+#
+# Licensed under the Apache License, Version 2.0 (the "License");
+# you may not use this file except in compliance with the License.
+# You may obtain a copy of the License at
+#
+# http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing, software
+# distributed under the License is distributed on an "AS IS" BASIS,
+# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+# See the License for the specific language governing permissions and
+# limitations under the License.
+
+# -*- coding: utf-8 -*-
+# Generated by Django 1.11.20 on 2019-04-09 22:31
+from __future__ import unicode_literals
+
+from django.db import migrations, models
+
+
+class Migration(migrations.Migration):
+
+    dependencies = [
+        ('fabric', '0004_auto_20190320_1456'),
+    ]
+
+    operations = [
+        migrations.AlterField(
+            model_name='fabricipaddress',
+            name='description',
+            field=models.CharField(blank=True, help_text=b'A short description of the IP address', max_length=256, null=True),
+        ),
+        migrations.AlterField(
+            model_name='portinterface',
+            name='name',
+            field=models.CharField(help_text=b'The unique name of the fabric switch port', max_length=256),
+        ),
+        migrations.AlterField(
+            model_name='switch',
+            name='driver',
+            field=models.CharField(default=b'ofdpa3', help_text=b'The driver used by the SDN controller', max_length=256),
+        ),
+        migrations.AlterField(
+            model_name='switch',
+            name='name',
+            field=models.CharField(help_text=b'The unique name of the fabric switch', max_length=256),
+        ),
+        migrations.AlterField(
+            model_name='switchport',
+            name='admin_state',
+            field=models.CharField(blank=True, choices=[(b'enabled', b'enabled'), (b'disabled', b'disabled')], default=b'enabled', help_text=b'desired administrative state of port', max_length=32, null=True),
+        ),
+        migrations.AlterField(
+            model_name='switchport',
+            name='oper_status',
+            field=models.CharField(blank=True, choices=[(b'enabled', b'enabled'), (b'disabled', b'disabled')], help_text=b'operational status of port', max_length=32, null=True),
+        ),
+    ]
diff --git a/xos/synchronizer/models/fabric.xproto b/xos/synchronizer/models/fabric.xproto
index 4f305b9..df4275c 100644
--- a/xos/synchronizer/models/fabric.xproto
+++ b/xos/synchronizer/models/fabric.xproto
@@ -19,11 +19,11 @@
         max_length = 19];
     required string name = 2 [
         help_text = "The unique name of the fabric switch",
-        max_length = 254];
+        max_length = 256];
     required string driver = 3 [
         help_text = "The driver used by the SDN controller",
         default = "ofdpa3",
-        max_length = 254];
+        max_length = 256];
     required int32 ipv4NodeSid = 4 [
         help_text = "The MPLS label used by the switch [17 - 1048576]"];
     required string ipv4Loopback = 5 [
@@ -54,11 +54,13 @@
     optional string admin_state = 4 [
         help_text = "desired administrative state of port",
         choices = "(('enabled', 'enabled'), ('disabled', 'disabled'))",
-        default = "enabled"];
+        default = "enabled",
+        max_length = 32];
     optional string oper_status = 5 [
         help_text = "operational status of port",
         choices = "(('enabled', 'enabled'), ('disabled', 'disabled'))",
-        feedback_state = True];
+        feedback_state = True,
+        max_length = 32];
 }
 
 message PortInterface(XOSBase) {
@@ -70,7 +72,7 @@
         db_index = True];
     required string name = 2 [
         help_text = "The unique name of the fabric switch port",
-        max_length = 254];
+        max_length = 256];
     optional int32 vlanUntagged = 3 [
         help_text = "The optional untagged VLAN ID for the interface"];
 }
@@ -104,5 +106,5 @@
         unique_with = "interface"];
     optional string description = 3 [
         help_text = "A short description of the IP address",
-        max_length = 254];
+        max_length = 256];
 }