Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Scheduled Configurations #3

Draft
wants to merge 7 commits into
base: master
Choose a base branch
from
Draft
Show file tree
Hide file tree
Changes from 2 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 6 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -111,3 +111,9 @@ sources.list.*

# Generated mirror configs
apt-retries-count

# Python venv
venv/**

src/protobuf/**
fsroot-vs/**
6 changes: 3 additions & 3 deletions rules/config
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
# SONIC_CONFIG_BUILD_JOBS - set number of jobs for parallel build.
# Corresponding -j argument will be passed to make command inside docker
# container.
SONIC_CONFIG_BUILD_JOBS = 1
SONIC_CONFIG_BUILD_JOBS = 12

# SONIC_CONFIG_MAKE_JOBS - set number of parallel make jobs per package.
# Corresponding -j argument will be passed to make/dpkg commands that build separate packages
Expand Down Expand Up @@ -46,7 +46,7 @@ CHANGE_DEFAULT_PASSWORD ?= n
DEFAULT_USERNAME = admin

# DEFAULT_PASSWORD - default password for installer build
DEFAULT_PASSWORD = YourPaSsWoRd
DEFAULT_PASSWORD = Marv12\#$

# ENABLE_DHCP_GRAPH_SERVICE - specify the source of minigraph to generate configuration file.
# If set to y SONiC will get the minigraph from graph service. Graph service URL need to be
Expand Down Expand Up @@ -153,7 +153,7 @@ INCLUDE_RESTAPI ?= n
INCLUDE_NAT = y

# INCLUDE_DHCP_RELAY - build and install dhcp-relay package
INCLUDE_DHCP_RELAY = y
INCLUDE_DHCP_RELAY = n

# INCLUDE_DHCP_SERVER - build and install dhcp-server package
INCLUDE_DHCP_SERVER ?= n
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,44 @@
module sonic-scheduled-configurations {

yang-version 1.1;

namespace "http://github.com/sonic-net/sonic-scheduled-configurations";
prefix scheduled-configurations;

description "SCHEDULED_CONFIGURATIONS YANG Module for SONiC OS Used for Scheduled Configuration";

revision 2024-05-09 {
description "First Revision";
}

container sonic-scheduled-configurations {

container SCHEDULED_CONFIGURATIONS {

description "TIME_RANGE part of config_db.json";

list SCHEDULED_CONFIGURATIONS_LIST {
description "List of scheduled configurations, each identified by unique name"

key "name";

leaf time_range {
mandatory true;
type string {
length 1..255;
}
description "time range this configuration is bound to";
}

leaf configuration {
type string;
description "configuration to be applied to APPL_DB in JSON format";
}
} /* end of list SCHEDULED_CONFIGURATIONS_LIST */

} /* end of container SCHEDULED_CONFIGURATIONS */

} /* end of top level container */

} /* end of module sonic-scheduled-configurations */

52 changes: 52 additions & 0 deletions src/sonic-yang-models/yang-models/sonic-timerange.yang
Original file line number Diff line number Diff line change
@@ -0,0 +1,52 @@
module sonic-timerange {

yang-version 1.1;

namespace "http://github.com/sonic-net/sonic-timerage";
prefix timerange;

description "TIME_RANGE YANG Module for SONiC OS Used for Scheduled Configuration";

revision 2024-05-09 {
description "First Revision";
}

container sonic-timerange {

container TIME_RANGE {

description "TIME_RANGE part of config_db.json";

list TIME_RANGE_LIST {
description "List of time ranges, each identified by unique name"

key "name";

leaf start {
matiAlfaro marked this conversation as resolved.
Show resolved Hide resolved
mandatory true;
type string {
length 1..255;
}
description "start time for time range";
}

leaf end {
type string {
length 1..255;
}
description "end time for time range";
}

leaf runOnce {
type boolean;
default "false";
description "Indicates whether the time range should trigger only once.";
}
} /* end of list TIME_RANGE_LIST */

} /* end of container TIME_RANGE */

} /* end of top level container */

} /* end of module sonic-timerange */