module adelie-services { yang-version 1.1; namespace 'http://netconf.adelielinux.org/ns/service'; prefix svcs; import ietf-yang-types { prefix yang; } organization "Adélie Software in the Public Benefit, Inc."; contact " Adélie Software in the Public Benefit, Inc. Postal: Adélie Software P.O. Box 701386 Tulsa, OK 74170 United States Email: "; description "This module contains a collection of YANG definitions for managing network services on a device containing a NETCONF server. This includes protocol operations for starting and stopping services. Copyright (c) 2020 Adélie Software and the persons identified as authors of the code. All rights reserved. Redistribution and use in source and binary forms, with or without modification, is permitted pursuant to, and subject to the license terms contained in, the NCSA License set forth in the LICENSE file contained in the NETCONF APK repository (https://code.foxkit.us/adelie/netconfapk/blob/current/LICENSE). This version of this YANG module is part of the NETCONF APK 1.0 distribution; see the distributon for full legal notices."; revision 2020-09-22 { description "Initial revision."; reference "Service Management Requirements for NETCONF APK (https://da.gd/ncservice)"; } typedef service-status { type enumeration { enum stopped { description "The service is not presently running."; } enum starting { description "The service is in the process of starting."; } enum running { description "The service is presently running."; } enum stopping { description "The service is in the process of stopping."; } enum crashed { description "The service was running, but stopped unexpectedly."; } } description "The status of a service."; } container services { description "Service configuration."; list service { key "name"; description "The list of services on the device."; leaf name { type string; description "The name of the service. Changing the name of the service may have surprising consequences. It is not recommended."; } leaf description { type string; config false; description "A textual description of the service. Depending on the service manager in use on the device, this node may be empty or contain only the name of the service."; } leaf enabled { type boolean; mandatory true; description "This leaf contains the desired state of the service. When this leaf is true, the service will be started automatically by the device during system bootup."; } leaf status { type service-status; config false; mandatory true; description "The current status of the service."; } leaf start-time { type yang:date-and-time; config false; when "./status = 'running'"; description "The time that this service entered the running state."; } } } }