How do you configure a security group with nova.servers.create?

asked 2016-11-07 16:37:59 -0500

dvannatter gravatar image

server = nova.servers.create( "astlatl-user01", flavor=fl, image=image, nics=nics, key_name=keypair.name, security_groups=sgs )

Given a security group "SG-apache-web", I have tried providing this using a variety of methods:

  1. sgs = "SG-apache-web"
  2. sgs = ["SG-apache-web"]
  3. sg = nova.security_groups.find(name="SG-apache_web")
  4. sgs = [sg.name]
  5. sgs = [sg.id]
  6. sgs = [sg]
  7. sgs = sg
  8. sgs = [{u'name': u'SG-apache_web'}]

So far nothing I have found a variety of ways to make this fail, but nothing that actually works. The documentation that I have found doesn't seem to provide any examples

edit retag flag offensive close merge delete