Skip to content

Instantly share code, notes, and snippets.

View joseivanlopez's full-sized avatar

José Iván López joseivanlopez

  • Suse Linux Gmbh
  • Las Palmas de Gran Canaria
View GitHub Profile

Product Selection

What to do when applying a config:

  • if the product is unknown (invalid, missing):
    • add product issue
    • keeps the current config and proposal (if any)
    • report 400

PUT: the config must indicate a valid product.

api.ts
/api/system

queries.ts

hooks/system.ts
hooks/l10n/system.ts
hooks/storage/system.ts

Current files tree

agama
    CONTRIBUTING.md
    PACKAGING.md
    LICENSE
    PULL_REQUEST_TEMPLATE.md
    README.md
 SECURITY.md

New Storage API

Current D-Bus API

org.opensuse.Agama.Storage1                     interface -                     -
.Finish                                         method    -                     -
.GetConfig                                      method    -                     -
.GetConfigModel                                 method    -                     -
.Install method - -

Agama Status

The new API of Agama offers an end-point to retrieve the status of the installation (GET /status).

The status contains the installation state and the progress of each scope in a single JSON file.

Installation State

The installation can be in one of the following states:

New HTTP API

The new API is designed around 3 main concepts: system, config and proposal.

  • system: represents the current status of the running system.
  • config: represents the configuration for installing the target system.
  • proposal: represents what is going to be done in the target system.

The config contains elements that can modify the system, the proposal or both. For example, the dasd config changes the system, and the storage config changes the proposal. In other cases like network, the config can affect to both system and proposal.

Agama and Probing

This document analyzes when Agama probes the system and what problems the current approach has, and proposes a possible solution.

When Agama needs to Probe

  • After selecting a product: a complete probe (software, storage, etc).
  • After registering a product: a complete probe but keeping some settings (a.k.a., reprobe). For example, storage settings should not be lost.
  • After editing iSCSI, DASD, zFCP: a storage reprobe.

Format for search conditions (storage schema)

Property, operator and value

{ property: "size", operator: "greater", value: "1 GiB" }

Problems:

Challenges to solve with queries and hooks in storage

How to organize the model queries

In storage we have a JSON structure (model) and we need:

  • To get part of the model (e.g., a specific disk).
  • To get calculated information (e.g., whether a disk is the boot device).
  • To modify parts of the model (e.g., add a partition to a disk).