[EDGEPOD-149] Adding fabric link in Switch model
Change-Id: Id03fc5c58385820276654ba4c9ab549748997caf
diff --git a/VERSION b/VERSION
index 4a36342..05d78bc 100644
--- a/VERSION
+++ b/VERSION
@@ -1 +1 @@
-3.0.0
+3.0.1-dev
diff --git a/xos/synchronizer/migrations/0008_switch_fabric.py b/xos/synchronizer/migrations/0008_switch_fabric.py
new file mode 100644
index 0000000..97eda68
--- /dev/null
+++ b/xos/synchronizer/migrations/0008_switch_fabric.py
@@ -0,0 +1,35 @@
+# 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.29 on 2020-04-22 08:16
+from __future__ import unicode_literals
+
+from django.db import migrations, models
+import django.db.models.deletion
+
+
+class Migration(migrations.Migration):
+
+ dependencies = [
+ ('fabric', '0007_switch_pipeconf'),
+ ]
+
+ operations = [
+ migrations.AddField(
+ model_name='switch',
+ name='fabric',
+ field=models.ForeignKey(blank=True, help_text=b'The Fabric Service which owns this switch', null=True, on_delete=django.db.models.deletion.CASCADE, related_name='switch', to='fabric.FabricService'),
+ ),
+ ]
diff --git a/xos/synchronizer/models/fabric.xproto b/xos/synchronizer/models/fabric.xproto
index d7023bd..53ca376 100644
--- a/xos/synchronizer/models/fabric.xproto
+++ b/xos/synchronizer/models/fabric.xproto
@@ -43,6 +43,10 @@
optional string pipeconf = 9 [
help_text = "Pipeline configuration",
max_length = 1024];
+ optional manytoone fabric->FabricService:switch = 10:1013 [
+ help_text = "The Fabric Service which owns this switch",
+ db_index = True,
+ tosca_key=True];
}
message SwitchPort(XOSBase) {