# Path: muranoclient/osc/v1/environment.py
# LOG = logging.getLogger(__name__)
# class ListEnvironments(command.Lister):
# class ShowEnvironment(command.ShowOne):
# class RenameEnvironment(command.Lister):
# class EnvironmentSessionCreate(command.ShowOne):
# class EnvironmentCreate(command.Lister):
# class EnvironmentDelete(command.Lister):
# class EnvironmentDeploy(command.ShowOne):
# class EnvironmentAppsEdit(command.Command):
# class EnvironmentModelShow(command.ShowOne):
# class EnvironmentModelEdit(command.ShowOne):
#     def get_parser(self, prog_name):
#     def take_action(self, parsed_args):
#     def get_parser(self, prog_name):
#     def take_action(self, parsed_args):
#     def get_parser(self, prog_name):
#     def take_action(self, parsed_args):
#     def get_parser(self, prog_name):
#     def take_action(self, parsed_args):
#     def get_parser(self, prog_name):
#     def take_action(self, parsed_args):
#     def get_parser(self, prog_name):
#     def take_action(self, parsed_args):
#     def get_parser(self, prog_name):
#     def take_action(self, parsed_args):
#     def get_parser(self, prog_name):
#     def take_action(self, parsed_args):
#     def get_parser(self, prog_name):
#     def take_action(self, parsed_args):
#     def get_parser(self, prog_name):
#     def take_action(self, parsed_args):
# 
# Path: muranoclient/tests/unit/osc/v1/fakes.py
# class TestApplicationCatalog(utils.TestCommand):
#     def setUp(self):
# 
# Path: muranoclient/v1/environments.py
# class Environment(base.Resource):
# class Status(base.Resource):
# class EnvironmentManager(base.ManagerWithFind):
#     def __repr__(self):
#     def data(self, **kwargs):
#     def __repr__(self):
#     def data(self, **kwargs):
#     def list(self, all_tenants=False, tenant_id=None):
#     def create(self, data):
#     def update(self, environment_id, name):
#     def delete(self, environment_id, abandon=False):
#     def get(self, environment_id, session_id=None):
#     def last_status(self, environment_id, session_id):
#     def get_model(self, environment_id, path, session_id=None):
#     def update_model(self, environment_id, data, session_id):


import collections
import json
import tempfile
from unittest import mock
from muranoclient.osc.v1 import environment as osc_env
from muranoclient.tests.unit.osc.v1 import fakes
from muranoclient.v1 import environments as api_env

        expected_call = {
            'defaultNetworks': {
                'environment': {
                    'internalNetworkName': 'x1y2z3',
                    '?': {
                        'type': 'io.murano.resources.ExistingNeutronNetwork',
                        'id': mock.ANY
                    }
                },
                'flat': None
            },
            'name': 'fake',
            'region': None
        }

        # Check that correct arguments are passed
        self.environment_mock.create.assert_called_with(expected_call)

        # Check that columns are correct
        expected_columns = ['Id', 'Name', 'Status', 'Created', 'Updated']
        self.assertEqual(expected_columns, columns)

        # Check that data is correct
        expected_data = [('1234', 'fake', 'ready',
                          '2015-12-16T17:31:54', '2015-12-16T17:31:54')]
        self.assertEqual(expected_data, data)

    @mock.patch('osc_lib.utils.get_item_properties')
    def test_environment_create_with_subnet_option(self, mock_util):

# Path: muranoclient/osc/v1/environment.py
# LOG = logging.getLogger(__name__)
# class ListEnvironments(command.Lister):
# class ShowEnvironment(command.ShowOne):
# class RenameEnvironment(command.Lister):
# class EnvironmentSessionCreate(command.ShowOne):
# class EnvironmentCreate(command.Lister):
# class EnvironmentDelete(command.Lister):
# class EnvironmentDeploy(command.ShowOne):
# class EnvironmentAppsEdit(command.Command):
# class EnvironmentModelShow(command.ShowOne):
# class EnvironmentModelEdit(command.ShowOne):
#     def get_parser(self, prog_name):
#     def take_action(self, parsed_args):
#     def get_parser(self, prog_name):
#     def take_action(self, parsed_args):
#     def get_parser(self, prog_name):
#     def take_action(self, parsed_args):
#     def get_parser(self, prog_name):
#     def take_action(self, parsed_args):
#     def get_parser(self, prog_name):
#     def take_action(self, parsed_args):
#     def get_parser(self, prog_name):
#     def take_action(self, parsed_args):
#     def get_parser(self, prog_name):
#     def take_action(self, parsed_args):
#     def get_parser(self, prog_name):
#     def take_action(self, parsed_args):
#     def get_parser(self, prog_name):
#     def take_action(self, parsed_args):
#     def get_parser(self, prog_name):
#     def take_action(self, parsed_args):
# 
# Path: muranoclient/tests/unit/osc/v1/fakes.py
# class TestApplicationCatalog(utils.TestCommand):
#     def setUp(self):
# 
# Path: muranoclient/v1/environments.py
# class Environment(base.Resource):
# class Status(base.Resource):
# class EnvironmentManager(base.ManagerWithFind):
#     def __repr__(self):
#     def data(self, **kwargs):
#     def __repr__(self):
#     def data(self, **kwargs):
#     def list(self, all_tenants=False, tenant_id=None):
#     def create(self, data):
#     def update(self, environment_id, name):
#     def delete(self, environment_id, abandon=False):
#     def get(self, environment_id, session_id=None):
#     def last_status(self, environment_id, session_id):
#     def get_model(self, environment_id, path, session_id=None):
#     def update_model(self, environment_id, data, session_id):


# Path: muranoclient/tests/unit/osc/v1/test_environment.py
import collections
import json
import tempfile
from unittest import mock
from muranoclient.osc.v1 import environment as osc_env
from muranoclient.tests.unit.osc.v1 import fakes
from muranoclient.v1 import environments as api_env


        expected_call = {
            'defaultNetworks': {
                'environment': {
                    'internalNetworkName': 'x1y2z3',
                    '?': {
                        'type': 'io.murano.resources.ExistingNeutronNetwork',
                        'id': mock.ANY
                    }
                },
                'flat': None
            },
            'name': 'fake',
            'region': None
        }

        # Check that correct arguments are passed
        self.environment_mock.create.assert_called_with(expected_call)

        # Check that columns are correct
        expected_columns = ['Id', 'Name', 'Status', 'Created', 'Updated']
        self.assertEqual(expected_columns, columns)

        # Check that data is correct
        expected_data = [('1234', 'fake', 'ready',
                          '2015-12-16T17:31:54', '2015-12-16T17:31:54')]
        self.assertEqual(expected_data, data)

    @mock.patch('osc_lib.utils.get_item_properties')
    def test_environment_create_with_subnet_option(self, mock_util):

        arglist = ['fake', '--join-subnet-id', 'x1y2z3']