#NEWLINE# def get_all_server_groups( self ) : #NEWLINE# #INDENT# initial_tenant = self . keystoneclient . tenant_name #NEWLINE# self . switch_user ( self . username , self . password , self . tenant ) #NEWLINE# server_groups = self . novaclient . server_groups . list ( ) #NEWLINE# for tenant in self . config . tenants : #NEWLINE# #INDENT# if ( not self . tenant_exists ( tenant [ 'name' ] ) ) : #NEWLINE# #INDENT# continue #NEWLINE# #UNINDENT# with utils . AddAdminUserRoleToNonAdminTenant ( self . keystoneclient , self . username , tenant [ 'name' ] ) : #NEWLINE# #INDENT# self . switch_user ( server_groups . username , self . password , tenant [ 'name' ] ) #NEWLINE# server_groups . extend ( self . novaclient . server_groups . list ( ) ) #NEWLINE# #UNINDENT# #UNINDENT# self . switch_user ( self . username , self . password , initial_tenant ) #NEWLINE# return server_groups