Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

add check that vnic with same name doesn't has the same network #109

Closed
wants to merge 8 commits into from
4 changes: 2 additions & 2 deletions mock_nic_create.go
Original file line number Diff line number Diff line change
Expand Up @@ -21,8 +21,8 @@ func (m *mockClient) CreateNIC(
return nil, newError(ENotFound, "VM with ID %s not found for NIC creation", vmid)
}
for _, n := range m.nics {
if n.name == name {
return nil, newError(ENotFound, "NIC with name %s is already in use", name)
if n.name == name && n.vnicProfileID == vnicProfileID {
return nil, newError(ENotFound, "NIC with same name %s and same network is already in use", name)
}
}

Expand Down