Skip to content

Conversation

@youngtaekiim
Copy link

A new version of PR#488
previous : #488

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)
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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()

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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
}
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Extract url from properties here. Throw COAError if url is not found in properties.

@youngtaekiim
Copy link
Author

I am sorry that I accidentally changed the repository and made a wrong commit fix (amend), which caused the existing PR to be closed.
I post response to existing your code reviews in #503.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants