diff options
author | Isaac Manuel Raj <isaac.manuelraj@huawei.com> | 2019-04-12 11:47:43 +0530 |
---|---|---|
committer | Isaac Manuel Raj <isaac.manuelraj@huawei.com> | 2019-04-12 11:47:43 +0530 |
commit | d7d05d563996d179e3af89362f5400ab1a1318c9 (patch) | |
tree | 2e144bbe6d2f60c3683bb844ed3249b45795bec7 /ceilometer-client | |
parent | c712db17091c639f1b8515edcced0cbb52c81a17 (diff) |
Code Enhancement (Sonar Fixes)
Sonar Issues Fixes
Issue-ID: SO-1490
Change-Id: I1e1782b6c98b21d339004374c9bd92839f095c5d
Signed-off-by: Isaac Manuel Raj <isaac.manuelraj@huawei.com>
Diffstat (limited to 'ceilometer-client')
2 files changed, 25 insertions, 34 deletions
diff --git a/ceilometer-client/src/main/java/com/woorea/openstack/ceilometer/v2/api/MetersResource.java b/ceilometer-client/src/main/java/com/woorea/openstack/ceilometer/v2/api/MetersResource.java index 8f35170..df17c82 100644 --- a/ceilometer-client/src/main/java/com/woorea/openstack/ceilometer/v2/api/MetersResource.java +++ b/ceilometer-client/src/main/java/com/woorea/openstack/ceilometer/v2/api/MetersResource.java @@ -23,45 +23,42 @@ import com.woorea.openstack.ceilometer.QueriableCeilometerCommand; import com.woorea.openstack.ceilometer.v2.model.Sample; public class MetersResource { - + private final OpenStackClient CLIENT; - + public MetersResource(OpenStackClient client) { CLIENT = client; } - + public List list() { return new List(); } - + public Show show() { return new Show(); } - + public Statistics statistics() { return new Statistics(); } - + public class List extends QueriableCeilometerCommand<List, java.util.List<Sample>> { public List() { - //return query(target.path("meters")).request(MediaType.APPLICATION_JSON).get(new GenericType<List<Meter>>() {}); + } } - + public class Show extends QueriableCeilometerCommand<Show, java.util.List<Sample>> { private String name; - + public Show name(String name) { this.name = name; return this; } - + public Show() { -// if(name == null) { -// throw new UnsupportedOperationException("meter id is mandatory"); -// } -// return query(target.path("meters").path(name)).request(MediaType.APPLICATION_JSON).get(new GenericType<List<Sample>>() {}); + } } @@ -69,19 +66,16 @@ public class MetersResource { public class Statistics extends QueriableCeilometerCommand<Statistics, java.util.List<Statistics>> { private String name; - + public Statistics name(String name) { this.name = name; return this; } - + public Statistics() { -// if(name == null) { -// throw new UnsupportedOperationException("meter id is mandatory"); -// } -// return query(target.path("meters").path(name).path("statistics")).request(MediaType.APPLICATION_JSON).get(new GenericType<List<Statistics>>(){}); + } } -} +}
\ No newline at end of file diff --git a/ceilometer-client/src/main/java/com/woorea/openstack/ceilometer/v2/api/ResourcesResource.java b/ceilometer-client/src/main/java/com/woorea/openstack/ceilometer/v2/api/ResourcesResource.java index 4639ef4..9d392f7 100644 --- a/ceilometer-client/src/main/java/com/woorea/openstack/ceilometer/v2/api/ResourcesResource.java +++ b/ceilometer-client/src/main/java/com/woorea/openstack/ceilometer/v2/api/ResourcesResource.java @@ -24,38 +24,35 @@ import com.woorea.openstack.ceilometer.QueriableCeilometerCommand; import com.woorea.openstack.ceilometer.v2.model.Resource; public class ResourcesResource { - + private final OpenStackClient CLIENT; - + public ResourcesResource(OpenStackClient client) { CLIENT = client; } public class ResourceList extends QueriableCeilometerCommand<ResourceList, List<Resource>> { - + public ResourceList() { - OpenStackRequest request = new OpenStackRequest(); - //return query(target.path("resources")).request(MediaType.APPLICATION_JSON).get(new GenericType<List<Resource>>() {}); + + } } - + public class ResourceShow extends OpenStackRequest<Void> { private String id; - + public ResourceShow id(String id) { this.id = id; return this; } - + public ResourceShow(OpenStackClient client) { -// if(id == null) { -// throw new UnsupportedOperationException("resource id is mandatory"); -// } -// return target.path("resources").path(id).request(MediaType.APPLICATION_JSON).get(Resource.class); + } } -} +}
\ No newline at end of file |