Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion api/src/main/java/com/cloud/vm/NicProfile.java
Original file line number Diff line number Diff line change
Expand Up @@ -147,7 +147,7 @@ public long getNetworkId() {
return networkId;
}

public void setNetworId(long networkId){
public void setNetworkId(long networkId){
this.networkId = networkId;
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2055,7 +2055,6 @@ public void prepareAllNicsForMigration(final VirtualMachineProfile vm, final Dep
//Create nic profile for migration
s_logger.debug("Creating nic profile for migration. BroadcastUri: "+broadcastUri.toString()+" NetworkId: "+ntwkId+" Vm: "+vm.getId());
final NetworkVO network = _networksDao.findById(ntwkId);
_networkModel.getNetworkRate(network.getId(), vm.getId());
final NetworkGuru guru = AdapterBase.getAdapterByName(networkGurus, network.getGuruName());
final NicProfile profile = new NicProfile();
profile.setDeviceId(255); //dummyId
Expand All @@ -2069,7 +2068,8 @@ public void prepareAllNicsForMigration(final VirtualMachineProfile vm, final Dep
profile.setIsolationUri(Networks.IsolationType.Vlan.toUri(publicIp.getVlanTag()));
profile.setSecurityGroupEnabled(_networkModel.isSecurityGroupSupportedInNetwork(network));
profile.setName(_networkModel.getNetworkTag(vm.getHypervisorType(), network));
profile.setNetworId(network.getId());
profile.setNetworkRate(_networkModel.getNetworkRate(network.getId(), vm.getId()));
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

will the network id not be needed anymore?

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@DaanHoogland
it is still needed. see line 2072
I changed setNetworId to setNetworkId

profile.setNetworkId(network.getId());

guru.updateNicProfile(profile, network);
vm.addNic(profile);
Expand Down