public SetStaticNatRulesAnswer(SetStaticNatRulesCommand cmd, String[] results, boolean success) { super(cmd, success, null); assert (cmd.getRules().length == results.length) : "Shouldn't the results match the commands?"; this.results = results; }
public DhcpEntryCommand(String vmMac, String vmIpAddress, String vmName, String vmIp6Address, boolean executeInSequence) { this.vmMac = vmMac; this.vmIpAddress = vmIpAddress; this.vmName = vmName; this.vmIp6Address = vmIp6Address; this.setDefault(true); this.executeInSequence = executeInSequence; }
@Override public void setAccessDetail(String name, String value) { handleByAgent = false; super.setAccessDetail(name, value); }
private ExecutionResult prepareNetworkElementCommand(IpAssocCommand cmd) { return prepNetBoth(cmd .getAccessDetail(NetworkElementCommand.ROUTER_NAME), cmd.getIpAddresses(), "IpAssocCommand"); }
private synchronized Answer execute(IpAssocCommand cmd, int numRetries) { String[] results = new String[cmd.getIpAddresses().length]; int i = 0; IpAddressTO[] ips = cmd.getIpAddresses(); for (IpAddressTO ip : ips) { results[i++] = ip.getPublicIp() + " - success"; } return new IpAssocAnswer(cmd, results); }
private ExecutionResult prepareNetworkElementCommand(IpAssocVpcCommand cmd) { return prepNetBoth(cmd .getAccessDetail(NetworkElementCommand.ROUTER_NAME), cmd.getIpAddresses(), "IpAssocVpcCommand"); }
public IpAssocAnswer(IpAssocCommand cmd, String[] results) { boolean finalResult = true; for (String result : results) { if (result.equals(errorResult)) { finalResult = false; break; } } this.result = finalResult; this.details = null; assert (cmd.getIpAddresses().length == results.length) : "Shouldn't the results match the commands?"; this.results = results; }
@Override public List<ConfigItem> generateConfig(final NetworkElementCommand cmd) { final SetMonitorServiceCommand command = (SetMonitorServiceCommand) cmd; final MonitorService monitorService = new MonitorService(command.getConfiguration(), cmd.getAccessDetail(NetworkElementCommand.ROUTER_MONITORING_ENABLE)); return generateConfigItems(monitorService); }
public Site2SiteVpnCfgCommand(boolean create, String localPublicIp, String localPublicGateway, String localGuestCidr, String peerGatewayIp, String peerGuestCidrList, String ikePolicy, String espPolicy, String ipsecPsk, Long ikeLifetime, Long espLifetime, Boolean dpd, boolean passive, boolean encap) { this.create = create; this.setLocalPublicIp(localPublicIp); this.setLocalPublicGateway(localPublicGateway); this.setLocalGuestCidr(localGuestCidr); this.setPeerGatewayIp(peerGatewayIp); this.setPeerGuestCidrList(peerGuestCidrList); this.ipsecPsk = ipsecPsk; this.ikePolicy = ikePolicy; this.espPolicy = espPolicy; this.ikeLifetime = ikeLifetime; this.espLifetime = espLifetime; this.dpd = dpd; this.passive = passive; this.encap = encap; }
public SetFirewallRulesAnswer(SetFirewallRulesCommand cmd, boolean success, String[] results) { super(cmd, success, null); assert (cmd.getRules().length == results.length) : "rules and their results should be the same length don't you think?"; this.results = results; }
public SetPortForwardingRulesAnswer(SetPortForwardingRulesCommand cmd, String[] results, boolean success) { super(cmd, success, null); assert (cmd.getRules().length == results.length) : "Shouldn't the results match the commands?"; this.results = results; }
public String getUsernamePassword() { return getUsername() + "," + getPassword(); } }
public SetStaticRouteAnswer(SetStaticRouteCommand cmd, boolean success, String[] results) { super(cmd, success, null); if (results != null) { assert (cmd.getStaticRoutes().length == results.length) : "Static routes and their results should be the same length"; this.results = Arrays.copyOf(results, results.length); } }
public AggregationControlCommand(Action action, String name, String ip, String guestIp) { super(); this.action = action; this.setAccessDetail(NetworkElementCommand.ROUTER_NAME, name); this.setAccessDetail(NetworkElementCommand.ROUTER_IP, ip); this.setAccessDetail(NetworkElementCommand.ROUTER_GUEST_IP, guestIp); }
public SetNetworkACLAnswer(SetNetworkACLCommand cmd, boolean success, String[] results) { super(cmd, success, null); assert (cmd.getRules().length == results.length) : "ACLs and their results should be the same length"; this.results = results; }
public RemoteAccessVpnCfgCommand(boolean create, String vpnServerAddress, String localIp, String ipRange, String ipsecPresharedKey, boolean vpcEnabled) { this.vpnServerIp = vpnServerAddress; this.ipRange = ipRange; this.presharedKey = ipsecPresharedKey; this.localIp = localIp; this.create = create; this.vpcEnabled = vpcEnabled; if (vpcEnabled) { this.setPublicInterface("eth1"); } else { this.setPublicInterface("eth2"); } }
@Override public void setAccessDetail(final Map<String, String> accessDetails) { handleByAgent = false; super.setAccessDetail(accessDetails); }
@Override public void setAccessDetail(final Map<String, String> accessDetails) { handleByAgent = false; super.setAccessDetail(accessDetails); }
@Override public void setAccessDetail(String name, String value) { handleByAgent = false; super.setAccessDetail(name, value); }