openbaton / openstack4j-plugin

Apache License 2.0
3 stars 12 forks source link

only 1 key source should be used #4

Closed wangjianming closed 7 years ago

wangjianming commented 7 years ago

This method, In my opinion, if the last parameter keys is not null, it is attached to userdata, the keyPair should not be used. it's not too possible that both the key in openbaton and in openstack be used. other choice, the key should be optional when register a vim instance in dashboard.

public Server launchInstanceAndWait( VimInstance vimInstance, String name, String image, String flavor, String keyPair, Set networks, Set securityGroups, String userdata, Map<String, String> floatingIps, Set keys)

if (keys != null && !keys.isEmpty()) {
  userdata = addKeysToUserData(userdata, keys);
  keyPair = null;
}
mpauls commented 7 years ago

The second option is already supported. If you leave the keyPair empty in the VIM definition, no key will be used for launching the VMs.

wangjianming commented 7 years ago

I still suggest modify this code, because the key in vim definition is fixed after register, then this key can be replaced when create a vm according the user's choice,

wangjianming commented 7 years ago

In this code ,it seems keyPair is still must be input with a star

https://github.com/openbaton/NFVO/blob/master/dashboard/src/main/resources/static/pages/vim-instances/vim-instances.html

gc4rella commented 7 years ago

@wangjianming please refer to the develop branches. There you can find always latest code, and for the dashboard, the mandatory field has been removed.

wangjianming commented 7 years ago

got that, thank you