Skip to content

Add support for unattended upgrades #1301

@mattiaswal

Description

@mattiaswal

Description

Run a script in cron defined by user settings in the YANG model.

Example YANG:

  augment "/sys:system" {
    container unattended-upgrades {
      description
        "Configuration for automatic system software updates.

        When enabled, the system will automatically check for and
        install software upgrades at the specified time.";

      leaf enable {
        type boolean;
        default false;
        description
          "Enable or disable unattended upgrades.

          When set to true, the system will automatically check for
          available software updates and install them at the configured
          time.";
      }

      leaf time {
        type string {
          pattern '[0-2][0-9]:[0-5][0-9]';
        }
        mandatory true;
        description
          "Time of day to run the upgrade check and installation.

          Specified in 24-hour format as HH:MM (e.g., '02:00' for 2 AM,
          '14:30' for 2:30 PM).";
      }

      leaf-list day-of-week {
        type enumeration {
          enum "monday";
          enum "tuesday";
          enum "wednesday";
          enum "thursday";
          enum "friday";
          enum "saturday";
          enum "sunday";
        }
        description
          "Days of the week to run unattended upgrades.

          If not specified, upgrades will run daily. Multiple days
          can be selected to run upgrades only on specific days of
          the week.";
      }
    }
  }

Additional Information

No response

General Information

Anyone can help out by sponsoring development of new features or contributing pull requests.
Please use this issue for discussions related to the feature.

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or request

    Type

    No type

    Projects

    Status

    No status

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions