1717 */
1818package com .cloud .agent .api .routing ;
1919
20+ import com .cloud .agent .api .to .IpAddressTO ;
21+
2022
2123/**
22- * @author chiradeep
24+ * @author alena
2325 *
2426 */
2527public class IPAssocCommand extends RoutingCommand {
2628
2729 private String routerName ;
2830 private String routerIp ;
29- private String publicIp ;
30- private boolean sourceNat ;
31- private boolean add ;
32- private boolean oneToOneNat ;
33- private boolean firstIP ;
34- private String vlanId ;
35- private String vlanGateway ;
36- private String vlanNetmask ;
37- private String vifMacAddress ;
38- private String guestIp ;
31+ IpAddressTO [] ipAddresses ;
3932
4033 protected IPAssocCommand () {
4134 }
4235
43- public IPAssocCommand (String routerName , String privateIpAddress , String ipAddress , boolean add , boolean firstIP , boolean sourceNat , String vlanId , String vlanGateway , String vlanNetmask , String vifMacAddress , String guestIp ) {
36+ public IPAssocCommand (String routerName , String privateIpAddress , IpAddressTO [] ips ) {
4437 this .setRouterName (routerName );
4538 this .routerIp = privateIpAddress ;
46- this .publicIp = ipAddress ;
47- this .add = add ;
48- this .firstIP = firstIP ;
49- this .sourceNat = sourceNat ;
50- this .vlanId = vlanId ;
51- this .vlanGateway = vlanGateway ;
52- this .vlanNetmask = vlanNetmask ;
53- this .vifMacAddress = vifMacAddress ;
54- this .guestIp = guestIp ;
39+ this .ipAddresses = ips ;
5540 }
5641
57- public String getGuestIp (){
58- return guestIp ;
59- }
60-
6142 public String getRouterIp () {
6243 return routerIp ;
6344 }
6445
65- public String getPublicIp () {
66- return publicIp ;
67- }
68-
69- public boolean isAdd () {
70- return add ;
71- }
72-
73- public boolean isOneToOneNat (){
74- return this .oneToOneNat ;
75- }
76-
77- public boolean isFirstIP () {
78- return firstIP ;
79- }
80-
8146 @ Override
8247 public boolean executeInSequence () {
8348 return false ;
@@ -91,27 +56,9 @@ public String getRouterName() {
9156 return routerName ;
9257 }
9358
94- public void setSourceNat (boolean sourceNat ) {
95- this .sourceNat = sourceNat ;
96- }
59+ public IpAddressTO [] getIpAddresses () {
60+ return ipAddresses ;
61+ }
62+
9763
98- public boolean isSourceNat () {
99- return sourceNat ;
100- }
101-
102- public String getVlanId () {
103- return vlanId ;
104- }
105-
106- public String getVlanGateway () {
107- return vlanGateway ;
108- }
109-
110- public String getVlanNetmask () {
111- return vlanNetmask ;
112- }
113-
114- public String getVifMacAddress () {
115- return vifMacAddress ;
116- }
11764}
0 commit comments