summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorSeshu Kumar M <seshu.kumar.m@huawei.com>2017-10-23 04:15:24 +0000
committerGerrit Code Review <gerrit@onap.org>2017-10-23 04:15:24 +0000
commiteded15a9b569a9f3ae002328a3d067500959af49 (patch)
treebe9c877dffcd0e37e42823f8199ae83bf45f34db
parentd1a47bb7e4589e45753661f08e94807b30470059 (diff)
parent173678244c13fbe1302b443607806afb3b4f061c (diff)
Merge "Added the missing @Deprecated annotation"
-rw-r--r--nova-client/src/main/java/com/woorea/openstack/nova/api/extensions/SecurityGroupsExtension.java5
-rw-r--r--nova-model/src/main/java/com/woorea/openstack/nova/model/KeyPairs.java6
-rw-r--r--nova-model/src/main/java/com/woorea/openstack/nova/model/SecurityGroupRuleForCreate.java2
-rw-r--r--nova-model/src/main/java/com/woorea/openstack/nova/model/Server.java2
-rw-r--r--nova-model/src/main/java/com/woorea/openstack/nova/model/ServerAction.java4
5 files changed, 13 insertions, 6 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;