Time management (TM) component.
Version: 2019-04-10
module huawei-tm { yang-version 1; namespace "urn:huawei:yang:huawei-tm"; prefix tm; import ietf-yang-types { prefix yang; } import huawei-pub-type { prefix pub-type; } import huawei-extension { prefix ext; } include huawei-tm-type; organization "Huawei Technologies Co., Ltd."; contact "Huawei Industrial Base Bantian, Longgang Shenzhen 518129 People's Republic of China Website: http://www.huawei.com Email: support@huawei.com"; description "Time management (TM) component."; revision "2019-04-10" { description "Init revision."; reference "Huawei private."; } ext:task-name "system"; container tm { description "Time management (TM) component."; container timezone-configuration { description "Configure time zone."; leaf timezone-name { type string { length "1..32"; } default "DefaultZoneName"; description "Specify the name of a time zone. The length of string is from 1 to 32 characters."; } leaf option { type tm-timezone-option; default "add"; description "Indicate whether to add or subtract the offset."; } leaf timezone-offset { type pub-type:time; default "00:00:00"; description "Specify the offset between the time of the specified time zone and the UTC time. It is in the format of HH:MM:SS. HH indicates hours and its value ranges from 0 to 18. MM and SS indicate minutes and seconds and their value ranges from 0 to 59."; } } // container timezone-configuration container dst-configuration { must "((type='OneYear' and start-year and start-month and start-day and start-time and end-year and end-month and end-day and end-time and dst-offset) or(type='Repeat-date' and start-month and start-day and start-time and end-month and end-day and end-time and dst-offset) or(type='Repeat-week' and start-month and start-weeknum and start-weekday and start-time and end-month and end-weeknum and end-weekday and end-time and dst-offset) or not(dst-name))"; description "Configure daylight saving time (DST). The end date must be later than the start date. If the type is OneYear, the start date and end date must be within one year. If the start-year and end-year are in the same year, end-month and start-month must be different. If the type is Repeat-date, the end-month and start-month must be different, and the dates cannot be set to February 29. If the type is Repeat-week, end-month and start-month must be different. The dst-offset must be less than the time difference between the end time and the start time."; leaf dst-name { type string { length "1..32"; } description "Specify a DST name. The length of string is from 1 to 32 characters."; } leaf type { when "../dst-name"; type tm-dst-type; description "Specify whether this setting is for one year or repeating."; } leaf start-year { ext:dynamic-default { ext:default-value "2000" { when "../type='Repeat-date' or ../type='Repeat-week'"; description "The start year default value is 2000 in repeat dst type."; } } when "../dst-name"; type uint16 { range "2000..2037"; } description "Specify the daylight saving start year."; } leaf start-month { when "../dst-name"; type tm-start-month; description "Specify the daylight saving start month."; } leaf start-day { when "../type='OneYear' and ../dst-name or ../type='Repeat-date' and ../dst-name"; type tm-date; description "Specify the daylight saving start date. It is in the format of DD."; } leaf start-weeknum { when "../type='Repeat-week' and ../dst-name"; type tm-weeknum; description "Specify the start week number in the specified month."; } leaf start-weekday { when "../type='Repeat-week' and ../dst-name"; type tm-start-weekday; description "Specify the start weekday."; } leaf start-time { when "../dst-name"; type pub-type:time-hhmm { pattern '(([0-1][0-9])|(2[0-3])|[0-9]):([0-5][0-9]|[0-9])'; } description "Specify the daylight saving start time. It is in the format of HH:MM."; } leaf end-year { ext:dynamic-default { ext:default-value "2037" { when "../type='Repeat-date' or ../type='Repeat-week'"; description "The start year default value is 2037 in repeat dst type."; } } when "../dst-name"; type uint16 { range "2000..2037"; } description "Specify the daylight saving end year."; } leaf end-month { when "../dst-name"; type tm-end-month; description "Specify the daylight saving end month."; } leaf end-day { when "../type='OneYear' and ../dst-name or ../type='Repeat-date' and ../dst-name"; type tm-date; description "Specify the daylight saving end date."; } leaf end-weeknum { when "../type='Repeat-week' and ../dst-name"; type tm-weeknum; description "Specify the end week number in the specified month."; } leaf end-weekday { when "../type='Repeat-week' and ../dst-name"; type tm-end-weekday; description "Specify the end weekday."; } leaf end-time { when "../dst-name"; type pub-type:time-hhmm { pattern '(([0-1][0-9])|(2[0-3])|[0-9]):([0-5][0-9]|[0-9])'; } description "Specify the daylight saving end time."; } leaf dst-offset { when "../dst-name"; type pub-type:time-hhmm { pattern '(([0-1][0-9])|(2[0-3])|[0-9]):([0-5][0-9]|[0-9])'; } description "Specify the time added to the summer time."; } } // container dst-configuration container date-and-time { config false; description "Statistics of date and time."; leaf current-time { type yang:date-and-time; config false; description "Specify the current date and time."; } leaf weekday { type tm-day-week; config false; description "Specify the day of a week."; } } // container date-and-time } // container tm rpc date-time { description "Date and time information."; input { leaf date-time { type yang:date-and-time; mandatory true; description "Date and time to be set."; } } } // rpc date-time } // module huawei-tm
© 2023 YumaWorks, Inc. All rights reserved.