diff options
author | 2017-01-31 13:57:24 +0100 | |
---|---|---|
committer | 2017-01-31 14:55:11 +0100 | |
commit | 2e984294ac28c6f2ede290c38164c5d536ccaf4a (patch) | |
tree | 5eba5a929b7a961c98749fa69e03cfea58e1a724 /keystone-client/src/main/java/com/woorea/openstack/keystone/api/EndpointsResource.java | |
parent | 86c0f28c8ed469486b64d6422dc53e3a7bcc8adb (diff) |
Initial OpenECOMP MSO OpenStack SDK lib commit
Change-Id: Ieaacb2b2c0dcc469669880e73f0cda9fa59a6c5a
Signed-off-by: ChrisC <cc697w@intl.att.com>
Diffstat (limited to 'keystone-client/src/main/java/com/woorea/openstack/keystone/api/EndpointsResource.java')
-rw-r--r-- | keystone-client/src/main/java/com/woorea/openstack/keystone/api/EndpointsResource.java | 71 |
1 files changed, 71 insertions, 0 deletions
diff --git a/keystone-client/src/main/java/com/woorea/openstack/keystone/api/EndpointsResource.java b/keystone-client/src/main/java/com/woorea/openstack/keystone/api/EndpointsResource.java new file mode 100644 index 0000000..acc128b --- /dev/null +++ b/keystone-client/src/main/java/com/woorea/openstack/keystone/api/EndpointsResource.java @@ -0,0 +1,71 @@ +package com.woorea.openstack.keystone.api; + + +import com.woorea.openstack.base.client.Entity; +import com.woorea.openstack.base.client.HttpMethod; +import com.woorea.openstack.base.client.OpenStackClient; +import com.woorea.openstack.base.client.OpenStackRequest; +import com.woorea.openstack.keystone.model.Endpoint; +import com.woorea.openstack.keystone.model.Endpoints; + +public class EndpointsResource { + + private OpenStackClient client; + + public EndpointsResource(OpenStackClient client) { + this.client = client; + } + + public List list() { + return new List(); + } + + public Create create(Endpoint endpoint) { + return new Create(endpoint); + } + + public Show show(String id) { + return new Show(id); + } + + + public Delete delete(String id) { + return new Delete(id); + } + + public class List extends OpenStackRequest<Endpoints> { + + public List() { + super(client, HttpMethod.GET, "/endpoints", null, Endpoints.class); + } + + } + + public class Create extends OpenStackRequest<Endpoint> { + + private Endpoint endpoint; + + public Create(Endpoint endpoint) { + super(client, HttpMethod.POST, "/endpoints", Entity.json(endpoint), Endpoint.class); + this.endpoint = endpoint; + } + + } + + public class Show extends OpenStackRequest<Endpoint> { + + public Show(String id) { + super(client, HttpMethod.GET, new StringBuilder("/endpoints/").append(id).toString(), null, Endpoint.class); + } + + } + + public class Delete extends OpenStackRequest<Void> { + + public Delete(String id) { + super(client, HttpMethod.DELETE, new StringBuilder("/endpoints/").append(id).toString(), null, Void.class); + } + + } + +} |