Junos vmhost configuration module
Version: 2019-01-01
module junos-ex-conf-vmhost { yang-version 1; namespace "http://yang.juniper.net/junos-ex/conf/vmhost"; prefix jc-vmhost; import junos-common-ddl-extensions { prefix junos; revision-date "2019-01-01"; } import junos-common-types { prefix jt; revision-date "2019-01-01"; } import junos-ex-conf-root { prefix jc; revision-date "2019-01-01"; } organization "Juniper Networks, Inc."; contact "yang-support@juniper.net"; description "Junos vmhost configuration module"; revision "2019-01-01" { description "Junos: 21.3R1.9"; } augment /jc:configuration { uses vmhost-group; } augment /jc:configuration/jc:groups { uses vmhost-group; } grouping vmhost-group { container vmhost { description "VM Host configurations"; uses apply-advanced; leaf no-auto-recovery { type empty; description "Disable Guest auto recovery by the host"; } container management-if { presence "enable management-if"; description "Configuration for the host's side management interface"; uses apply-advanced; leaf link-mode { type enumeration { enum "automatic" { junos:must "("vmhost management-if speed automatic")"; junos:must-message "speed should be configured as auto"; value 0; description "Automatically negotiate duplex"; } enum "half-duplex" { junos:must "(("vmhost management-if speed 10m" || "vmhost management-if speed 100m"))"; junos:must-message "speed should be 10Mbps or 100Mbps"; value 1; description "Half-duplex operation"; } enum "full-duplex" { junos:must "(("vmhost management-if speed 10m" || ("vmhost management-if speed 100m" || "vmhost management-if speed 1g")))"; junos:must-message "speed should be 10Mbps, 100Mbps or 1Gbps"; value 2; description "Full-duplex operation"; } } default "automatic"; description "Link operational mode"; } leaf speed { type enumeration { enum "automatic" { junos:must "("vmhost management-if link-mode automatic")"; junos:must-message "link-mode should be configured as auto"; value 0; description "Automatically negotiate speed"; } enum "10m" { junos:must "(("vmhost management-if link-mode half-duplex" || "vmhost management-if link-mode full-duplex"))"; junos:must-message "link-mode should be half or full-duplex"; value 1; description "10Mbps operation"; } enum "100m" { junos:must "(("vmhost management-if link-mode half-duplex" || "vmhost management-if link-mode full-duplex"))"; junos:must-message "link-mode should be half or full-duplex"; value 2; description "100Mbps operation"; } enum "1g" { junos:must "("vmhost management-if link-mode full-duplex")"; junos:must-message "link-mode should be configured as full"; value 3; description "1Gbps operation"; } } default "automatic"; description "Link speed"; } leaf disable { type empty; description "Administratively disable the management port"; } } // container management-if container resize { junos:must "("system commit synchronize")"; junos:must-message "[system commit synchronize] has to be configured"; description "Resize the resource allocation of guest VM"; uses apply-advanced; container vjunos { description "Vjunos/adminjunos VM"; uses apply-advanced; leaf compact { type empty; description "Reduce the resource allocation of vjunos VM"; } } // container vjunos } // container resize list interfaces { key "name"; ordered-by user; description "Interface configuration"; leaf name { type enumeration { enum "management-if0" { value 0; description "Configuration for the host's side management interface0"; } enum "management-if1" { value 1; description "Configuration for the host's side management interface1"; } } } uses apply-advanced; container family { description "Protocol family"; container inet { presence "enable inet"; description "IPv4 parameters"; uses apply-advanced; list address { key "name"; ordered-by user; description "Interface address/destination prefix"; leaf name { type jt:ipv4prefix; description "Interface address/destination prefix"; } uses apply-advanced; leaf master-only { type empty; description "Master management IP address for host"; } } // list address leaf gateway { type jt:ipv4addr; description "Gateway IP address"; } } // container inet container inet6 { presence "enable inet6"; description "IPv6 parameters"; uses apply-advanced; list address { key "name"; ordered-by user; description "Interface address/destination prefix"; leaf name { type jt:ipv6prefix; description "Interface address/destination prefix"; } uses apply-advanced; leaf master-only { type empty; description "Master management IP address for host"; } } // list address leaf gateway { type jt:ipv6addr; description "Gateway IP address"; } } // container inet6 } // container family } // list interfaces container syslog { presence "enable syslog"; description "VMhost logging facility"; uses apply-advanced; list file { key "name"; description "File in which to log data"; leaf name { type string { junos:posix-pattern "![/ %]"; junos:pattern-message "Must not contain '/', % or a space"; length "1 .. 1024"; } description "Name of file in which to log data"; } uses apply-advanced; list vmhost-syslog-object { key "facility level"; leaf facility { type enumeration { enum "any" { value 0; description "All facilities"; } enum "authorization" { value 1; description "Authorization system"; } enum "privileged" { value 2; description "Privileged authorization events"; } enum "cron" { value 3; description "Cron daemon"; } enum "daemon" { value 4; description "Various system processes"; } enum "kernel" { value 5; description "Kernel"; } enum "lpr" { value 6; description "Line printer spooling system"; } enum "mail" { value 7; description "Mail system"; } enum "mark" { value 8; } enum "news" { value 9; description "Network news system"; } enum "syslog" { value 10; } enum "user" { value 11; description "User processes"; } enum "uucp" { value 12; description "UUCP system"; } enum "local0" { value 13; description "Local logging option number 0"; } enum "local1" { value 14; description "Local logging option number 1"; } enum "local2" { value 15; description "Local logging option number 2"; } enum "local3" { value 16; description "Local logging option number 3"; } enum "local4" { value 17; description "Local logging option number 4"; } enum "local5" { value 18; description "Local logging option number 5"; } enum "local6" { value 19; description "Local logging option number 6"; } enum "local7" { value 20; description "Local logging option number 7"; } } description "Facility type"; } leaf level { type enumeration { enum "any" { value 0; description "All levels"; } enum "emergency" { value 1; description "Panic conditions"; } enum "alert" { value 2; description "Conditions that should be corrected immediately"; } enum "critical" { value 3; description "Critical conditions"; } enum "error" { value 4; description "Error conditions"; } enum "warning" { value 5; description "Warning messages"; } enum "notice" { value 6; description "Conditions that should be handled specially"; } enum "info" { value 7; description "Informational messages"; } enum "none" { value 8; description "No messages"; } } description "Level name"; } } // list vmhost-syslog-object } // list file list host { key "name"; ordered-by user; description "Host to be notified"; leaf name { type string { junos:posix-pattern "^[[:alnum:]._:-]+$"; junos:pattern-message "Must be a string of alphanumericals, dashes or underscores, or a valid IP address"; } description "Host to be notified"; } uses apply-advanced; list vmhost-syslog-object { key "facility level"; leaf facility { type enumeration { enum "any" { value 0; description "All facilities"; } enum "authorization" { value 1; description "Authorization system"; } enum "privileged" { value 2; description "Privileged authorization events"; } enum "cron" { value 3; description "Cron daemon"; } enum "daemon" { value 4; description "Various system processes"; } enum "kernel" { value 5; description "Kernel"; } enum "lpr" { value 6; description "Line printer spooling system"; } enum "mail" { value 7; description "Mail system"; } enum "mark" { value 8; } enum "news" { value 9; description "Network news system"; } enum "syslog" { value 10; } enum "user" { value 11; description "User processes"; } enum "uucp" { value 12; description "UUCP system"; } enum "local0" { value 13; description "Local logging option number 0"; } enum "local1" { value 14; description "Local logging option number 1"; } enum "local2" { value 15; description "Local logging option number 2"; } enum "local3" { value 16; description "Local logging option number 3"; } enum "local4" { value 17; description "Local logging option number 4"; } enum "local5" { value 18; description "Local logging option number 5"; } enum "local6" { value 19; description "Local logging option number 6"; } enum "local7" { value 20; description "Local logging option number 7"; } } description "Facility type"; } leaf level { type enumeration { enum "any" { value 0; description "All levels"; } enum "emergency" { value 1; description "Panic conditions"; } enum "alert" { value 2; description "Conditions that should be corrected immediately"; } enum "critical" { value 3; description "Critical conditions"; } enum "error" { value 4; description "Error conditions"; } enum "warning" { value 5; description "Warning messages"; } enum "notice" { value 6; description "Conditions that should be handled specially"; } enum "info" { value 7; description "Informational messages"; } enum "none" { value 8; description "No messages"; } } description "Level name"; } } // list vmhost-syslog-object leaf transport { type enumeration { enum "tcp" { value 0; description "TCP as transport of syslog"; } enum "udp" { value 1; description "UDP as transport of syslog"; } } default "udp"; description "Transport type"; } } // list host } // container syslog container services { presence "enable services"; description "System services"; uses apply-advanced; container ssh { presence "enable ssh"; description "Allow ssh access"; uses apply-advanced; leaf root-login { type enumeration { enum "allow" { value 0; description "Allow root access via ssh"; } enum "deny" { value 1; description "Do not allow root access via ssh"; } } description "Configure vmhost root access via ssh"; } } // container ssh } // container services } // container vmhost } // grouping vmhost-group grouping apply-advanced { description "Apply advanced configuration logic"; leaf-list apply-groups { type string; ordered-by user; description "Groups from which to inherit configuration data"; } leaf-list apply-groups-except { type string; ordered-by user; description "Don't inherit configuration data from these groups"; } list apply-macro { key "name"; ordered-by user; description "Macro and parameters for commit script expansion"; uses apply-macro-type; } // list apply-macro } // grouping apply-advanced grouping apply-macro-type { description "Macro data for commit-script expansion"; leaf name { type string; description "Name of the macro to be expanded"; } list data { key "name"; uses macro-data-type; } // list data } // grouping apply-macro-type grouping macro-data-type { leaf name { type string; description "Keyword part of the keyword-value pair"; } leaf value { type string; description "Value part of the keyword-value pair"; } } // grouping macro-data-type } // module junos-ex-conf-vmhost
© 2023 YumaWorks, Inc. All rights reserved.