Ask Your Question

Revision history [back]

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

server = nova.servers.create( "astlatl-user01", flavor=fl, image=image, nics=nics,, 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 = []
  5. sgs = []
  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