[SEBA-537] Adding priority to ServiceGraphConstraint models to allow
multiple entries
Change-Id: I24bf8091cacfd677efe6d706fc71102f7145224f
diff --git a/VERSION b/VERSION
index 74655df..f262bdc 100644
--- a/VERSION
+++ b/VERSION
@@ -1 +1 @@
-3.0.1-dev0
+3.0.1-dev1
diff --git a/xos/core/migrations/0009_auto_20190313_1442.py b/xos/core/migrations/0009_auto_20190313_1442.py
new file mode 100644
index 0000000..5b2340d
--- /dev/null
+++ b/xos/core/migrations/0009_auto_20190313_1442.py
@@ -0,0 +1,40 @@
+# 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-13 18:42
+from __future__ import unicode_literals
+
+import core.models.xosbase_header
+from django.db import migrations, models
+
+
+class Migration(migrations.Migration):
+
+ dependencies = [
+ ('core', '0008_auto_20190308_1328'),
+ ]
+
+ operations = [
+ migrations.AddField(
+ model_name='servicegraphconstraint_decl',
+ name='priority',
+ field=models.IntegerField(blank=True, default=0, help_text=b'The priority of the constraint, the one with highest priority will be used', null=True),
+ ),
+ migrations.AlterField(
+ model_name='servicegraphconstraint_decl',
+ name='constraints',
+ field=core.models.xosbase_header.StrippedCharField(help_text=b'A composite array defining service positions in the graph, eg [volt, vsg, [address_manager, vrouter]]', max_length=1024),
+ ),
+ ]
diff --git a/xos/core/models/core.xproto b/xos/core/models/core.xproto
index 96872be..69bcf41 100644
--- a/xos/core/models/core.xproto
+++ b/xos/core/models/core.xproto
@@ -541,6 +541,7 @@
message ServiceGraphConstraint (XOSBase) {
option verbose_name="Graph Constraint";
option description="Define the position of the nodes in the service graph";
- required string constraints = 1 [max_length = 1024, content_type = "stripped", help_text = "A composite array defining positions, eg [volt, vsg, [address_manager, vrouter]]", tosca_key=True];
+ required string constraints = 1 [max_length = 1024, content_type = "stripped", help_text = "A composite array defining service positions in the graph, eg [volt, vsg, [address_manager, vrouter]]", tosca_key=True];
+ optional int32 priority = 2 [help_text = "The priority of the constraint, the one with highest priority will be used", default=0];
}