# Path: magnumclient/exceptions.py
# class AmbiguousAuthSystem(exceptions.ClientException):
# class InvalidAttribute(exceptions.ClientException):
# def from_response(response, message=None, traceback=None, method=None,
#                   url=None):
# 
# Path: magnumclient/tests/utils.py
# FAKE_ENV = {'OS_USERNAME': 'username',
#             'OS_PASSWORD': 'password',
#             'OS_PROJECT_NAME': 'project_name',
#             'OS_AUTH_URL': 'http://no.where/v2.0'}
#     TEST_REQUEST_BASE = {
#         'verify': True,
#     }
# class BaseTestCase(testtools.TestCase):
# class FakeAPI(object):
# class FakeConnection(object):
# class FakeResponse(object):
# class FakeServiceCatalog(object):
# class FakeKeystone(object):
# class TestCase(testtools.TestCase):
# class FakeSessionResponse(object):
# class FakeSession(object):
#     def setUp(self):
#     def __init__(self, responses):
#     def _request(self, method, url, headers=None, body=None):
#     def raw_request(self, *args, **kwargs):
#     def json_request(self, *args, **kwargs):
#     def __init__(self, response=None, **kwargs):
#     def request(self, method, conn_url, **kwargs):
#     def setresponse(self, response):
#     def getresponse(self):
#     def __init__(self, headers, body=None, version=None, status=None,
#                  reason=None):
#     def __getitem__(self, key):
#     def getheaders(self):
#     def getheader(self, key, default):
#     def read(self, amt):
#     def url_for(self, endpoint_type, service_type, attr=None,
#                 filter_value=None):
#     def __init__(self, auth_token):
#     def setUp(self):
#     def make_env(self, exclude=None, fake_env=FAKE_ENV):
#     def shell(self, argstr, exitcodes=(0,)):
#     def __init__(self, headers, content=None, status_code=None):
#     def json(self):
#     def __init__(self, headers, content=None, status_code=None):
#     def request(self, url, method, **kwargs):
# 
# Path: magnumclient/v1/clusters.py
# CREATION_ATTRIBUTES = baseunit.CREATION_ATTRIBUTES
# class Cluster(baseunit.BaseTemplate):
# class ClusterManager(baseunit.BaseTemplateManager):
#     def resize(self, cluster_uuid, node_count,
#                nodes_to_remove=[], nodegroup=None):
#     def upgrade(self, cluster_uuid, cluster_template,
#                 max_batch_size=1, nodegroup=None):


import copy
import testtools
from testtools import matchers
from magnumclient import exceptions
from magnumclient.tests import utils
from magnumclient.v1 import clusters
        self.assertEqual(CLUSTER1['name'], cluster.name)
        self.assertEqual(CLUSTER1['cluster_template_id'],
                         cluster.cluster_template_id)

    def test_cluster_create(self):
        cluster = self.mgr.create(**CREATE_CLUSTER)
        expect = [
            ('POST', '/v1/clusters', {}, CREATE_CLUSTER),
        ]
        self.assertEqual(expect, self.api.calls)
        self.assertTrue(cluster)

    def test_cluster_create_with_keypair(self):
        cluster_with_keypair = dict()
        cluster_with_keypair.update(CREATE_CLUSTER)
        cluster_with_keypair['keypair'] = 'test_key'
        cluster = self.mgr.create(**cluster_with_keypair)
        expect = [
            ('POST', '/v1/clusters', {}, cluster_with_keypair),
        ]
        self.assertEqual(expect, self.api.calls)
        self.assertTrue(cluster)

    def test_cluster_create_with_docker_volume_size(self):
        cluster_with_volume_size = dict()
        cluster_with_volume_size.update(CREATE_CLUSTER)
        cluster_with_volume_size['docker_volume_size'] = 20
        cluster = self.mgr.create(**cluster_with_volume_size)
        expect = [
            ('POST', '/v1/clusters', {}, cluster_with_volume_size),

# Path: magnumclient/exceptions.py
# class AmbiguousAuthSystem(exceptions.ClientException):
# class InvalidAttribute(exceptions.ClientException):
# def from_response(response, message=None, traceback=None, method=None,
#                   url=None):
# 
# Path: magnumclient/tests/utils.py
# FAKE_ENV = {'OS_USERNAME': 'username',
#             'OS_PASSWORD': 'password',
#             'OS_PROJECT_NAME': 'project_name',
#             'OS_AUTH_URL': 'http://no.where/v2.0'}
#     TEST_REQUEST_BASE = {
#         'verify': True,
#     }
# class BaseTestCase(testtools.TestCase):
# class FakeAPI(object):
# class FakeConnection(object):
# class FakeResponse(object):
# class FakeServiceCatalog(object):
# class FakeKeystone(object):
# class TestCase(testtools.TestCase):
# class FakeSessionResponse(object):
# class FakeSession(object):
#     def setUp(self):
#     def __init__(self, responses):
#     def _request(self, method, url, headers=None, body=None):
#     def raw_request(self, *args, **kwargs):
#     def json_request(self, *args, **kwargs):
#     def __init__(self, response=None, **kwargs):
#     def request(self, method, conn_url, **kwargs):
#     def setresponse(self, response):
#     def getresponse(self):
#     def __init__(self, headers, body=None, version=None, status=None,
#                  reason=None):
#     def __getitem__(self, key):
#     def getheaders(self):
#     def getheader(self, key, default):
#     def read(self, amt):
#     def url_for(self, endpoint_type, service_type, attr=None,
#                 filter_value=None):
#     def __init__(self, auth_token):
#     def setUp(self):
#     def make_env(self, exclude=None, fake_env=FAKE_ENV):
#     def shell(self, argstr, exitcodes=(0,)):
#     def __init__(self, headers, content=None, status_code=None):
#     def json(self):
#     def __init__(self, headers, content=None, status_code=None):
#     def request(self, url, method, **kwargs):
# 
# Path: magnumclient/v1/clusters.py
# CREATION_ATTRIBUTES = baseunit.CREATION_ATTRIBUTES
# class Cluster(baseunit.BaseTemplate):
# class ClusterManager(baseunit.BaseTemplateManager):
#     def resize(self, cluster_uuid, node_count,
#                nodes_to_remove=[], nodegroup=None):
#     def upgrade(self, cluster_uuid, cluster_template,
#                 max_batch_size=1, nodegroup=None):


# Path: magnumclient/tests/v1/test_clusters.py
import copy
import testtools
from testtools import matchers
from magnumclient import exceptions
from magnumclient.tests import utils
from magnumclient.v1 import clusters

        self.assertEqual(CLUSTER1['name'], cluster.name)
        self.assertEqual(CLUSTER1['cluster_template_id'],
                         cluster.cluster_template_id)

    def test_cluster_create(self):
        cluster = self.mgr.create(**CREATE_CLUSTER)
        expect = [
            ('POST', '/v1/clusters', {}, CREATE_CLUSTER),
        ]
        self.assertEqual(expect, self.api.calls)
        self.assertTrue(cluster)

    def test_cluster_create_with_keypair(self):
        cluster_with_keypair = dict()
        cluster_with_keypair.update(CREATE_CLUSTER)
        cluster_with_keypair['keypair'] = 'test_key'
        cluster = self.mgr.create(**cluster_with_keypair)
        expect = [
            ('POST', '/v1/clusters', {}, cluster_with_keypair),
        ]
        self.assertEqual(expect, self.api.calls)
        self.assertTrue(cluster)

    def test_cluster_create_with_docker_volume_size(self):
        cluster_with_volume_size = dict()
        cluster_with_volume_size.update(CREATE_CLUSTER)
        cluster_with_volume_size['docker_volume_size'] = 20
        cluster = self.mgr.create(**cluster_with_volume_size)
        expect = [
            ('POST', '/v1/clusters', {}, cluster_with_volume_size),

        ]