Esempio n. 1
0
    returned: When SMB Shares exist.
    type: complex
    contains:
        id:
            description: The ID of the SMB Share.
            type: str
        name:
            description: The name of the SMB Share.
            type: str
'''

from ansible.module_utils.basic import AnsibleModule
from ansible_collections.dellemc.unity.plugins.module_utils.storage.dell \
    import dellemc_ansible_unity_utils as utils

LOG = utils.get_logger('dellemc_unity_gatherfacts')
HAS_UNITY_SDK = utils.get_unity_sdk()
UNITY_SDK_VERSION_CHECK = utils.storops_version_check()


class UnityGatherfacts(object):
    """Class with Gatherfacts operations"""

    def __init__(self):
        """ Define all parameters required by this module"""

        self.module_params = utils.get_unity_management_host_parameters()
        self.module_params.update(get_unity_gatherfacts_parameters())

        """ initialize the ansible module """
        self.module = AnsibleModule(argument_spec=self.module_params,
            type: str
        nas_server_name:
            description: Name of the NAS server on which filesystem exists.
            type: str
        nas_server_id:
            description: Id of the NAS server on which filesystem exists.
            type: str

'''

from ansible.module_utils.basic import AnsibleModule
from ansible_collections.dellemc.unity.plugins.module_utils.storage.dell \
    import dellemc_ansible_unity_utils as utils
from datetime import datetime

LOG = utils.get_logger('dellemc_unity_filesystem_snapshot')

HAS_UNITY_SDK = utils.get_unity_sdk()
UNITY_SDK_VERSION_CHECK = utils.storops_version_check()

application_type = "Ansible/1.2.0"


class UnityFilesystemSnapshot(object):
    """Class with Filesystem Snapshot operations"""

    def __init__(self):
        """ Define all parameters required by this module"""

        self.module_params = utils.get_unity_management_host_parameters()
        self.module_params.update(get_unity_snapshot_parameters())
Esempio n. 3
0
                        UnityStorageResource:
                            description: Detail of storage resource.
                            type: complex
                            contains:
                                id:
                                    description: The system ID given to storage
                                                 resource.
                                    type: str
"""

import logging
from ansible.module_utils.basic import AnsibleModule
from ansible_collections.dellemc.unity.plugins.module_utils.storage.dell \
    import dellemc_ansible_unity_utils as utils

LOG = utils.get_logger('dellemc_unity_snapshotschedule',
                       log_devel=logging.INFO)

HAS_UNITY_SDK = utils.get_unity_sdk()

UNITY_SDK_VERSION_CHECK = utils.storops_version_check()

application_type = "Ansible/1.2.0"


class UnitySnapshotSchedule(object):
    """Class with snapshot schedule operations"""
    def __init__(self):
        """Define all parameters required by this module"""

        self.module_params = utils.get_unity_management_host_parameters()
        self.module_params.update(get_unity_snapshotschedule_parameters())
                            type: complex
                            contains:
                                id:
                                    description: The ID of the host
                                    type: str
                                name:
                                    description: The name of the host
                                    type: str
'''

import logging
from ansible.module_utils.basic import AnsibleModule
from ansible_collections.dellemc.unity.plugins.module_utils.storage.dell \
    import dellemc_ansible_unity_utils as utils

LOG = utils.get_logger('dellemc_unity_consistencygroup',
                       log_devel=logging.INFO)

HAS_UNITY_SDK = utils.get_unity_sdk()

UNITY_SDK_VERSION_CHECK = utils.storops_version_check()

application_type = "Ansible/1.2.0"


class UnityConsistencyGroup(object):
    """Class with consistency group operations"""
    def __init__(self):
        """Define all parameters required by this module"""
        self.module_params = utils.get_unity_management_host_parameters()
        self.module_params.update(get_unity_consistencygroup_parameters())
Esempio n. 5
0
        is_replication_destination:
            description: If the NAS server is a replication destination
                         then True.
            type: bool
        is_windows_to_unix_username_mapping_enabled:
            description: Indicates whether a Unix to/from Windows user name
                         mapping is enabled.
            type: bool
'''
from ansible.module_utils.basic import AnsibleModule
# from ansible.module_utils.storage.dell \
#     import dellemc_ansible_unity_utils as utils
from ansible_collections.dellemc.unity.plugins.module_utils.storage.dell \
    import dellemc_ansible_unity_utils as utils

LOG = utils.get_logger('dellemc_unity_nasserver')

HAS_UNITY_SDK = utils.get_unity_sdk()
UNITY_SDK_VERSION_CHECK = utils.storops_version_check()

application_type = "Ansible/1.2.0"


class UnityNASServer(object):
    """Class with NAS Server operations"""
    def __init__(self):
        """ Define all parameters required by this module"""
        self.module_params = utils.get_unity_management_host_parameters()
        self.module_params.update(get_unity_nasserver_parameters())

        # initialize the ansible module
Esempio n. 6
0
            description:
                - The world wide name of this volume
            type: str
        is_thin_enabled:
            description:
                - Indicates whether thin provisioning is enabled for this
                  volume
            type: bool
'''

from ansible.module_utils.basic import AnsibleModule
from ansible_collections.dellemc.unity.plugins.module_utils.storage.dell \
    import dellemc_ansible_unity_utils as utils
import logging

LOG = utils.get_logger('dellemc_unity_volume', log_devel=logging.INFO)

HAS_UNITY_SDK = utils.get_unity_sdk()

UNITY_SDK_VERSION_CHECK = utils.storops_version_check()


class UnityVolume(object):
    """Class with volume operations"""

    param_host_id = None
    param_io_limit_pol_id = None
    param_snap_schedule_name = None

    def __init__(self):
        """Define all parameters required by this module"""
Esempio n. 7
0
                    description: ISCSI initiators with sytem genrated unique
                                 hash value.
                    type: complex
        os_type:
            description: Operating system running on the host.
            type: str
        type:
            description: HostTypeEnum of the host.
            type: str
'''

from ansible.module_utils.basic import AnsibleModule
from ansible_collections.dellemc.unity.plugins.module_utils.storage.dell \
    import dellemc_ansible_unity_utils as utils

LOG = utils.get_logger('dellemc_unity_host', log_devel=utils.logging.INFO)
HAS_UNITY_SDK = utils.get_unity_sdk()
UNITY_SDK_VERSION_CHECK = utils.storops_version_check()


class UnityHost(object):
    """Class with Host operations"""
    def __init__(self):
        """ Define all parameters required by this module"""

        self.module_params = utils.get_unity_management_host_parameters()
        self.module_params.update(get_unity_host_parameters())

        mutually_exclusive = [['host_name', 'host_id']]
        required_one_of = [['host_name', 'host_id']]
        """ initialize the ansible module """
Esempio n. 8
0
                - Whether the share will be available continuously or not
            type: bool
            sample: false
        is_encryption_enabled:
            description: Whether encryption is enabled or not.
            type: bool
            sample: false
        umask:
            description: Unix mask for the SMB share
            type: str
'''
from ansible.module_utils.basic import AnsibleModule
from ansible_collections.dellemc.unity.plugins.module_utils.storage.dell \
    import dellemc_ansible_unity_utils as utils

LOG = utils.get_logger('dellemc_unity_smbshare')

HAS_UNITY_SDK = utils.get_unity_sdk()
UNITY_SDK_VERSION_CHECK = utils.storops_version_check()


class UnitySMBShare(object):
    """Class with SMB Share operations"""
    def __init__(self):
        """ Define all parameters required by this module"""
        self.module_params = utils.get_unity_management_host_parameters()
        self.module_params.update(get_unity_smb_share_parameters())

        # initialize the ansible module
        mut_ex_args = [['share_name', 'share_id'],
                       ['nas_server_name', 'nas_server_id'],
Esempio n. 9
0
        snap_size_subscribed_with_unit:
            description: Indicates snap_size_subscribed with its
                         appropriate unit in human readable form.
            type: str
        snap_size_used_with_unit:
            description: Indicates snap_size_used with its
                         appropriate unit in human readable form.
            type: str
 '''

from ansible.module_utils.basic import AnsibleModule
from ansible_collections.dellemc.unity.plugins.module_utils.storage.dell \
    import dellemc_ansible_unity_utils as utils
import logging

LOG = utils.get_logger('dellemc_unity_storagepool', log_devel=logging.INFO)
HAS_UNITY_SDK = utils.get_unity_sdk()

UNITY_SDK_VERSION = utils.storops_version_check()
UNITY_SDK_VERSION_CHECK = UNITY_SDK_VERSION['supported_version']
UNITY_SDK_VERSION_ERROR = UNITY_SDK_VERSION['unsupported_version_message']

application_type = "Ansible/1.2.0"


class UnityStoragePool(object):
    """Class with storage pool operations"""

    def __init__(self):
        """ Define all parameters required by this module"""
        self.module_params = utils.get_unity_management_host_parameters()
                        name:
                            description:
                                - The name of the filesystem snapshot
                            type: str
        is_thin_enabled:
            description:
                - Indicates whether thin provisioning is enabled for this
                  filesystem
            type: bool

'''
from ansible.module_utils.basic import AnsibleModule
from ansible_collections.dellemc.unity.plugins.module_utils.storage.dell\
    import dellemc_ansible_unity_utils as utils

LOG = utils.get_logger('dellemc_unity_filesystem')

HAS_UNITY_SDK = utils.get_unity_sdk()

UNITY_SDK_VERSION_CHECK = utils.storops_version_check()


class UnityFilesystem(object):
    """Class with FileSystem operations"""
    def __init__(self):
        """Define all parameters required by this module"""
        self.module_params = utils.get_unity_management_host_parameters()
        self.module_params.update(get_unity_filesystem_parameters())

        mutually_exclusive = [['filesystem_name', 'filesystem_id'],
                              ['pool_name', 'pool_id'],
Esempio n. 11
0
            description: Size of used space in the filesystem by the user files.
            type: int
        gp_left:
            description: The grace period left after the
                         soft limit for the user quota is exceeded.
            type: int
        state:
            description: State of the quota tree.
            type: int
'''

from ansible.module_utils.basic import AnsibleModule
from ansible_collections.dellemc.unity.plugins.module_utils.storage.dell \
    import dellemc_ansible_unity_utils as utils

LOG = utils.get_logger('dellemc_unity_tree_quota')

HAS_UNITY_SDK = utils.get_unity_sdk()

UNITY_SDK_VERSION_CHECK = utils.storops_version_check()


class UnityQuotaTree(object):
    """Class with Quota Tree operations"""

    def __init__(self):
        """Define all parameters required by this module"""
        self.module_params = utils.get_unity_management_host_parameters()
        self.module_params.update(get_unity_quota_tree_parameters())

        mutually_exclusive = [['filesystem_name', 'filesystem_id'],
Esempio n. 12
0
            type: dict
        wwn:
            description: The world wide name of this volume
            type: str
        is_thin_enabled:
            description: Indicates whether thin provisioning is enabled for this
                         volume
            type: bool
'''

from ansible.module_utils.basic import AnsibleModule
from ansible_collections.dellemc.unity.plugins.module_utils.storage.dell \
    import dellemc_ansible_unity_utils as utils
import logging

LOG = utils.get_logger('dellemc_unity_volume')

HAS_UNITY_SDK = utils.get_unity_sdk()

UNITY_SDK_VERSION_CHECK = utils.storops_version_check()

application_type = "Ansible/1.2.0"


def is_none_or_empty_string(param):
    """ validates the input string for None or empty values
    """
    return not param or len(str(param)) <= 0


class UnityVolume(object):