Search in sources :

Example 1 with VpnUserList

use of com.cloud.agent.resource.virtualnetwork.model.VpnUserList in project cloudstack by apache.

the class VpnUsersConfigItem method generateConfig.

@Override
public List<ConfigItem> generateConfig(final NetworkElementCommand cmd) {
    final VpnUsersCfgCommand command = (VpnUsersCfgCommand) cmd;
    final List<VpnUser> vpnUsers = new LinkedList<VpnUser>();
    for (final VpnUsersCfgCommand.UsernamePassword userpwd : command.getUserpwds()) {
        vpnUsers.add(new VpnUser(userpwd.getUsername(), userpwd.getPassword(), userpwd.isAdd()));
    }
    final VpnUserList vpnUserList = new VpnUserList(vpnUsers);
    return generateConfigItems(vpnUserList);
}
Also used : VpnUsersCfgCommand(com.cloud.agent.api.routing.VpnUsersCfgCommand) VpnUser(com.cloud.agent.resource.virtualnetwork.model.VpnUser) VpnUserList(com.cloud.agent.resource.virtualnetwork.model.VpnUserList) LinkedList(java.util.LinkedList)

Aggregations

VpnUsersCfgCommand (com.cloud.agent.api.routing.VpnUsersCfgCommand)1 VpnUser (com.cloud.agent.resource.virtualnetwork.model.VpnUser)1 VpnUserList (com.cloud.agent.resource.virtualnetwork.model.VpnUserList)1 LinkedList (java.util.LinkedList)1