Skip to content

Instantly share code, notes, and snippets.

@joseivanlopez
Last active July 11, 2024 14:56
Show Gist options
  • Save joseivanlopez/f15976c6217b4334cd9b37df949feab2 to your computer and use it in GitHub Desktop.
Save joseivanlopez/f15976c6217b4334cd9b37df949feab2 to your computer and use it in GitHub Desktop.

Changes in storage APIs

D-Bus API

org.opensuse.Agama.Storage1
  #ProductConfig - JSON {transactional, volumes, encryptionMethods}
  #Probe - only probes the system (*without calculating a proposal)
  #SetSettings - set JSON settings (or AutoYaST)
  #GetSettings - get JSON settings (or AutoYaST)
  #Install
  #Finish
  #ProbeDone (signal)
  #SettingsApplied (signal)

org.opensuse.Agama.Storage1.Proposal
  #UsableDevices (as)
  #Calculate(settings: s) - receives JSON guided settings
  #GetResult (s) - JSON {success, settings, computedSizes, defaultBootDevice}
  #CalculateDone (signal)

org.opensuse.Agama.Storage1.Devices
  System (s) - JSON list of system devices
  Target (s) - JSON list of system devices
  Actions (s) - JSON list of actions
  Dirty (b) - whether system has changed
  • org.opensuse.Agama.Storage1.Proposal#GetResult reports a result if:
    • There is guided setttings.
    • There is no guided setttings but it can be recovered from the storage settings.

HTTP API

storage/probe --> org.opensuse.Agama.Storage1#Probe
storage/set_settings --> org.opensuse.Agama.Storage1#SetSettings
storage/get_settings --> org.opensuse.Agama.Storage1#GetSettings
storage/product_config --> org.opensuse.Agama.Storage1#ProductConfig
storage/proposal/usable_devices --> org.opensuse.Agama.Storage1.Proposal#UsableDevices
storage/proposal/calculate --> org.opensuse.Agama.Storage1.Proposal#Calculate
storage/proposal/result --> org.opensuse.Agama.Storage1.Proposal#Result
storage/devices/system --> org.opensuse.Agama.Storage1.Devices#System
storage/devices/target --> org.opensuse.Agama.Storage1.Devices#Target
storage/devices/actions --> org.opensuse.Agama.Storage1.Devices#Actions
storage/devices/dirty --> org.opensuse.Agama.Storage1.Devices#Dirty

Required settings conversions

              Service                       HTTP
Product
config  --> ProposalSettings        --> storage/proposal/result
               (guided)             <-- storage/proposal/calculate
                  |
            Storage::Settings       <-- storage/set_config
              (extended)            --> storage/get_config
                  |
               Proposal
  • From ProposalSettings to Storage::Settings.
  • From Storage::Settings to ProposalSetting, if possible.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment