use of org.onosproject.openstacknetworking.api.OpenstackHaService in project onos by opennetworkinglab.
the class OpenstackHaConfigCommand method doExecute.
@Override
protected void doExecute() {
OpenstackHaService service = get(OpenstackHaService.class);
if (FLAG_TRUE.equalsIgnoreCase(active)) {
service.setActive(true);
} else if (FLAG_FALSE.equalsIgnoreCase(active)) {
service.setActive(false);
} else {
error("The input value is not correct");
return;
}
String role = service.isActive() ? "ACTIVE" : "STANDBY";
print("Node is configured as " + role);
}
use of org.onosproject.openstacknetworking.api.OpenstackHaService in project onos by opennetworkinglab.
the class OpenstackHaActiveIpCommand method doExecute.
@Override
protected void doExecute() {
OpenstackHaService service = get(OpenstackHaService.class);
service.setActiveIp(IpAddress.valueOf(ip));
print("Active node IP address " + ip + " is configured");
}
use of org.onosproject.openstacknetworking.api.OpenstackHaService in project onos by opennetworkinglab.
the class OpenstackHaShowCommand method doExecute.
@Override
protected void doExecute() {
OpenstackHaService service = get(OpenstackHaService.class);
print(FORMAT, "Status", "Active Node IP");
print(FORMAT, service.isActive() ? "Active" : "Standby", service.getActiveIp() == null ? "None" : service.getActiveIp().toString());
}
Aggregations