Skip to content

Instantly share code, notes, and snippets.

@joseivanlopez
Last active October 22, 2025 10:52
Show Gist options
  • Select an option

  • Save joseivanlopez/63a5d5d2c1cc424119183c160df754cf to your computer and use it in GitHub Desktop.

Select an option

Save joseivanlopez/63a5d5d2c1cc424119183c160df754cf to your computer and use it in GitHub Desktop.

New Storage API

Current D-Bus API

org.opensuse.Agama.Storage1                     interface -                     -
.Finish                                         method    -                     -
.GetConfig                                      method    -                     -
.GetConfigModel                                 method    -                     -
.Install                                        method    -                     -
.Probe                                          method    a{sv}                 -
.Reactivate                                     method    a{sv}                 -
.Reprobe                                        method    a{sv}                 -
.ResetConfig                                    method    a{sv}                 -
.SetConfig                                      method    sa{sv}                -
.SetConfigModel                                 method    sa{sv}                -
.SolveConfigModel                               method    s                     -
.DeprecatedSystem                               property  b          emits-change
.Configured                                     signal    s                     -
org.opensuse.Agama.Storage1.Devices             interface -                     -
.Actions                                        property  aa{sv}     emits-change
.AvailableDrives                                property  ao         emits-change
.AvailableMdRaids                               property  ao         emits-change
.CandidateDrives                                property  ao         emits-change
.CandidateMdRaids                               property  ao         emits-change
org.opensuse.Agama.Storage1.Proposal.Calculator interface -                     -
.Calculate                                      method    a{sv}                 -
.DefaultVolume                                  method    s                     -
.EncryptionMethods                              property  as         emits-change
.ProductMountPoints                             property  as         emits-change
org.opensuse.Agama1.Issues                      interface -                     -
.All                                            property  a(sssuu)   emits-change
org.opensuse.Agama1.LocaleMixin                 interface -                     -
.SetLocale
org.opensuse.Agama1.Progress                    interface -                     -
.CurrentStep                                    property  (us)       emits-change
.Finished                                       property  b          emits-change
.Steps                                          property  as         emits-change
.TotalSteps                                     property  u          emits-change
.ProgressChanged                                signal    u(us)bas              -
org.opensuse.Agama1.ServiceStatus               interface -                     -
.All                                            property  aa{sv}     emits-change
.Current                                        property  u          emits-change

Relationship With The New HTTP API

org.opensuse.Agama.Storage1                     interface       HTTP API
.Finish                                         method          no api -> only called by manager
.GetConfig                                      method          /config
.GetConfigModel                                 method          /private/storage_model
.Install                                        method          /action
.Probe                                          method          PUT /config {} + /action ? -> for changing product
.Reactivate                                     method          /action ?
.Reprobe                                        method          /action ?
.ResetConfig                                    method          PUT /config {}
.SetConfig                                      method          /config
.SetConfigModel                                 method          /private/storage_model
.SolveConfigModel                               method          ?
.DeprecatedSystem                               property        not needed?
.Configured                                     signal          not needed?
org.opensuse.Agama.Storage1.Devices             interface
.Actions                                        property        /proposal
.AvailableDrives                                property        /system
.AvailableMdRaids                               property        /system
.CandidateDrives                                property        /system
.CandidateMdRaids                               property        /system
org.opensuse.Agama.Storage1.Proposal.Calculator interface
.Calculate                                      method          not needed
.DefaultVolume                                  method          /system
.EncryptionMethods                              property        /system
.ProductMountPoints                             property        /system
org.opensuse.Agama1.Issues                      interface       /issues
.All                                            property
org.opensuse.Agama1.LocaleMixin                 interface
.SetLocale                                      method          no api -> only called by manager
org.opensuse.Agama1.Progress                    interface       /progress
.CurrentStep                                    property
.Finished                                       property
.Steps                                          property
.TotalSteps                                     property
.ProgressChanged                                signal
org.opensuse.Agama1.ServiceStatus               interface       not needed?
.All                                            property
.Current                                        property

New D-Bus API

org.opensuse.Agama.Storage1                     interface       HTTP API
.Probe                                          method          /action
.Activate                                       method          /action
.Install                                        method
.Finish                                         method
.SetLocale                                      method
.GetSystem                                      method
.SetProduct                                     method
.GetConfig                                      method
.SetConfig                                      method
.GetConfigModel                                 method
.SetConfigModel                                 method
.SolveConfigModel                               method
.GetProposal                                    method
.GetIssues                                      method
.GetProgress                                    method
.SystemChanged                                  signal
.ConfigChanged                                  signal
.ProposalChanged                                signal
.IssuesChanged                                  signal
.ProgressChanged                                signal

Use Cases

  • Select/change a product
SetProduct(product_config)
    implies: activate (if needed), probe (if needed), calculate default proposal
  • Rescan devices keeping the current config (former Reprobe)
Probe
    imples: calculate proposal (if there is config)
  • Reactivate devices keeping the current config (former Reactivate)
Activate
    imples: probe (if needed), calculate proposal (if there is config)
  • Reset default config (former ResetConfig)
SetConfig("null")
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment