From 2e984294ac28c6f2ede290c38164c5d536ccaf4a Mon Sep 17 00:00:00 2001 From: ChrisC Date: Tue, 31 Jan 2017 13:57:24 +0100 Subject: Initial OpenECOMP MSO OpenStack SDK lib commit Change-Id: Ieaacb2b2c0dcc469669880e73f0cda9fa59a6c5a Signed-off-by: ChrisC --- .../keystone/v3/api/ProjectRolesResource.java | 27 ++++++++++++++++++++++ 1 file changed, 27 insertions(+) create mode 100644 keystone-client/src/main/java/com/woorea/openstack/keystone/v3/api/ProjectRolesResource.java (limited to 'keystone-client/src/main/java/com/woorea/openstack/keystone/v3/api/ProjectRolesResource.java') diff --git a/keystone-client/src/main/java/com/woorea/openstack/keystone/v3/api/ProjectRolesResource.java b/keystone-client/src/main/java/com/woorea/openstack/keystone/v3/api/ProjectRolesResource.java new file mode 100644 index 0000000..7e7e2fa --- /dev/null +++ b/keystone-client/src/main/java/com/woorea/openstack/keystone/v3/api/ProjectRolesResource.java @@ -0,0 +1,27 @@ +package com.woorea.openstack.keystone.v3.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; + +public class ProjectRolesResource { + + private final OpenStackClient CLIENT; + + private final String PATH; + + public ProjectRolesResource(OpenStackClient client, String path) { + this.CLIENT = client; + this.PATH = path; + } + + public OpenStackRequest add(String roleId) { + return new OpenStackRequest(CLIENT, HttpMethod.PUT, new StringBuilder(PATH).append("/").append(roleId).toString(), Entity.json(""), Void.class); + } + + public OpenStackRequest remove(String roleId) { + return new OpenStackRequest(CLIENT, HttpMethod.DELETE, new StringBuilder(PATH).append("/").append(roleId).toString(), null, Void.class); + } + +} -- cgit 1.2.3-korg