[EDGEPOD-38] Multiple site support for XOS Services

Change-Id: Ie864c425087dbad030774c029d4d12bc92aef934
diff --git a/VERSION b/VERSION
index 1454f6e..3485cb2 100644
--- a/VERSION
+++ b/VERSION
@@ -1 +1 @@
-4.0.1
+4.0.2-dev
diff --git a/xos/core/migrations/0013_service_decl_site.py b/xos/core/migrations/0013_service_decl_site.py
new file mode 100644
index 0000000..677d3e5
--- /dev/null
+++ b/xos/core/migrations/0013_service_decl_site.py
@@ -0,0 +1,37 @@
+# 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-03-13 10:25
+from __future__ import unicode_literals
+
+import core.models.xosbase_header
+from django.db import migrations, models
+import django.db.models.deletion
+
+
+class Migration(migrations.Migration):
+
+    dependencies = [
+        ('core', '0012_backupoperation_decl_uuid'),
+    ]
+
+    operations = [
+        migrations.AddField(
+            model_name='service_decl',
+            name='site',
+            field=models.ForeignKey(blank=True, help_text=b'The Site this Service belongs to', null=True, on_delete=django.db.models.deletion.CASCADE, related_name='service', to='core.Site'),
+        ),
+    ]
+
diff --git a/xos/core/models/core.xproto b/xos/core/models/core.xproto
index 8a77234..50ad6a6 100644
--- a/xos/core/models/core.xproto
+++ b/xos/core/models/core.xproto
@@ -384,6 +384,10 @@
          help_text = "Service-specific string attribute, opaque to XOS core",
          gui_hidden = True,
          text = True];
+     optional manytoone site->Site:service = 13:1012 [
+         help_text = "The Site this Service belongs to",
+         db_index = True];
+
 }
 
 message ServicePort (XOSBase) {