Register extensions (autoinstallation only)#2187
Conversation
imobachgs
left a comment
There was a problem hiding this comment.
It is looking good, although I have a few comments (nothing critical).
| ) | ||
| .route("/registration/addons", post(register_addon)) | ||
| .route( | ||
| "/registration/addons/registered", |
There was a problem hiding this comment.
I am not sure about this organization of URLs and HTTP verbs. At first glance, I would expect POST /registration/addons to create a new addon, and that's not the intention.
I think will need a way to retrieve the list of addons when we work on the UI, right? So I would reserve /registration/addons for that.
GET /registration/addonsfor the list of addons (out of scope).GET /registration/addons/registeredfor the list of registered addons. If both endpoints will use the same format, you could useGET /registration/addons?registered=trueinstead.POST /registration/addons/register(or perhaps a better naming) for the registration.
Does it make sense?
There was a problem hiding this comment.
I already thought about /registration/addons?registered=true, but the problem is that for the CLI we only need very minimal data (name, version, reg. code), but for the full web UI we will need much more details, like description, if the extension is free or requires a registration code, license (optional), dependencies, whether it should be selected by default or not, if it is mirrored on the server (RMT only)... That's why it uses a different endpoint.
About POST /registration/addons/register, yes, that makes more sense, I'll update the path.
There was a problem hiding this comment.
You can also have a query argument, which allows you to switch between a full representation and a summary. But we can discuss this later, when we implement the /registration/addons for the UI.
| if let Some(reg_code) = &settings.registration_code { | ||
| let email = settings.registration_email.as_deref().unwrap_or(""); | ||
| self.product_client.register(reg_code, email).await?; | ||
| // TODO: avoid reprobing if the system has been already registered with the same code? |
Co-authored-by: Imobach González Sosa <igonzalezsosa@suse.com>
Co-authored-by: Imobach González Sosa <igonzalezsosa@suse.com>
Related to #2187, missing changes for the product package.
Prepare for releasing Agama 13: - #2041 - #2074 - #2088 - #2089 - #2094 - #2097 - #2098 - #2100 - #2101 - #2104 - #2106 - #2107 - #2108 - #2113 - #2115 - #2116 - #2117 - #2118 - #2120 - #2121 - #2122 - #2123 - #2124 - #2125 - #2126 - #2128 - #2132 - #2135 - #2136 - #2137 - #2139 - #2142 - #2145 - #2146 - #2147 - #2148 - #2151 - #2153 - #2155 - #2156 - #2157 - #2158 - #2159 - #2160 - #2161 - #2163 - #2165 - #2172 - #2174 - #2177 - #2179 - #2180 - #2181 - #2182 - #2183 - #2184 - #2186 - #2187 - #2188 - #2191 - #2192 - #2193 - #2195 - #2197 - #2198 - #2199 - #2200 - #2201 - #2203 - #2204 - #2205 - #2206 - #2207 - #2209 - #2212 - #2213 - #2214 - #2215 - #2216
|
The product installation was implemented in #2206 |
Problem
Solution
agama config editseveral times without any errors or side effects.Testing
Screenshots
After registering the HA extension the HA pattern is displayed in the software selection:
TODO