Repository: stratos Updated Branches: refs/heads/master 7e813291e -> a38891fcc
update PCA mdsclient according to REST API change Project: http://git-wip-us.apache.org/repos/asf/stratos/repo Commit: http://git-wip-us.apache.org/repos/asf/stratos/commit/a38891fc Tree: http://git-wip-us.apache.org/repos/asf/stratos/tree/a38891fc Diff: http://git-wip-us.apache.org/repos/asf/stratos/diff/a38891fc Branch: refs/heads/master Commit: a38891fcc16df3ab5296b3f59a27983df41f80ab Parents: 7e81329 Author: Udara Liyanage <[email protected]> Authored: Fri May 15 16:38:12 2015 +0530 Committer: Udara Liyanage <[email protected]> Committed: Fri May 15 16:38:22 2015 +0530 ---------------------------------------------------------------------- .../python/cartridge.agent/cartridge.agent/mdsclient.py | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) ---------------------------------------------------------------------- http://git-wip-us.apache.org/repos/asf/stratos/blob/a38891fc/components/org.apache.stratos.python.cartridge.agent/src/main/python/cartridge.agent/cartridge.agent/mdsclient.py ---------------------------------------------------------------------- diff --git a/components/org.apache.stratos.python.cartridge.agent/src/main/python/cartridge.agent/cartridge.agent/mdsclient.py b/components/org.apache.stratos.python.cartridge.agent/src/main/python/cartridge.agent/cartridge.agent/mdsclient.py index 56bbd58..afa7e9c 100644 --- a/components/org.apache.stratos.python.cartridge.agent/src/main/python/cartridge.agent/cartridge.agent/mdsclient.py +++ b/components/org.apache.stratos.python.cartridge.agent/src/main/python/cartridge.agent/cartridge.agent/mdsclient.py @@ -29,8 +29,8 @@ mds_url = config.read_property(constants.METADATA_SERVICE_URL) alias = config.read_property(constants.CARTRIDGE_ALIAS) app_id = config.read_property(constants.APPLICATION_ID) token = config.read_property(constants.TOKEN) -alias_resource_url = mds_url + "/metadata/api/application/" + app_id + "/cluster/" + alias + "/properties" -app_resource_url = mds_url + "/metadata/api/application/" + app_id + "/properties" +alias_resource_url = mds_url + "/metadata/api/applications/" + app_id + "/clusters/" + alias + "/properties" +app_resource_url = mds_url + "/metadata/api/applications/" + app_id + "/properties" def put(put_req, app=False): @@ -100,15 +100,15 @@ def update(data): def delete_property_value(property_name, value): - log.info("*********** removing property %s value %s " % (property_name, value)) + log.info("Removing property %s value %s " % (property_name, value)) opener = urllib2.build_opener(urllib2.HTTPHandler) - request = urllib2.Request(mds_url + "/metadata/api/application/" + app_id + "/property/" + property_name + "/value/" + value) + request = urllib2.Request(mds_url + "/metadata/api/applications/" + app_id + "/properties/" + property_name + "/value/" + value) request.add_header("Authorization", "Bearer %s" % token) request.add_header('Content-Type', 'application/json') request.get_method = lambda: 'DELETE' url = opener.open(request) - log.info("*********** property value removed %s " % (url)) + log.info("Property value removed %s " % (url)) class MDSPutRequest:
