SEBA-513 Cleanup errors reported by xproto validator
Change-Id: Ib529b458fc059d293389f294238fd1f4c45211c4
diff --git a/xos/synchronizer/migrations/0004_auto_20190307_1449.py b/xos/synchronizer/migrations/0004_auto_20190307_1449.py
new file mode 100644
index 0000000..cffe2f6
--- /dev/null
+++ b/xos/synchronizer/migrations/0004_auto_20190307_1449.py
@@ -0,0 +1,90 @@
+# 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.11 on 2019-03-07 19:49
+from __future__ import unicode_literals
+
+from django.db import migrations, models
+import django.utils.timezone
+
+
+class Migration(migrations.Migration):
+
+ dependencies = [
+ ('kubernetes', '0003_auto_20190305_0235'),
+ ]
+
+ operations = [
+ migrations.AlterField(
+ model_name='kubernetesconfigvolumemount',
+ name='backend_status',
+ field=models.CharField(default=b'Provisioning in progress', max_length=1024),
+ ),
+ migrations.AlterField(
+ model_name='kubernetesconfigvolumemount',
+ name='leaf_model_name',
+ field=models.CharField(help_text=b'The most specialized model in this chain of inheritance, often defined by a service developer', max_length=1024),
+ ),
+ migrations.AlterField(
+ model_name='kubernetesconfigvolumemount',
+ name='mount_path',
+ field=models.CharField(help_text=b'Path to mount secret', max_length=1024),
+ ),
+ migrations.AlterField(
+ model_name='kubernetesconfigvolumemount',
+ name='updated',
+ field=models.DateTimeField(default=django.utils.timezone.now, help_text=b'Time this model was changed by a non-synchronizer'),
+ ),
+ migrations.AlterField(
+ model_name='kubernetesdata',
+ name='backend_status',
+ field=models.CharField(default=b'Provisioning in progress', max_length=1024),
+ ),
+ migrations.AlterField(
+ model_name='kubernetesdata',
+ name='leaf_model_name',
+ field=models.CharField(help_text=b'The most specialized model in this chain of inheritance, often defined by a service developer', max_length=1024),
+ ),
+ migrations.AlterField(
+ model_name='kubernetesdata',
+ name='name',
+ field=models.CharField(help_text=b'Name of this data store', max_length=256),
+ ),
+ migrations.AlterField(
+ model_name='kubernetesdata',
+ name='updated',
+ field=models.DateTimeField(default=django.utils.timezone.now, help_text=b'Time this model was changed by a non-synchronizer'),
+ ),
+ migrations.AlterField(
+ model_name='kubernetessecretvolumemount',
+ name='backend_status',
+ field=models.CharField(default=b'Provisioning in progress', max_length=1024),
+ ),
+ migrations.AlterField(
+ model_name='kubernetessecretvolumemount',
+ name='leaf_model_name',
+ field=models.CharField(help_text=b'The most specialized model in this chain of inheritance, often defined by a service developer', max_length=1024),
+ ),
+ migrations.AlterField(
+ model_name='kubernetessecretvolumemount',
+ name='mount_path',
+ field=models.CharField(help_text=b'Path to mount secret', max_length=1024),
+ ),
+ migrations.AlterField(
+ model_name='kubernetessecretvolumemount',
+ name='updated',
+ field=models.DateTimeField(default=django.utils.timezone.now, help_text=b'Time this model was changed by a non-synchronizer'),
+ ),
+ ]
diff --git a/xos/synchronizer/models/kubernetes.xproto b/xos/synchronizer/models/kubernetes.xproto
index e3f85d3..ea218e9 100644
--- a/xos/synchronizer/models/kubernetes.xproto
+++ b/xos/synchronizer/models/kubernetes.xproto
@@ -32,7 +32,6 @@
max_length=32,
null = True];
required bool need_event = 2 [
- blank = True,
help_text = "True if a kafka event needs to be sent by the pull step",
default = False];
optional string last_event_sent = 3 [
@@ -47,22 +46,16 @@
message KubernetesData (XOSBase) {
option description = "Base class for Kubernetes ConfigMaps, Secrets, and similar models";
- optional string name = 1 [
+ required string name = 1 [
help_text = "Name of this data store",
- blank = False,
db_index = False,
- max_length=256,
- null = False];
+ max_length=256];
optional string data = 2 [
help_text = "Set of key,value pairs encoded as a json dictionary",
- blank = True,
- db_index = False,
- null = True];
+ db_index = False];
required manytoone trust_domain->TrustDomain:kubernetes_configmaps = 3:1003 [
help_text = "Trust domain this data resides in",
- blank = False,
- db_index = True,
- null = False];
+ db_index = True];
}
message KubernetesConfigMap (KubernetesData) {
@@ -86,18 +79,14 @@
blank = False,
db_index = True,
null = False];
- optional string mount_path = 3 [
+ required string mount_path = 3 [
help_text = "Path to mount secret",
- blank = False,
db_index = False,
- max_length=256,
- null = False];
+ max_length=1024];
optional string sub_path = 4 [
help_text = "Subpath within secret to mount",
- blank = True,
db_index = False,
- max_length=1024,
- null = True];
+ max_length=1024];
}
message KubernetesConfigVolumeMount (XOSBase) {
@@ -113,17 +102,13 @@
blank = False,
db_index = True,
null = False];
- optional string mount_path = 3 [
+ required string mount_path = 3 [
help_text = "Path to mount secret",
- blank = False,
db_index = False,
- max_length=1024,
- null = False];
+ max_length=1024];
optional string sub_path = 4 [
help_text = "Subpath within secret to mount",
- blank = True,
db_index = False,
- max_length=1024,
- null = True];
+ max_length=1024];
}