Esempio n. 1
0
                                    description:
                                        - The system ID given to storage
                                         resource.
                                    type: str
"""

import logging
from storops.unity.enums import ScheduleTypeEnum, DayOfWeekEnum
from storops.exception import UnityResourceNotFoundError
from storops.connection.exceptions import HttpError
from storops.unity.resource import snap_schedule
from ansible.module_utils.basic import AnsibleModule
from ansible.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()


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())

        mutually_exclusive = [['name', 'id'], ['interval', 'hour'],
Esempio n. 2
0
                                    description:
                                        - The id of the storage resource
                                    type: str
'''

import logging
from storops.unity.resource import cg
from storops.exception import UnityResourceNotFoundError
from storops.connection.exceptions import HttpError
from storops.unity.enums import TieringPolicyEnum
from storops.unity.resource.lun import UnityLun
from ansible.module_utils.basic import AnsibleModule
from ansible.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()


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())

        mutually_exclusive = [['cg_name', 'cg_id']]
        required_one_of = [['cg_name', 'cg_id']]
        name:
            description: The name of the Snapshot Schedule.
            type: str
'''

import json
import logging
from storops.unity.resource import host, cg, snap_schedule
from storops.unity.enums import HostInitiatorTypeEnum
from storops.exception import UnityResourceNotFoundError
from storops.connection.exceptions import HttpError
from ansible.module_utils.basic import AnsibleModule
from ansible.module_utils.storage.dell import \
    dellemc_ansible_unity_utils as utils

LOG = utils.get_logger('dellemc_unity_gatherfacts',
                       log_devel=utils.logging.INFO)
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(self.get_unity_gatherfacts_parameters())

        """ initialize the ansible module """
        self.module = AnsibleModule(argument_spec=self.module_params,
            type: bool        
'''

from ansible.module_utils.basic import AnsibleModule
from ansible.module_utils.storage.dell import \
    dellemc_ansible_unity_utils as utils
from storops.exception import UnityResourceNotFoundError
from storops.connection.exceptions import HttpError
from storops.unity.enums import TieringPolicyEnum, NodeEnum, HostLUNAccessEnum
from storops.unity.resource.lun import UnityLun
from storops.unity.resource.pool import UnityPoolList, UnityPool
from storops.unity.resource.snap_schedule import UnitySnapScheduleList, \
    UnitySnapSchedule
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. 5
0
        snap_size_used_with_unit:
            description:
            - Indicates snap_size_used with its appropriate unit in human
              readable form.
            type: str
 '''

from storops.unity.resource.pool import UnityPool
from ansible.module_utils.basic import AnsibleModule
from ansible.module_utils.storage.dell import \
    dellemc_ansible_unity_utils as utils
import re
import logging
import math

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']


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()
        self.module_params.update(get_unity_storagepool_parameters())

        mutually_exclusive = [['pool_name', 'pool_id']]
        type:
            description: HostTypeEnum of the host.
            type: str
'''

import json
import logging
from ansible.module_utils.basic import AnsibleModule
from ansible.module_utils.storage.dell import \
    dellemc_ansible_unity_utils as utils
from storops.unity.enums import HostTypeEnum
from storops.unity.resource import host
from storops.connection.exceptions import HttpError
from storops.exception import UnityResourceNotFoundError

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 """