Conversation
| properties := component.Component.Properties | ||
| name := properties["workload.name"].(string) | ||
| workloadType := properties["workload.type"].(string) | ||
| req, err := http.NewRequest("GET", i.Config.Url+workloadType+"/"+name, nil) |
There was a problem hiding this comment.
The Get() method and Apply() method should be consistent. For example, the Get() method gets by the path "workload.type/workload.name", while the Apply() method posts to path component.Name, which isn't necessary the same with workload.name. If workload.name and component.name are the same, probably we should exclude workload.name in properties and use component.Name in Get()
There was a problem hiding this comment.
Also, the Apply() method doesn't use workload.type. Maybe workload.type should be included in the request properties?
| ret := PiccoloTargetProviderConfig{} | ||
| if v, ok := properties["name"]; ok { | ||
| ret.Name = v | ||
| } |
There was a problem hiding this comment.
Extract url from properties here. Throw COAError if url is not found in properties.
|
I am sorry that I accidentally changed the repository and made a wrong commit fix (amend), which caused the existing PR to be closed. |
A new version of PR#488
previous : #488