mirror of
https://github.com/kairos-io/kairos-agent.git
synced 2025-09-24 19:57:24 +00:00
Deprecate uri
in favor of source
(#835)
* Deprecate `uri` in favor of `source` Fixes https://github.com/kairos-io/kairos/issues/3148 Signed-off-by: Dimitris Karakasilis <dimitris@karakasilis.me> * Switch all tests to use `source` instead of `uri` and add one test to check backwards compatibility Signed-off-by: Dimitris Karakasilis <dimitris@karakasilis.me> * Remove non-used key in backwards compatibility method Signed-off-by: Dimitris Karakasilis <dimitris@karakasilis.me> --------- Signed-off-by: Dimitris Karakasilis <dimitris@karakasilis.me>
This commit is contained in:
committed by
GitHub
parent
ce2f87b281
commit
15cc6073e1
@@ -202,8 +202,8 @@ func generateUpgradeConfForCLIArgs(source, upgradeEntry string) (string, error)
|
||||
// have access to that yet, we just set both uri values which shouldn't matter
|
||||
// anyway, the right one will be used later in the process.
|
||||
if source != "" {
|
||||
upgradeConfig.Upgrade.RecoverySystem.URI = source
|
||||
upgradeConfig.Upgrade.System.URI = source
|
||||
upgradeConfig.Upgrade.RecoverySystem.Source = source
|
||||
upgradeConfig.Upgrade.System.Source = source
|
||||
}
|
||||
|
||||
d, err := json.Marshal(upgradeConfig)
|
||||
@@ -236,10 +236,10 @@ type ExtraConfigUpgrade struct {
|
||||
Upgrade struct {
|
||||
Entry string `json:"entry,omitempty"`
|
||||
RecoverySystem struct {
|
||||
URI string `json:"uri,omitempty"`
|
||||
Source string `json:"source,omitempty"`
|
||||
} `json:"recovery-system,omitempty"`
|
||||
System struct {
|
||||
URI string `json:"uri,omitempty"`
|
||||
Source string `json:"source,omitempty"`
|
||||
} `json:"system,omitempty"`
|
||||
} `json:"upgrade,omitempty"`
|
||||
}
|
||||
|
Reference in New Issue
Block a user