[SEBA-980] Introduce maintenance_mode field in XOSCore Object

Change-Id: I7907ec8949d56640912ab2969ac638ab49a0fb53
diff --git a/VERSION b/VERSION
index c4e41f9..c77b5ad 100644
--- a/VERSION
+++ b/VERSION
@@ -1 +1 @@
-4.0.3
+4.0.4-dev
diff --git a/xos/core/migrations/0014_xoscore_decl_maintenance_mode.py b/xos/core/migrations/0014_xoscore_decl_maintenance_mode.py
new file mode 100644
index 0000000..58662b2
--- /dev/null
+++ b/xos/core/migrations/0014_xoscore_decl_maintenance_mode.py
@@ -0,0 +1,34 @@
+# 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-05-25 14:02
+from __future__ import unicode_literals
+
+from django.db import migrations, models
+
+
+class Migration(migrations.Migration):
+
+    dependencies = [
+        ('core', '0013_service_decl_site'),
+    ]
+
+    operations = [
+        migrations.AddField(
+            model_name='xoscore_decl',
+            name='maintenance_mode',
+            field=models.CharField(choices=[(b'NORMAL', b'NORMAL'), (b'DRAIN', b'DRAIN'), (b'READONLY', b'READONLY'), (b'OFFLINE', b'OFFLINE')], default=b'NORMAL', help_text=b'Displays current maintenance mode of XOS', max_length=256),
+        ),
+    ]
diff --git a/xos/core/models/core.xproto b/xos/core/models/core.xproto
index 29cbb54..aa505ed 100644
--- a/xos/core/models/core.xproto
+++ b/xos/core/models/core.xproto
@@ -600,7 +600,14 @@
 message XOSCore (XOSBase) {
      option singular="XOSCore";
      option plural="XOSCores";
+
      required string name = 1 [default = "XOS", max_length = 200, content_type = "stripped", blank = False, help_text = "Name of XOS", db_index = False, unique = True];
+     required string maintenance_mode = 2 [
+        help_text = "Displays current maintenance mode of XOS",
+        max_length = 256,
+	default = "NORMAL",
+        choices = "(('NORMAL', 'NORMAL'), ('DRAIN', 'DRAIN'), ('READONLY', 'READONLY'), ('OFFLINE', 'OFFLINE'))",
+        tosca_key = True];
 }
 
 message XOSGuiExtension::admin_policy (XOSBase) {