46
VLANsManager.prototype.getName = function(vlan) {
50
} else if(angular.isString(vlan.name) && vlan.name !== "") {
51
name += " (" + vlan.name + ")";
57
VLANsManager.prototype.deleteVLAN = function(vlan) {
58
return RegionConnection.callMethod(
59
"vlan.delete", { "id": vlan.id }, true);
62
// This is needed for testing: in the normal course of things,
63
// rack_sids is generated entirely by the websocket handler.
64
VLANsManager.prototype.addRackController = function(vlan, rack) {
65
vlan.rack_sids.push(rack.system_id);
68
// Configure DHCP on the VLAN
69
VLANsManager.prototype.configureDHCP = function(
70
vlan, controllers, extra) {
71
return RegionConnection.callMethod(
72
"vlan.configure_dhcp", {
74
"controllers": controllers,
80
VLANsManager.prototype.create = function(vlan) {
81
// We don't add the item to the list because a NOTIFY event will
82
// add the domain to the list. Adding it here will cause angular to
83
// complain because the same object exist in the list.
84
return RegionConnection.callMethod("vlan.create", vlan);
46
87
return new VLANsManager();