Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

ECS API: More user friendly API design #4

Open
denverdino opened this issue Jun 6, 2015 · 4 comments
Open

ECS API: More user friendly API design #4

denverdino opened this issue Jun 6, 2015 · 4 comments

Comments

@denverdino
Copy link
Owner

  1. Current API design is just mapping of the REST API. It will be better to provide the resource based API. E.g. instance resource, disk resource we can associate the disk resource to instance
  2. The WaitForXXX method can be simplified.
    E.g.
    func (client *Client) WaitForInstance(instanceId string, status InstanceStatus, timeout int) error
    Should be changed to something like
    func (client *Client) WaitForInstance(instanceId string, timeout int) (status InstanceStatus, err error)

The status will be the stable status E.g. Running, Stopped, etc. We need the enumeration of them.

Thanks

@denverdino denverdino changed the title ECS driver: More user friendly API design ECS API: More user friendly API design Jun 6, 2015
@AVVS
Copy link
Contributor

AVVS commented Feb 2, 2018

I'd also ask to use interfaces instead of structs, because its impossible to extend them in the underlaying libraries (ie in terraform provider where its used). Often it lacks some of the supported attributes and forking / copying source to extend is not a maintainable option =(

Either way thanks for the library ;)

@denverdino
Copy link
Owner Author

@AVVS Thanks for your comments. We will consider that.

And the official SDK for Aliyun services is published. They are generated from Alibaba Cloud API. Please visit https://github.com/aliyun/alibaba-cloud-sdk-go and any comments are welcome.

@AVVS
Copy link
Contributor

AVVS commented Feb 3, 2018

afaik https://github.com/alibaba/terraform-provider doesn't use the official SDK, so if that changes, it certainly would solve the problem ;) but so far its kind of impossible not to use this library

@denverdino
Copy link
Owner Author

Right, that is the timing issue. And you can open issue for the terraform provider. I will let my colleague to follow it up. Thanks again

menglingwei added a commit that referenced this issue Nov 22, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants