# Path: functionaltests/cli/v1/behaviors/acl_behaviors.py
# class ACLBehaviors(base_behaviors.BaseBehaviors):
#     def __init__(self):
#     def _add_ref_arg(self, argv, entity_ref):
#     def _add_per_acl_args(self, argv, users=[], project_access=None,
#                           operation_type=None, use_short_arg=False):
#     def acl_delete(self, entity_ref):
#     def acl_get(self, entity_ref):
#     def acl_submit(self, entity_ref, users=None,
#                    project_access=None, use_short_arg=False,
#                    operation_type='read'):
#     def acl_add(self, entity_ref, users=None,
#                 project_access=None, use_short_arg=False,
#                 operation_type='read'):
#     def acl_remove(self, entity_ref, users=None,
#                    project_access=None, use_short_arg=False,
#                    operation_type='read'):
#     def delete_all_created_acls(self):
# 
# Path: functionaltests/cli/v1/behaviors/container_behaviors.py
# class ContainerBehaviors(base_behaviors.BaseBehaviors):
#     def __init__(self):
#     def delete_container(self, container_href):
#     def create_container(self, secret_hrefs=[]):
#     def get_container(self, container_href):
#     def list_containers(self):
#     def delete_all_created_containers(self):
# 
# Path: functionaltests/cli/v1/behaviors/secret_behaviors.py
# class SecretBehaviors(base_behaviors.BaseBehaviors):
#     def __init__(self):
#     def update_secret(self,
#                       secret_href,
#                       payload):
#     def delete_secret(self, secret_href):
#     def store_secret(self, payload=b"Payload for testing", store_argv=[]):
#     def store_secret_file(self, filename="/tmp/storesecret", store_argv=[]):
#     def get_secret(self, secret_href):
#     def get_secret_payload(self, secret_href, raw=False):
#     def get_secret_file(self, secret_href, filename='/tmp/getsecret'):
#     def list_secrets(self):
#     def delete_all_created_secrets(self):
#     def read_secret_test_file(self, filename='/tmp/getsecret'):
#     def write_secret_test_file(self, filename='/tmp/storesecret',
#                                payload="Payload for testing"):
# 
# Path: functionaltests/utils.py
# class BaseTestCase(oslotest.BaseTestCase):
#     def setUp(self):
#     def tearDown(self):
# def construct_new_test_function(original_func, name, build_params):
#     def test_wrapper(func, test_args, test_kwargs):
#         def wrapper(self):
# def process_parameterized_function(name, func_obj, build_data):
# def parameterized_test_case(cls):
# def parameterized_dataset(build_data):
#     def decorator(func):
# def create_timestamp_w_tz_and_offset(timezone=None, days=0, hours=0, minutes=0,
#                                      seconds=0):
# def get_limit_and_offset_from_ref(ref):
# def get_tomorrow_timestamp():
# def string_to_datetime(datetimestring, date_formats=None):
# def get_id_from_ref(ref):


from functionaltests.cli.base import CmdLineTestCase
from functionaltests.cli.v1.behaviors import acl_behaviors
from functionaltests.cli.v1.behaviors import container_behaviors
from functionaltests.cli.v1.behaviors import secret_behaviors
from functionaltests import utils
from testtools import testcase
#
#    http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
# implied.
# See the License for the specific language governing permissions and
# limitations under the License.


ARGS_TYPE = {'short_arg_false': [False],
             'short_arg_true': [True]}


@utils.parameterized_test_case
class ACLTestCase(CmdLineTestCase):

    def setUp(self):
        super(ACLTestCase, self).setUp()
        self.secret_behaviors = secret_behaviors.SecretBehaviors()
        self.container_behaviors = container_behaviors.ContainerBehaviors()
        self.acl_behaviors = acl_behaviors.ACLBehaviors()

    def tearDown(self):
        super(ACLTestCase, self).tearDown()
        self.acl_behaviors.delete_all_created_acls()
        self.container_behaviors.delete_all_created_containers()
        self.secret_behaviors.delete_all_created_secrets()


# Path: functionaltests/cli/v1/behaviors/acl_behaviors.py
# class ACLBehaviors(base_behaviors.BaseBehaviors):
#     def __init__(self):
#     def _add_ref_arg(self, argv, entity_ref):
#     def _add_per_acl_args(self, argv, users=[], project_access=None,
#                           operation_type=None, use_short_arg=False):
#     def acl_delete(self, entity_ref):
#     def acl_get(self, entity_ref):
#     def acl_submit(self, entity_ref, users=None,
#                    project_access=None, use_short_arg=False,
#                    operation_type='read'):
#     def acl_add(self, entity_ref, users=None,
#                 project_access=None, use_short_arg=False,
#                 operation_type='read'):
#     def acl_remove(self, entity_ref, users=None,
#                    project_access=None, use_short_arg=False,
#                    operation_type='read'):
#     def delete_all_created_acls(self):
# 
# Path: functionaltests/cli/v1/behaviors/container_behaviors.py
# class ContainerBehaviors(base_behaviors.BaseBehaviors):
#     def __init__(self):
#     def delete_container(self, container_href):
#     def create_container(self, secret_hrefs=[]):
#     def get_container(self, container_href):
#     def list_containers(self):
#     def delete_all_created_containers(self):
# 
# Path: functionaltests/cli/v1/behaviors/secret_behaviors.py
# class SecretBehaviors(base_behaviors.BaseBehaviors):
#     def __init__(self):
#     def update_secret(self,
#                       secret_href,
#                       payload):
#     def delete_secret(self, secret_href):
#     def store_secret(self, payload=b"Payload for testing", store_argv=[]):
#     def store_secret_file(self, filename="/tmp/storesecret", store_argv=[]):
#     def get_secret(self, secret_href):
#     def get_secret_payload(self, secret_href, raw=False):
#     def get_secret_file(self, secret_href, filename='/tmp/getsecret'):
#     def list_secrets(self):
#     def delete_all_created_secrets(self):
#     def read_secret_test_file(self, filename='/tmp/getsecret'):
#     def write_secret_test_file(self, filename='/tmp/storesecret',
#                                payload="Payload for testing"):
# 
# Path: functionaltests/utils.py
# class BaseTestCase(oslotest.BaseTestCase):
#     def setUp(self):
#     def tearDown(self):
# def construct_new_test_function(original_func, name, build_params):
#     def test_wrapper(func, test_args, test_kwargs):
#         def wrapper(self):
# def process_parameterized_function(name, func_obj, build_data):
# def parameterized_test_case(cls):
# def parameterized_dataset(build_data):
#     def decorator(func):
# def create_timestamp_w_tz_and_offset(timezone=None, days=0, hours=0, minutes=0,
#                                      seconds=0):
# def get_limit_and_offset_from_ref(ref):
# def get_tomorrow_timestamp():
# def string_to_datetime(datetimestring, date_formats=None):
# def get_id_from_ref(ref):


# Path: functionaltests/cli/v1/smoke/test_acl.py
from functionaltests.cli.base import CmdLineTestCase
from functionaltests.cli.v1.behaviors import acl_behaviors
from functionaltests.cli.v1.behaviors import container_behaviors
from functionaltests.cli.v1.behaviors import secret_behaviors
from functionaltests import utils
from testtools import testcase

#
#    http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
# implied.
# See the License for the specific language governing permissions and
# limitations under the License.


ARGS_TYPE = {'short_arg_false': [False],
             'short_arg_true': [True]}


@utils.parameterized_test_case
class ACLTestCase(CmdLineTestCase):

    def setUp(self):
        super(ACLTestCase, self).setUp()
        self.secret_behaviors = secret_behaviors.SecretBehaviors()
        self.container_behaviors = container_behaviors.ContainerBehaviors()
        self.acl_behaviors = acl_behaviors.ACLBehaviors()

    def tearDown(self):
        super(ACLTestCase, self).tearDown()
        self.acl_behaviors.delete_all_created_acls()
        self.container_behaviors.delete_all_created_containers()
        self.secret_behaviors.delete_all_created_secrets()


    @utils.parameterized_dataset(ARGS_TYPE)