# Path: muranoclient/tests/functional/cli/utils.py
# MANIFEST = {'Format': 'MuranoPL/1.0',
#             'Type': 'Application',
#             'Description': 'MockApp for CLI tests',
#             'Author': 'Mirantis, Inc'}
# def compose_package(app_name, manifest, package_dir,
#                     require=None, archive_dir=None):
# 
# Path: muranoclient/tests/functional/muranoclient.py
# class ClientTestBase(base.ClientTestBase):
#     def murano(self, action, flags='', params='',
#                fail_ok=False, endpoint_type='publicURL', merge_stderr=True):
#     def _get_clients(self):
#     def listing(self, command, params=""):
#     def get_value(self, need_field, known_field, known_value, somelist):
#     def get_backend_flag():


from http import server as SimpleHTTPServer
from oslo_utils import uuidutils
from tempest.lib.cli import output_parser
from tempest.lib import exceptions
from muranoclient.tests.functional.cli import utils
from muranoclient.tests.functional import muranoclient
import json
import multiprocessing
import os
import shutil
import socketserver
import tempfile
import time
        self.app_name = self.generate_name("dummy_app")
        self.dummy_app_path = self._compose_app(name=self.app_name)

    def tearDown(self):
        super(TestSuiteRepository, self).tearDown()
        shutil.rmtree(self.serve_dir)

    def run_server(self):
        def serve_function():
            class Handler(SimpleHTTPServer.SimpleHTTPRequestHandler):
                pass
            os.chdir(self.serve_dir)
            httpd = socketserver.TCPServer(
                ("0.0.0.0", 8089),
                Handler, bind_and_activate=False)
            httpd.allow_reuse_address = True
            httpd.server_bind()
            httpd.server_activate()
            httpd.serve_forever()
        self.p = multiprocessing.Process(target=serve_function)
        self.p.start()

    def stop_server(self):
        self.p.terminate()

    def _compose_app(self, name, require=None):
        package_dir = os.path.join(self.serve_dir, 'apps/', name)
        shutil.copytree(os.path.join(os.path.dirname(
            os.path.realpath(__file__)), 'MockApp'), package_dir)


# Path: muranoclient/tests/functional/cli/utils.py
# MANIFEST = {'Format': 'MuranoPL/1.0',
#             'Type': 'Application',
#             'Description': 'MockApp for CLI tests',
#             'Author': 'Mirantis, Inc'}
# def compose_package(app_name, manifest, package_dir,
#                     require=None, archive_dir=None):
# 
# Path: muranoclient/tests/functional/muranoclient.py
# class ClientTestBase(base.ClientTestBase):
#     def murano(self, action, flags='', params='',
#                fail_ok=False, endpoint_type='publicURL', merge_stderr=True):
#     def _get_clients(self):
#     def listing(self, command, params=""):
#     def get_value(self, need_field, known_field, known_value, somelist):
#     def get_backend_flag():


# Path: muranoclient/tests/functional/cli/murano_test_utils.py
from http import server as SimpleHTTPServer
from oslo_utils import uuidutils
from tempest.lib.cli import output_parser
from tempest.lib import exceptions
from muranoclient.tests.functional.cli import utils
from muranoclient.tests.functional import muranoclient
import json
import multiprocessing
import os
import shutil
import socketserver
import tempfile
import time

        self.app_name = self.generate_name("dummy_app")
        self.dummy_app_path = self._compose_app(name=self.app_name)

    def tearDown(self):
        super(TestSuiteRepository, self).tearDown()
        shutil.rmtree(self.serve_dir)

    def run_server(self):
        def serve_function():
            class Handler(SimpleHTTPServer.SimpleHTTPRequestHandler):
                pass
            os.chdir(self.serve_dir)
            httpd = socketserver.TCPServer(
                ("0.0.0.0", 8089),
                Handler, bind_and_activate=False)
            httpd.allow_reuse_address = True
            httpd.server_bind()
            httpd.server_activate()
            httpd.serve_forever()
        self.p = multiprocessing.Process(target=serve_function)
        self.p.start()

    def stop_server(self):
        self.p.terminate()

    def _compose_app(self, name, require=None):
        package_dir = os.path.join(self.serve_dir, 'apps/', name)
        shutil.copytree(os.path.join(os.path.dirname(
            os.path.realpath(__file__)), 'MockApp'), package_dir)


        app_name = utils.compose_package(