# Path: magnumclient/common/base.py
# def getid(obj):
#     def __init__(self, api):
#     def _create(self, url, body):
#     def _format_body_data(self, body, response_key):
#     def _list_pagination(self, url, response_key=None, obj_class=None,
#                          limit=None):
#     def _list(self, url, response_key=None, obj_class=None, body=None):
#     def _update(self, url, body=None, method='PATCH', response_key=None):
#     def _delete(self, url):
#     def to_dict(self):
# class Manager(object):
# class Resource(base.Resource):
# 
# Path: magnumclient/common/utils.py
# def common_filters(marker=None, limit=None, sort_key=None, sort_dir=None):
# def split_and_deserialize(string):
# def args_array_to_patch(op, attributes):
# def handle_labels(labels):
# def format_labels(lbls, parse_comma=True):
# def print_list_field(field):
# def handle_json_from_file(json_arg):
# def config_cluster(cluster, cluster_template, cfg_dir, force=False,
#                    certs=None, use_keystone=False):
# def _config_cluster_kubernetes(cluster, cluster_template, cfg_dir,
#                                force=False, certs=None, use_keystone=False):
# def _config_cluster_swarm(cluster, cluster_template, cfg_dir,
#                           force=False, certs=None):
# def generate_csr_and_key():
# 
# Path: magnumclient/exceptions.py
# class AmbiguousAuthSystem(exceptions.ClientException):
# class InvalidAttribute(exceptions.ClientException):
# def from_response(response, message=None, traceback=None, method=None,
#                   url=None):


from magnumclient.common import base
from magnumclient.common import utils
from magnumclient import exceptions
#    WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
#    License for the specific language governing permissions and limitations
#    under the License.



CREATION_ATTRIBUTES = ['name', 'image_id', 'flavor_id', 'master_flavor_id',
                       'keypair_id', 'external_network_id', 'fixed_network',
                       'fixed_subnet', 'dns_nameserver', 'docker_volume_size',
                       'labels', 'coe', 'http_proxy', 'https_proxy',
                       'no_proxy', 'network_driver', 'tls_disabled', 'public',
                       'registry_enabled', 'volume_driver', 'server_type',
                       'docker_storage_driver', 'master_lb_enabled',
                       'floating_ip_enabled', 'hidden', 'tags']

OUTPUT_ATTRIBUTES = CREATION_ATTRIBUTES + ['apiserver_port', 'created_at',
                                           'insecure_registry', 'links',
                                           'updated_at', 'cluster_distro',
                                           'uuid']


class BaseModel(base.Resource):
    # model_name needs to be overridden by any derived class.
    # model_name should be capitalized and singular, e.g. "Cluster"
    model_name = ''

    def __repr__(self):
        return "<" + self.__class__.model_name + "%s>" % self._info



# Path: magnumclient/common/base.py
# def getid(obj):
#     def __init__(self, api):
#     def _create(self, url, body):
#     def _format_body_data(self, body, response_key):
#     def _list_pagination(self, url, response_key=None, obj_class=None,
#                          limit=None):
#     def _list(self, url, response_key=None, obj_class=None, body=None):
#     def _update(self, url, body=None, method='PATCH', response_key=None):
#     def _delete(self, url):
#     def to_dict(self):
# class Manager(object):
# class Resource(base.Resource):
# 
# Path: magnumclient/common/utils.py
# def common_filters(marker=None, limit=None, sort_key=None, sort_dir=None):
# def split_and_deserialize(string):
# def args_array_to_patch(op, attributes):
# def handle_labels(labels):
# def format_labels(lbls, parse_comma=True):
# def print_list_field(field):
# def handle_json_from_file(json_arg):
# def config_cluster(cluster, cluster_template, cfg_dir, force=False,
#                    certs=None, use_keystone=False):
# def _config_cluster_kubernetes(cluster, cluster_template, cfg_dir,
#                                force=False, certs=None, use_keystone=False):
# def _config_cluster_swarm(cluster, cluster_template, cfg_dir,
#                           force=False, certs=None):
# def generate_csr_and_key():
# 
# 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/v1/basemodels.py
from magnumclient.common import base
from magnumclient.common import utils
from magnumclient import exceptions

#    WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
#    License for the specific language governing permissions and limitations
#    under the License.



CREATION_ATTRIBUTES = ['name', 'image_id', 'flavor_id', 'master_flavor_id',
                       'keypair_id', 'external_network_id', 'fixed_network',
                       'fixed_subnet', 'dns_nameserver', 'docker_volume_size',
                       'labels', 'coe', 'http_proxy', 'https_proxy',
                       'no_proxy', 'network_driver', 'tls_disabled', 'public',
                       'registry_enabled', 'volume_driver', 'server_type',
                       'docker_storage_driver', 'master_lb_enabled',
                       'floating_ip_enabled', 'hidden', 'tags']

OUTPUT_ATTRIBUTES = CREATION_ATTRIBUTES + ['apiserver_port', 'created_at',
                                           'insecure_registry', 'links',
                                           'updated_at', 'cluster_distro',
                                           'uuid']


class BaseModel(base.Resource):
    # model_name needs to be overridden by any derived class.
    # model_name should be capitalized and singular, e.g. "Cluster"
    model_name = ''

    def __repr__(self):
        return "<" + self.__class__.model_name + "%s>" % self._info



class BaseModelManager(base.Manager):