~yolanda.robla/nova/precise-security

« back to all changes in this revision

Viewing changes to nova/tests/api/openstack/v2/contrib/test_security_groups.py

  • Committer: Package Import Robot
  • Author(s): Chuck Short
  • Date: 2011-12-02 10:56:30 UTC
  • mto: (79.1.1 precise-proposed)
  • mto: This revision was merged to the branch mainline in revision 53.
  • Revision ID: package-import@ubuntu.com-20111202105630-tjly1gpmdh533s0q
Tags: upstream-2012.1~e2~20111202.11641
ImportĀ upstreamĀ versionĀ 2012.1~e2~20111202.11641

Show diffs side-by-side

added added

removed removed

Lines of Context:
22
22
from nova.api.openstack.v2.contrib import security_groups
23
23
import nova.db
24
24
from nova import exception
 
25
from nova import utils
25
26
from nova import test
26
27
from nova.tests.api.openstack import fakes
27
28
 
86
87
 
87
88
 
88
89
def return_non_running_server(context, server_id):
89
 
    return {'id': server_id, 'power_state': 0x02,
 
90
    return {'id': server_id, 'power_state': 0x02, 'uuid': FAKE_UUID,
90
91
            'host': "localhost", 'name': 'asdf'}
91
92
 
92
93
 
93
94
def return_security_group_by_name(context, project_id, group_name):
94
 
    return {'id': 1, 'name': group_name, "instances": [{'id': 1}]}
 
95
    return {'id': 1, 'name': group_name,
 
96
            "instances": [{'id': 1, 'uuid': FAKE_UUID}]}
95
97
 
96
98
 
97
99
def return_security_group_without_instances(context, project_id, group_name):