SEBA-566 Add linting and fix errors in rcord

Change-Id: I37566a5d85a3f4040eb1a44bd6ac65bc24aec3d6
diff --git a/Makefile b/Makefile
index 3d56a8a..fdfd71e 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/rcord.xproto
+
 clean:
 	find . -name '*.pyc' | xargs rm -f
 	rm -rf \
diff --git a/VERSION b/VERSION
index f0bb29e..625610e 100644
--- a/VERSION
+++ b/VERSION
@@ -1 +1 @@
-1.3.0
+1.3.1-dev
diff --git a/requirements.txt b/requirements.txt
index e039eea..669c29b 100644
--- a/requirements.txt
+++ b/requirements.txt
@@ -1,3 +1,3 @@
-xossynchronizer~=3.0.1
-xosapi~=3.0.1
-xoskafka~=3.0.1
+xossynchronizer~=3.2.1
+xosapi~=3.2.1
+xoskafka~=3.2.1
diff --git a/xos/synchronizer/migrations/0007_auto_20190409_1904.py b/xos/synchronizer/migrations/0007_auto_20190409_1904.py
new file mode 100644
index 0000000..88a626b
--- /dev/null
+++ b/xos/synchronizer/migrations/0007_auto_20190409_1904.py
@@ -0,0 +1,64 @@
+# 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 23:04
+from __future__ import unicode_literals
+
+from django.db import migrations, models
+
+
+class Migration(migrations.Migration):
+
+    dependencies = [
+        ('rcord', '0006_bandwidth_profiles_required'),
+    ]
+
+    operations = [
+        migrations.AlterField(
+            model_name='bandwidthprofile_decl',
+            name='name',
+            field=models.CharField(help_text=b'Name of bandwidth profile', max_length=256),
+        ),
+        migrations.AlterField(
+            model_name='rcordipaddress_decl',
+            name='description',
+            field=models.TextField(blank=True, help_text=b'A short description of the IP address', null=True),
+        ),
+        migrations.AlterField(
+            model_name='rcordsubscriber_decl',
+            name='circuit_id',
+            field=models.CharField(blank=True, help_text=b'Option 82 Circuit ID for DHCP relay agent', max_length=256, null=True),
+        ),
+        migrations.AlterField(
+            model_name='rcordsubscriber_decl',
+            name='mac_address',
+            field=models.CharField(blank=True, help_text=b'Subscriber MAC Address', max_length=256, null=True),
+        ),
+        migrations.AlterField(
+            model_name='rcordsubscriber_decl',
+            name='nas_port_id',
+            field=models.CharField(blank=True, help_text=b'NAS Port ID used in Radius to identify physical interface used to authenticate subscriber', max_length=256, null=True),
+        ),
+        migrations.AlterField(
+            model_name='rcordsubscriber_decl',
+            name='onu_device',
+            field=models.CharField(help_text=b'ONUDevice serial number', max_length=256),
+        ),
+        migrations.AlterField(
+            model_name='rcordsubscriber_decl',
+            name='remote_id',
+            field=models.CharField(blank=True, help_text=b'Option 82 Remote ID for DHCP relay agent', max_length=256, null=True),
+        ),
+    ]
diff --git a/xos/synchronizer/models/rcord.xproto b/xos/synchronizer/models/rcord.xproto
index 0e84d0f..15a3641 100644
--- a/xos/synchronizer/models/rcord.xproto
+++ b/xos/synchronizer/models/rcord.xproto
@@ -17,7 +17,9 @@
     option description = "The Bandwidth Profile assinged to a residential subscriber";
 
     // TODO add help_text
-    required string name = 3;
+    required string name = 3 [
+        help_text = "Name of bandwidth profile",
+        max_length = 256];
     required int32 cir = 4;
     required int32 cbs = 5;
     required int32 eir = 6;
@@ -52,17 +54,22 @@
         min_value = 0,
         max_value = 4096];
     required string onu_device = 13 [
-        help_text = "ONUDevice serial number"];
+        help_text = "ONUDevice serial number",
+        max_length = 256];
     optional string mac_address = 18 [
-        help_text = "Subscriber MAC Address"];
+        help_text = "Subscriber MAC Address",
+        max_length = 256];
 
     // operator specific fields
     optional string nas_port_id = 20 [
-        help_text = "NAS Port ID used in Radius to identify physical interface used to authenticate subscriber"];
+        help_text = "NAS Port ID used in Radius to identify physical interface used to authenticate subscriber",
+        max_length = 256];
     optional string circuit_id = 21 [
-        help_text = "Option 82 Circuit ID for DHCP relay agent"];
+        help_text = "Option 82 Circuit ID for DHCP relay agent",
+        max_length = 256];
     optional string remote_id = 22 [
-        help_text = "Option 82 Remote ID for DHCP relay agent"];
+        help_text = "Option 82 Remote ID for DHCP relay agent",
+        max_length = 256];
 
     required manytoone upstream_bps->BandwidthProfile:us_subscriber = 31:1001 [
         help_text = "The subscriber the IP address belongs to"];
@@ -83,5 +90,5 @@
         unique_with = "subscriber"];
     optional string description = 3 [
         help_text = "A short description of the IP address",
-        max_length = 254];
+        text = True];
 }