Search in sources :

Example 1 with SshKeyToRouterRules

use of com.cloud.network.rules.SshKeyToRouterRules in project cosmic by MissionCriticalCloud.

the class BasicNetworkTopology method saveSSHPublicKeyToRouter.

@Override
public boolean saveSSHPublicKeyToRouter(final Network network, final NicProfile nic, final VirtualMachineProfile profile, final VirtualRouter router, final String sshPublicKey) throws ResourceUnavailableException {
    s_logger.debug("SAVE SSH PUB KEY TO ROUTE RULES");
    final String typeString = "save SSHkey entry";
    final boolean isPodLevelException = false;
    final boolean failWhenDisconnect = false;
    final Long podId = null;
    final SshKeyToRouterRules keyToRouterRules = new SshKeyToRouterRules(network, nic, profile, sshPublicKey);
    return applyRules(network, router, typeString, isPodLevelException, podId, failWhenDisconnect, new RuleApplierWrapper<>(keyToRouterRules));
}
Also used : SshKeyToRouterRules(com.cloud.network.rules.SshKeyToRouterRules)

Example 2 with SshKeyToRouterRules

use of com.cloud.network.rules.SshKeyToRouterRules in project cloudstack by apache.

the class BasicNetworkTopology method saveSSHPublicKeyToRouter.

@Override
public boolean saveSSHPublicKeyToRouter(final Network network, final NicProfile nic, final VirtualMachineProfile profile, final VirtualRouter router, final String sshPublicKey) throws ResourceUnavailableException {
    s_logger.debug("SAVE SSH PUB KEY TO ROUTE RULES");
    final String typeString = "save SSHkey entry";
    final boolean isPodLevelException = false;
    final boolean failWhenDisconnect = false;
    final Long podId = null;
    final SshKeyToRouterRules keyToRouterRules = new SshKeyToRouterRules(network, nic, profile, sshPublicKey);
    return applyRules(network, router, typeString, isPodLevelException, podId, failWhenDisconnect, new RuleApplierWrapper<RuleApplier>(keyToRouterRules));
}
Also used : SshKeyToRouterRules(com.cloud.network.rules.SshKeyToRouterRules) RuleApplier(com.cloud.network.rules.RuleApplier)

Aggregations

SshKeyToRouterRules (com.cloud.network.rules.SshKeyToRouterRules)2 RuleApplier (com.cloud.network.rules.RuleApplier)1