Skip to content

Commit

Permalink
Merge pull request #560 from MissionCriticalCloud/vpc-routers-reimple…
Browse files Browse the repository at this point in the history
…mented

New Generation of VPC Routers!
  • Loading branch information
Boris Schrijver authored Dec 7, 2017
2 parents 0443a6e + 78734f1 commit fa5c1b9
Show file tree
Hide file tree
Showing 214 changed files with 4,468 additions and 12,108 deletions.
3 changes: 3 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -438,3 +438,6 @@ fabric.properties
# Python virtualenv
virtualenv/
env/

# Smoke tests results
/cosmic-core/test/integration/smoke/results.txt
6 changes: 3 additions & 3 deletions cosmic-client/src/main/webapp/l10n/en.js
Original file line number Diff line number Diff line change
Expand Up @@ -1260,9 +1260,9 @@ var dictionary = {
"label.reboot": "Reboot",
"label.recent.errors": "Recent Errors",
"label.recover.vm": "Recover VM",
"label.redundant.router": "Redundant Router",
"label.redundant.router.capability": "Redundant router capability",
"label.redundant.state": "Redundant state",
"label.redundant.router": "Runs more than 1 router VM",
"label.redundant.router.capability": "Can run more than 1 router VM",
"label.redundant.state": "Keepalived state",
"label.redundant.vpc": "Redundant VPC",
"label.refresh": "Refresh",
"label.refresh.blades": "Refresh Blades",
Expand Down
37 changes: 12 additions & 25 deletions cosmic-client/src/main/webapp/scripts/system.js
Original file line number Diff line number Diff line change
Expand Up @@ -2657,7 +2657,7 @@
label: 'label.redundant.router',
converter: cloudStack.converters.toBooleanText
},
redundantRouterState: {
redundantstate: {
label: 'label.redundant.state'
}
}],
Expand All @@ -2668,7 +2668,6 @@
async: true,
success: function (json) {
var jsonObj = json.listroutersresponse.router[0];
addExtraPropertiesToRouterInstanceObject(jsonObj);
args.response.success({
actionFilter: routerActionfilter,
data: jsonObj
Expand Down Expand Up @@ -3201,7 +3200,7 @@
label: 'label.redundant.router',
converter: cloudStack.converters.toBooleanText
},
redundantRouterState: {
redundantstate: {
label: 'label.redundant.state'
}
}],
Expand All @@ -3212,7 +3211,6 @@
async: true,
success: function (json) {
var jsonObj = json.listinternallbvmssresponse.internalloadbalancervm[0];
addExtraPropertiesToRouterInstanceObject(jsonObj);
args.response.success({
actionFilter: internallbinstanceActionfilter,
data: jsonObj
Expand Down Expand Up @@ -3813,7 +3811,7 @@
label: 'label.redundant.router',
converter: cloudStack.converters.toBooleanText
},
redundantRouterState: {
redundantstate: {
label: 'label.redundant.state'
},
vpcid: {
Expand All @@ -3827,7 +3825,6 @@
async: true,
success: function (json) {
var jsonObj = json.listroutersresponse.router[0];
addExtraPropertiesToRouterInstanceObject(jsonObj);
args.response.success({
actionFilter: routerActionfilter,
data: jsonObj
Expand Down Expand Up @@ -5888,11 +5885,14 @@
name: {
label: 'label.name'
},
publicip: {
label: 'label.public.ip'
hostname: {
label: 'label.hypervisor'
},
routerType: {
label: 'label.type'
linklocalip: {
label: 'label.linklocal.ip'
},
redundantstate: {
label: 'label.redundant.state'
},
state: {
converter: function (str) {
Expand All @@ -5906,10 +5906,6 @@
'Error': 'off'
}
},
requiresupgrade: {
label: 'label.requires.upgrade',
converter: cloudStack.converters.toBooleanText
}
},
dataProvider: function (args) {
var array1 = [];
Expand Down Expand Up @@ -5973,7 +5969,7 @@
});

/*
* In project view, the first listRotuers API(without projectid=-1) will return the same objects as the second listRouters API(with projectid=-1),
* In project view, the first listRouters API(without projectid=-1) will return the same objects as the second listRouters API(with projectid=-1),
* because in project view, all API calls are appended with projectid=[projectID].
* Therefore, we only call the second listRouters API(with projectid=-1) in non-project view.
*/
Expand Down Expand Up @@ -6485,7 +6481,7 @@
label: 'label.redundant.router',
converter: cloudStack.converters.toBooleanText
},
redundantRouterState: {
redundantstate: {
label: 'label.redundant.state'
},
vpcid: {
Expand All @@ -6499,7 +6495,6 @@
async: true,
success: function (json) {
var jsonObj = json.listroutersresponse.router[0];
addExtraPropertiesToRouterInstanceObject(jsonObj);
args.response.success({
actionFilter: routerActionfilter,
data: jsonObj
Expand Down Expand Up @@ -13395,14 +13390,6 @@
}
}

var addExtraPropertiesToRouterInstanceObject = function (jsonObj) {
if (jsonObj.isredundantrouter == true) {
jsonObj["redundantRouterState"] = jsonObj.redundantstate;
} else {
jsonObj["redundantRouterState"] = "";
}
}

var refreshNspData = function (nspName) {
var array1 = [];
if (nspName != null)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -13,18 +13,15 @@ public class IpAddressTO {
private String broadcastUri;
private String vlanGateway;
private String vlanNetmask;
private String vifMacAddress;
private String deviceMacAddress;
private String macAddress;
private Integer networkRate;
private TrafficType trafficType;
private String networkName;
private Integer nicDevId;
private boolean newNic;

public IpAddressTO(final long accountId, final String ipAddress, final boolean add, final boolean firstIP,
final boolean sourceNat, final String broadcastUri, final String vlanGateway,
final String vlanNetmask, final String vifMacAddress, final String deviceMacAddress,
final Integer networkRate, final boolean isOneToOneNat) {
final String vlanNetmask, final String macAddress, final Integer networkRate, final boolean isOneToOneNat) {
this.accountId = accountId;
this.publicIp = ipAddress;
this.add = add;
Expand All @@ -33,8 +30,7 @@ public IpAddressTO(final long accountId, final String ipAddress, final boolean a
this.broadcastUri = broadcastUri;
this.vlanGateway = vlanGateway;
this.vlanNetmask = vlanNetmask;
this.vifMacAddress = vifMacAddress;
this.deviceMacAddress = deviceMacAddress;
this.macAddress = macAddress;
this.networkRate = networkRate;
this.oneToOneNat = isOneToOneNat;
}
Expand Down Expand Up @@ -98,22 +94,10 @@ public String getVlanNetmask() {
return vlanNetmask;
}

public String getVifMacAddress() {
return vifMacAddress;
}

public Integer getNetworkRate() {
return networkRate;
}

public Integer getNicDevId() {
return nicDevId;
}

public void setNicDevId(final Integer nicDevId) {
this.nicDevId = nicDevId;
}

public boolean isNewNic() {
return newNic;
}
Expand All @@ -122,12 +106,12 @@ public void setNewNic(final boolean newNic) {
this.newNic = newNic;
}

public String getDeviceMacAddress() {
return deviceMacAddress;
public String getMacAddress() {
return macAddress;
}

public void setDeviceMacAddress(String deviceMacAddress) {
this.deviceMacAddress = deviceMacAddress;
public void setMacAddress(String macAddress) {
this.macAddress = macAddress;
}

}
Loading

0 comments on commit fa5c1b9

Please sign in to comment.