@pick_context_manager_writer
def instance_group_update(context, group_uuid, values):
 group = model_query(context, models.InstanceGroup).filter_by(uuid=group_uuid).first()
 if (not group):
  raise exception.InstanceGroupNotFound(group_uuid=group_uuid)
 policies = values.get('policies')
 if (policies is not None):
  _instance_group_policies_add(context, group.id, values.pop('policies'), set_delete=True)
 members = values.get('members')
 if (members is not None):
  _instance_group_members_add(context, group.id, values.pop('members'), set_delete=True)
 group.update(values)
 if policies:
  values['policies'] = policies
 if members:
  values['members'] = members

@ pick_context_manager_writer def instance_group_update ( context , group_uuid , values ) : group = model_query ( context , models . InstanceGroup ) . filter_by ( uuid = group_uuid ) . first ( ) if ( not group ) : raise exception . InstanceGroupNotFound ( group_uuid = group_uuid ) policies = values . get ( 'policies' ) if ( policies is not None ) : _instance_group_policies_add ( context , group . id , values . pop ( 'policies' ) , set_delete = True ) members = values . get ( 'members' ) if ( members is not None ) : _instance_group_members_add ( context , group . id , values . pop ( 'members' ) , set_delete = True ) group . update ( values ) if policies : values [ 'policies' ] = policies if members : values [ 'members' ] = members
update the attributes of an group .