diff options
13 files changed, 27 insertions, 16 deletions
diff --git a/nova-client/src/main/java/com/woorea/openstack/nova/api/extensions/SecurityGroupsExtension.java b/nova-client/src/main/java/com/woorea/openstack/nova/api/extensions/SecurityGroupsExtension.java index 2bfa748..ebfea43 100644 --- a/nova-client/src/main/java/com/woorea/openstack/nova/api/extensions/SecurityGroupsExtension.java +++ b/nova-client/src/main/java/com/woorea/openstack/nova/api/extensions/SecurityGroupsExtension.java @@ -59,6 +59,7 @@ public class SecurityGroupsExtension { * @deprecated * @param id */ + @Deprecated public Show(Integer id) { super(CLIENT, HttpMethod.GET, new StringBuilder("/os-security-groups/").append(id).toString(), null, SecurityGroup.class); } @@ -75,6 +76,7 @@ public class SecurityGroupsExtension { * @param id * @deprecated */ + @Deprecated public Delete(Integer id) { super(CLIENT, HttpMethod.DELETE, new StringBuilder("/os-security-groups/").append(String.valueOf(id)).toString(), null, Void.class); } @@ -101,6 +103,7 @@ public class SecurityGroupsExtension { * @param id * @deprecated */ + @Deprecated public DeleteRule(Integer id) { super(CLIENT, HttpMethod.DELETE, new StringBuilder("/os-security-group-rules/").append(String.valueOf(id)).toString(), null, Void.class); } @@ -148,6 +151,7 @@ public class SecurityGroupsExtension { * @return * @deprecated Use {@link #createSecurityGroupRule(String, String, Integer, Integer, String)} */ + @Deprecated public CreateRule createSecurityGroupRule( Integer parentSecurityGroupId, String ipProtocol, Integer fromPort, Integer toPort, String cidr) { @@ -165,6 +169,7 @@ public class SecurityGroupsExtension { * @return * @deprecated Use {@link #createSecurityGroupRule(String, String, String, Integer, Integer)} */ + @Deprecated public CreateRule createSecurityGroupRule( Integer parentSecurityGroupId, String ipProtocol, Integer fromPort, Integer toPort, Integer sourceGroupId) { diff --git a/nova-model/src/main/java/com/woorea/openstack/nova/model/KeyPairs.java b/nova-model/src/main/java/com/woorea/openstack/nova/model/KeyPairs.java index 0398bf3..db24f8d 100644 --- a/nova-model/src/main/java/com/woorea/openstack/nova/model/KeyPairs.java +++ b/nova-model/src/main/java/com/woorea/openstack/nova/model/KeyPairs.java @@ -39,11 +39,11 @@ public class KeyPairs implements Iterable<KeyPair>, Serializable { * @return the list */ public List<KeyPair> getList() { - List<KeyPair> list = new ArrayList<KeyPair>(); + List<KeyPair> keyPairList = new ArrayList<>(); for(KeyPairWrapper wrapper : this.list) { - list.add(wrapper.keypair); + keyPairList.add(wrapper.keypair); } - return list; + return keyPairList; } @Override diff --git a/nova-model/src/main/java/com/woorea/openstack/nova/model/SecurityGroupRuleForCreate.java b/nova-model/src/main/java/com/woorea/openstack/nova/model/SecurityGroupRuleForCreate.java index d5ff7b3..d1a3ec0 100644 --- a/nova-model/src/main/java/com/woorea/openstack/nova/model/SecurityGroupRuleForCreate.java +++ b/nova-model/src/main/java/com/woorea/openstack/nova/model/SecurityGroupRuleForCreate.java @@ -111,6 +111,7 @@ public class SecurityGroupRuleForCreate implements Serializable { * @param parentGroupId the parentGroupId to set * @deprecated Use {@link #setParentGroupId(String)} */ + @Deprecated public void setParentGroupId(Integer parentGroupId) { this.parentGroupId = String.valueOf(parentGroupId); } @@ -189,6 +190,7 @@ public class SecurityGroupRuleForCreate implements Serializable { * @param groupId the groupId to set * @deprecated Use {@link #setGroupId(String)} */ + @Deprecated public void setGroupId(Integer groupId) { this.groupId = String.valueOf(groupId); } diff --git a/nova-model/src/main/java/com/woorea/openstack/nova/model/Server.java b/nova-model/src/main/java/com/woorea/openstack/nova/model/Server.java index 938fc2b..20ab039 100644 --- a/nova-model/src/main/java/com/woorea/openstack/nova/model/Server.java +++ b/nova-model/src/main/java/com/woorea/openstack/nova/model/Server.java @@ -102,7 +102,7 @@ public class Server implements Serializable { } } - private Map<String, List<Address>> addresses = new HashMap<String, List<Address>>(); + private Map<String, List<Address>> addresses = new HashMap<>(); @JsonAnySetter public void add(String key, List<Address> value) { diff --git a/nova-model/src/main/java/com/woorea/openstack/nova/model/ServerAction.java b/nova-model/src/main/java/com/woorea/openstack/nova/model/ServerAction.java index 9ccc43b..80793a7 100644 --- a/nova-model/src/main/java/com/woorea/openstack/nova/model/ServerAction.java +++ b/nova-model/src/main/java/com/woorea/openstack/nova/model/ServerAction.java @@ -91,9 +91,9 @@ public interface ServerAction extends Serializable { private String accessIPv6; - private Map<String, String> metadata = new HashMap<String, String>(); + private Map<String, String> metadata = new HashMap<>(); - private List<PersonalityFile> personality = new ArrayList<PersonalityFile>(); + private List<PersonalityFile> personality = new ArrayList<>(); @JsonProperty("OS-DCF:diskConfig") private String diskConfig; diff --git a/openstack-client-connectors/http-connector/src/main/java/com/woorea/openstack/connector/HttpClientConnector.java b/openstack-client-connectors/http-connector/src/main/java/com/woorea/openstack/connector/HttpClientConnector.java index dc03f9e..f7fa30b 100644 --- a/openstack-client-connectors/http-connector/src/main/java/com/woorea/openstack/connector/HttpClientConnector.java +++ b/openstack-client-connectors/http-connector/src/main/java/com/woorea/openstack/connector/HttpClientConnector.java @@ -104,6 +104,7 @@ public class HttpClientConnector implements OpenStackClientConnector { return type.getAnnotation(JsonRootName.class) == null ? DEFAULT_MAPPER : WRAPPED_MAPPER; } + @Override public <T> OpenStackResponse request(OpenStackRequest<T> request) { CloseableHttpClient httpClient = null; //HttpClients.createDefault(); @@ -136,8 +137,8 @@ public class HttpClientConnector implements OpenStackClientConnector { String entityJson = mapper.writeValueAsString (request.entity().getEntity()); entity = new StringEntity(entityJson, ContentType.create(request.entity().getContentType())); - - System.out.println("Openstack query JSON:"+entityJson); + + LOGGER.debug("Openstack query JSON:"+entityJson); LOGGER.debug ("Request JSON Body: " + entityJson.replaceAll("\"password\":\"[^\"]*\"", "\"password\":\"***\"")); } catch (JsonProcessingException e) { diff --git a/openstack-client-connectors/http-connector/src/main/java/com/woorea/openstack/connector/HttpClientRedirectStrategy.java b/openstack-client-connectors/http-connector/src/main/java/com/woorea/openstack/connector/HttpClientRedirectStrategy.java index 6264589..2ba17fb 100644 --- a/openstack-client-connectors/http-connector/src/main/java/com/woorea/openstack/connector/HttpClientRedirectStrategy.java +++ b/openstack-client-connectors/http-connector/src/main/java/com/woorea/openstack/connector/HttpClientRedirectStrategy.java @@ -113,7 +113,7 @@ public class HttpClientRedirectStrategy extends DefaultRedirectStrategy { final int status = response.getStatusLine().getStatusCode();
- HttpUriRequest newRequest = null;
+ HttpUriRequest newRequest;
if (status == HttpStatus.SC_TEMPORARY_REDIRECT || status == HttpStatus.SC_MOVED_TEMPORARILY) {
newRequest = RequestBuilder.copy(request).setUri(uri).build();
} else {
diff --git a/openstack-client-connectors/jersey2-connector/src/main/java/com/woorea/openstack/connector/JaxRs20Response.java b/openstack-client-connectors/jersey2-connector/src/main/java/com/woorea/openstack/connector/JaxRs20Response.java index a89bdf9..b51c833 100644 --- a/openstack-client-connectors/jersey2-connector/src/main/java/com/woorea/openstack/connector/JaxRs20Response.java +++ b/openstack-client-connectors/jersey2-connector/src/main/java/com/woorea/openstack/connector/JaxRs20Response.java @@ -67,7 +67,7 @@ public class JaxRs20Response implements OpenStackResponse { @Override public Map<String, String> headers() { - Map<String, String> headers = new HashMap<String, String>(); + Map<String, String> headers = new HashMap<>(); for(String k : response.getHeaders().keySet()) { headers.put(k, response.getHeaderString(k)); } diff --git a/quantum-client/src/main/java/com/woorea/openstack/quantum/api/query/AbsOpenStackCmd.java b/quantum-client/src/main/java/com/woorea/openstack/quantum/api/query/AbsOpenStackCmd.java index 90f5bb5..2511b0c 100644 --- a/quantum-client/src/main/java/com/woorea/openstack/quantum/api/query/AbsOpenStackCmd.java +++ b/quantum-client/src/main/java/com/woorea/openstack/quantum/api/query/AbsOpenStackCmd.java @@ -62,7 +62,7 @@ public class AbsOpenStackCmd<T> extends OpenStackRequest<T> { private Map<String, String> getObjectParamMap(T target) { - Map<String, String> resultMap = new HashMap<String, String>(); + Map<String, String> resultMap = new HashMap<>(); if (target == null) return resultMap; diff --git a/quantum-model/src/main/java/com/woorea/openstack/quantum/model/Network.java b/quantum-model/src/main/java/com/woorea/openstack/quantum/model/Network.java index 29870a3..6c21b00 100644 --- a/quantum-model/src/main/java/com/woorea/openstack/quantum/model/Network.java +++ b/quantum-model/src/main/java/com/woorea/openstack/quantum/model/Network.java @@ -319,7 +319,7 @@ public class Network implements Serializable { */ @Override public String toString() { - StringBuffer buf = new StringBuffer("Network [id=" + id + ", name=" + name + ", subnets=" + StringBuilder buf = new StringBuilder("Network [id=" + id + ", name=" + name + ", subnets=" + subnets + ", status=" + status + ", admin_state_up=" + adminStateUp + ", tenant_id=" + tenantId + ", shared=" + shared + ", router:external=" + routerExternal); if (getNetworkType() == NetworkType.PROVIDER) diff --git a/quantum-model/src/main/java/com/woorea/openstack/quantum/model/NetworkForCreate.java b/quantum-model/src/main/java/com/woorea/openstack/quantum/model/NetworkForCreate.java index 1a2bb67..d5f3393 100644 --- a/quantum-model/src/main/java/com/woorea/openstack/quantum/model/NetworkForCreate.java +++ b/quantum-model/src/main/java/com/woorea/openstack/quantum/model/NetworkForCreate.java @@ -18,6 +18,9 @@ package com.woorea.openstack.quantum.model; import org.codehaus.jackson.map.annotate.JsonRootName; +/** + * @deprecated + */ @SuppressWarnings("serial") @JsonRootName("network") @Deprecated diff --git a/quantum-model/src/main/java/com/woorea/openstack/quantum/model/Networks.java b/quantum-model/src/main/java/com/woorea/openstack/quantum/model/Networks.java index 88e72e6..84e45ca 100644 --- a/quantum-model/src/main/java/com/woorea/openstack/quantum/model/Networks.java +++ b/quantum-model/src/main/java/com/woorea/openstack/quantum/model/Networks.java @@ -41,12 +41,12 @@ public class Networks implements Iterable<Network>, Serializable{ this.list = list; } - + @Override public String toString() { return "Networks [list=" + list + "]"; } - + @Override public Iterator<Network> iterator() { return list.iterator(); } diff --git a/quantum-model/src/main/java/com/woorea/openstack/quantum/model/Routers.java b/quantum-model/src/main/java/com/woorea/openstack/quantum/model/Routers.java index a2dbd8e..038bdb4 100644 --- a/quantum-model/src/main/java/com/woorea/openstack/quantum/model/Routers.java +++ b/quantum-model/src/main/java/com/woorea/openstack/quantum/model/Routers.java @@ -41,12 +41,12 @@ public class Routers implements Iterable<Router>, Serializable{ this.list = list; } - + @Override public String toString() { return "Routers [list=" + list + "]"; } - + @Override public Iterator<Router> iterator() { return list.iterator(); } |