Repository: red-hat-storage/ocs-ci
Issue: Storage class can not be created without specified namespace

Objects created from [OCS class](https://github.com/red-hat-storage/ocs-ci/blob/master/resources/ocs.py#L14) expect object in form `object['metadata']['namespace']` as parameter. Storage class doesn't use `namespace` so it shouldn't be provided in argument.
`OCS` class will have to be changed.

Changed files:
resources/secret.py, resources/storage_class.py

diff --git a/resources/secret.py b/resources/secret.py
deleted file mode 100644
index 3836be77..00000000
--- a/resources/secret.py
+++ /dev/null
@@ -1,67 +0,0 @@
-"""
-General Secret object
-"""
-import os
-import logging
-import base64
-import tempfile
-
-from utility.templating import dump_to_temp_yaml
-from resources.ocs import OCS
-from ocs import ocp, constants
-
-log = logging.getLogger(__name__)
-
-
-class Secret(OCS):
-    """
-    A basic secret kind resource
-    """
-
-    def __init__(
-        self, api_version='v1', kind='secret', namespace=None,
-        interface='cephfs'
-    ):
-        """
-        Initializer function
-
-        Args:
-            api_version (str): TBD
-            kind (str): TBD
-            namespace (str): The name of the namespace to use
-        """
-        super(Secret, self).__init__(api_version, kind, namespace)
-        self.interface = interface
-        self.secret_data = {
-            'base64_encoded_admin_password': get_admin_key()
-        }
-        self.temp_yaml = tempfile.NamedTemporaryFile(
-            mode='w+', prefix='SECRET_', delete=False
-        )
-    # def get(self, resource_name, selector=''):
-    #     return self.ocp.get(resource_name=resource_name, selector=selector)
-
-    def create(self):
-        log.info(f"Creating secret for {self.interface}")
-        template = os.path.join(
-            constants.TEMPLATES_DIR, f"csi-{self.interface}-secret.yaml"
-        )
-        dump_to_temp_yaml(template, self.temp_yaml.name, **self.secret_data)
-        assert self.ocp.create(yaml_file=self.temp_yaml.name)
-
-    def delete(self):
-        # TODO: implement the functionality
-        pass
-
-    def apply(self):
-        # TODO: implement the functionality
-        pass
-
-
-def get_admin_key():
-    """
-    Fetches admin key secret from ceph
-    """
-    out = ocp.exec_ceph_cmd('ceph auth get-key client.admin')
-    base64_output = base64.b64encode(out['key'].encode()).decode()
-    return base64_output
diff --git a/resources/storage_class.py b/resources/storage_class.py
deleted file mode 100644
index 9e02078e..00000000
--- a/resources/storage_class.py
+++ /dev/null
@@ -1,74 +0,0 @@
-"""
-General StorageClass object
-"""
-import os
-import logging
-import yaml
-import tempfile
-
-from ocs import constants
-from resources.ocs import OCS
-
-log = logging.getLogger(__name__)
-
-
-class StorageClass(OCS):
-    """
-    A basic storage class kind resource
-    """
-
-    def __init__(self, interface, **kwargs):
-        """
-        Initializer function
-
-        Args:
-            interface (str): The ceph interface to use for creating the
-            storage class - 'cephfs', 'rbd', 'rgw'
-        kwargs:
-            Copy of ocs/defaults.py::STORAGE_CLASS_DICT dictionary
-        """
-        self.interface = interface
-        if self.interface == 'cephfs':
-            self.yaml_path = os.path.join(
-                constants.TEMPLATE_CSI_RBD_DIR, "rbd_storageclass.yaml"
-            )
-            # TODO: Implement
-            pass
-        if self.interface == 'rbd':
-            self.yaml_path = os.path.join(
-                constants.TEMPLATE_CSI_FS_DIR, "cephfs_storageclass.yaml"
-            )
-            # TODO: Implement
-            pass
-
-        self.sc_data = yaml.safe_load(open(self.yaml_path, 'r'))
-        self.sc_data.update(kwargs)
-        super(StorageClass, self).__init__(
-            self.sc_data['apiVersion'], self.sc_data['kind'],
-            self.sc_data['metadata']['namespace']
-        )
-        self._name = self.sc_data['metadata']['name']
-        self.temp_yaml = tempfile.NamedTemporaryFile(
-            mode='w+', prefix=f'storage_class_{self.interface}', delete=False
-        )
-
-    @property
-    def name(self):
-        return self._name
-
-    def get(self):
-        return self.ocp.get(resource_name=self.name)
-
-    def create(self):
-        log.info(f"Adding a storage class with name {self.name}")
-        with open(self.temp_yaml.name, 'w') as yaml_file:
-            yaml.dump(self.sc_data, yaml_file)
-        return self.ocp.create(yaml_file=self.temp_yaml.name)
-
-    def delete(self):
-        self.ocp.delete(resource_name=self.name)
-
-    def apply(self, **data):
-        with open(self.temp_yaml.name, 'w') as yaml_file:
-            yaml.dump(data, yaml_file)
-        assert self.ocp.apply(yaml_file=self.temp_yaml.name)