Skip to content

Commit

Permalink
[SEBA-980] Introduce maintenance_mode field in XOSCore Object
Browse files Browse the repository at this point in the history
Change-Id: I7907ec8949d56640912ab2969ac638ab49a0fb53
  • Loading branch information
himanshu-bhandari01 committed May 25, 2020
1 parent 5faac65 commit 3e79195
Show file tree
Hide file tree
Showing 3 changed files with 42 additions and 1 deletion.
2 changes: 1 addition & 1 deletion VERSION
@@ -1 +1 @@
4.0.3
4.0.4-dev
34 changes: 34 additions & 0 deletions 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),
),
]
7 changes: 7 additions & 0 deletions xos/core/models/core.xproto
Expand Up @@ -600,7 +600,14 @@ message TrustDomain (XOSBase) {
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) {
Expand Down

0 comments on commit 3e79195

Please sign in to comment.