@classmethod
def create_test_server_group(cls, name='', policy=None):
    if (not name):
        name = data_utils.rand_name((cls.__name__ + '-Server-Group'))
    if (policy is None):
        policy = ['affinity']
    body = cls.server_groups_client.create_server_group(name=name, policies=policy)['server_group']
    cls.addClassResourceCleanup(test_utils.call_and_ignore_notfound_exc, cls.server_groups_client.delete_server_group, body['id'])
    return body
@classmethod
def create_test_server_group(cls, name=, policy=None):
    if (not name):
        name = data_utils.rand_name((cls.__name__ + '-Server-Group'))
    if (policy is None):
        policy = ['affinity']
    body = cls.server_groups_client.create_server_group(name=name, policies=policy)['server_group']
    cls.addClassResourceCleanup(test_utils.call_and_ignore_notfound_exc, cls.server_groups_client.delete_server_group, body['id'])
    return body