Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- NetworkConnectionSection net = vm.getNetworkConnectionSection();
- Builder builder = net.toBuilder();
- builder.connections(Iterables.transform(net.getConnections(),
- new Function<NetworkConnection, NetworkConnection>() {
- @Override
- public NetworkConnection apply(NetworkConnection arg0) {
- return arg0.toBuilder().connected(true).ipAddressAllocationMode(ipAddressAllocationMode).build();
- }
- }));
- return client.getVmClient().updateNetworkConnectionOfVm(builder.build(), vm.getHref());
Add Comment
Please, Sign In to add comment