summaryrefslogtreecommitdiffstats
path: root/base/kra
diff options
context:
space:
mode:
authorAde Lee <alee@redhat.com>2012-07-24 12:02:08 -0400
committerAde Lee <alee@redhat.com>2012-07-24 12:51:17 -0400
commit4e1010be23195c3f00be4c0bfd0fdd5bda5f1148 (patch)
treefa966d8a085aa5affe66959e92b2b3a69fc9ad0d /base/kra
parentbda0bd08f7b17112b25a57ab49b9d6b4b0e0cf30 (diff)
downloadpki-4e1010be23195c3f00be4c0bfd0fdd5bda5f1148.tar.gz
pki-4e1010be23195c3f00be4c0bfd0fdd5bda5f1148.tar.xz
pki-4e1010be23195c3f00be4c0bfd0fdd5bda5f1148.zip
Use only pluralized REST interface URLs
Diffstat (limited to 'base/kra')
-rw-r--r--base/kra/functional/drmclient.py12
-rw-r--r--base/kra/functional/src/com/netscape/cms/servlet/test/DRMRestClient.java12
-rw-r--r--base/kra/src/com/netscape/kra/KeyRecoveryAuthorityApplication.java4
3 files changed, 8 insertions, 20 deletions
diff --git a/base/kra/functional/drmclient.py b/base/kra/functional/drmclient.py
index e9b0ccb49..62940fdf2 100644
--- a/base/kra/functional/drmclient.py
+++ b/base/kra/functional/drmclient.py
@@ -612,7 +612,7 @@ class kra:
#Call CMS
http_status, http_reason_phrase, http_headers, http_body = \
- self._request('/kra/pki/keyrequest/archive',
+ self._request('/kra/pki/keyrequests/archive',
self.kra_agent_port,
self.POST,
etree.tostring(request.getroot(), encoding='UTF-8'))
@@ -750,7 +750,7 @@ class kra:
#Call CMS
http_status, http_reason_phrase, http_headers, http_body = \
- self._request('/kra/pki/keyrequest/recover',
+ self._request('/kra/pki/keyrequests/recover',
self.kra_agent_port,
self.POST,
etree.tostring(request.getroot(), encoding='UTF-8'))
@@ -798,7 +798,7 @@ class kra:
#Call CMS
http_status, http_reason_phrase, http_headers, http_body = \
- self._request('/kra/pki/keyrequest/approve/'+ request_id,
+ self._request('/kra/pki/keyrequests/approve/'+ request_id,
self.kra_agent_port,
self.POST,
None)
@@ -820,7 +820,7 @@ class kra:
#Call CMS
http_status, http_reason_phrase, http_headers, http_body = \
- self._request('/kra/pki/keyrequest/reject/'+ request_id,
+ self._request('/kra/pki/keyrequests/reject/'+ request_id,
self.kra_agent_port,
self.POST,
None)
@@ -842,7 +842,7 @@ class kra:
#Call CMS
http_status, http_reason_phrase, http_headers, http_body = \
- self._request('/kra/pki/keyrequest/cancel/'+ request_id,
+ self._request('/kra/pki/keyrequests/cancel/'+ request_id,
self.kra_agent_port,
self.POST,
None)
@@ -898,7 +898,7 @@ class kra:
#Call CMS
http_status, http_reason_phrase, http_headers, http_body = \
- self._request('/kra/pki/key/retrieve',
+ self._request('/kra/pki/keys/retrieve',
self.kra_agent_port,
self.POST,
etree.tostring(request.getroot(), encoding='UTF-8'))
diff --git a/base/kra/functional/src/com/netscape/cms/servlet/test/DRMRestClient.java b/base/kra/functional/src/com/netscape/cms/servlet/test/DRMRestClient.java
index 5dbcac1a0..243e0d91c 100644
--- a/base/kra/functional/src/com/netscape/cms/servlet/test/DRMRestClient.java
+++ b/base/kra/functional/src/com/netscape/cms/servlet/test/DRMRestClient.java
@@ -13,12 +13,10 @@ import com.netscape.cms.servlet.admin.SystemCertificateResource;
import com.netscape.cms.servlet.cert.model.CertificateData;
import com.netscape.cms.servlet.csadmin.CMSRestClient;
import com.netscape.cms.servlet.key.KeyResource;
-import com.netscape.cms.servlet.key.KeysResource;
import com.netscape.cms.servlet.key.model.KeyData;
import com.netscape.cms.servlet.key.model.KeyDataInfo;
import com.netscape.cms.servlet.key.model.KeyDataInfos;
import com.netscape.cms.servlet.request.KeyRequestResource;
-import com.netscape.cms.servlet.request.KeyRequestsResource;
import com.netscape.cms.servlet.request.model.ArchivalRequestData;
import com.netscape.cms.servlet.request.model.KeyRequestInfo;
import com.netscape.cms.servlet.request.model.KeyRequestInfos;
@@ -28,19 +26,13 @@ import com.netscape.cmsutil.util.Utils;
public class DRMRestClient extends CMSRestClient {
private KeyResource keyClient;
- private KeysResource keysClient;
- private KeyRequestsResource keyRequestsClient;
private KeyRequestResource keyRequestClient;
private SystemCertificateResource systemCertClient;
public DRMRestClient(String baseUri, String clientCertNick) throws URISyntaxException {
super(baseUri,clientCertNick);
-
systemCertClient = ProxyFactory.create(SystemCertificateResource.class, uri, executor, providerFactory);
- keyRequestsClient = ProxyFactory.create(KeyRequestsResource.class, uri, executor, providerFactory);
keyRequestClient = ProxyFactory.create(KeyRequestResource.class, uri, executor, providerFactory);
- keysClient = ProxyFactory.create(KeysResource.class, uri, executor, providerFactory);
- keyClient = ProxyFactory.create(KeyResource.class, uri, executor, providerFactory);
keyClient = ProxyFactory.create(KeyResource.class, uri, executor, providerFactory);
}
@@ -54,7 +46,7 @@ public class DRMRestClient extends CMSRestClient {
}
public Collection<KeyRequestInfo> listRequests(String requestState, String requestType) {
- KeyRequestInfos infos = keyRequestsClient.listRequests(
+ KeyRequestInfos infos = keyRequestClient.listRequests(
requestState, requestType, null, new RequestId(0), 100, 100, 10
);
Collection<KeyRequestInfo> list = infos.getRequests();
@@ -74,7 +66,7 @@ public class DRMRestClient extends CMSRestClient {
}
public KeyDataInfo getKeyData(String clientId, String status) {
- KeyDataInfos infos = keysClient.listKeys(clientId, status, 100, 10);
+ KeyDataInfos infos = keyClient.listKeys(clientId, status, 100, 10);
Collection<KeyDataInfo> list = infos.getKeyInfos();
Iterator<KeyDataInfo> iter = list.iterator();
diff --git a/base/kra/src/com/netscape/kra/KeyRecoveryAuthorityApplication.java b/base/kra/src/com/netscape/kra/KeyRecoveryAuthorityApplication.java
index 0953f7de3..612b0ff18 100644
--- a/base/kra/src/com/netscape/kra/KeyRecoveryAuthorityApplication.java
+++ b/base/kra/src/com/netscape/kra/KeyRecoveryAuthorityApplication.java
@@ -13,9 +13,7 @@ import com.netscape.cms.servlet.admin.UserResourceService;
import com.netscape.cms.servlet.base.CMSException;
import com.netscape.cms.servlet.csadmin.SystemConfigurationResourceService;
import com.netscape.cms.servlet.key.KeyResourceService;
-import com.netscape.cms.servlet.key.KeysResourceService;
import com.netscape.cms.servlet.request.KeyRequestResourceService;
-import com.netscape.cms.servlet.request.KeyRequestsResourceService;
public class KeyRecoveryAuthorityApplication extends Application {
@@ -27,9 +25,7 @@ public class KeyRecoveryAuthorityApplication extends Application {
classes.add(SystemConfigurationResourceService.class);
// keys and keyrequests
- classes.add(KeysResourceService.class);
classes.add(KeyResourceService.class);
- classes.add(KeyRequestsResourceService.class);
classes.add(KeyRequestResourceService.class);
// user and group management