����JFIF���������
__ __ __ __ _____ _ _ _____ _ _ _ | \/ | \ \ / / | __ \ (_) | | / ____| | | | | | \ / |_ __\ V / | |__) | __ ___ ____ _| |_ ___ | (___ | |__ ___| | | | |\/| | '__|> < | ___/ '__| \ \ / / _` | __/ _ \ \___ \| '_ \ / _ \ | | | | | | |_ / . \ | | | | | |\ V / (_| | || __/ ____) | | | | __/ | | |_| |_|_(_)_/ \_\ |_| |_| |_| \_/ \__,_|\__\___| |_____/|_| |_|\___V 2.1 if you need WebShell for Seo everyday contact me on Telegram Telegram Address : @jackleetFor_More_Tools:
# -*- coding: utf-8 -*-
# This code is part of Ansible, but is an independent component.
# This particular file snippet, and this file snippet only, is BSD licensed.
# Modules you write using this snippet, which is embedded dynamically by Ansible
# still belong to the author of the module, and may assign their own license
# to the complete work.
#
# Copyright (c), Simon Dodsley <simon@purestorage.com>,2017
# Simplified BSD License (see LICENSES/BSD-2-Clause.txt or https://opensource.org/licenses/BSD-2-Clause)
# SPDX-License-Identifier: BSD-2-Clause
from __future__ import (absolute_import, division, print_function)
__metaclass__ = type
HAS_PURESTORAGE = True
try:
from purestorage import purestorage
except ImportError:
HAS_PURESTORAGE = False
HAS_PURITY_FB = True
try:
from purity_fb import PurityFb, FileSystem, FileSystemSnapshot, SnapshotSuffix, rest # noqa: F401, pylint: disable=unused-import
except ImportError:
HAS_PURITY_FB = False
# (TODO: remove next line!)
from functools import wraps # noqa: F401, pylint: disable=unused-import
from os import environ
# (TODO: remove next line!)
from os import path # noqa: F401, pylint: disable=unused-import
import platform
VERSION = 1.2
USER_AGENT_BASE = 'Ansible'
API_AGENT_VERSION = 1.5
def get_system(module):
"""Return System Object or Fail"""
user_agent = '%(base)s %(class)s/%(version)s (%(platform)s)' % {
'base': USER_AGENT_BASE,
'class': __name__,
'version': VERSION,
'platform': platform.platform()
}
array_name = module.params['fa_url']
api = module.params['api_token']
if array_name and api:
system = purestorage.FlashArray(array_name, api_token=api, user_agent=user_agent)
elif environ.get('PUREFA_URL') and environ.get('PUREFA_API'):
system = purestorage.FlashArray(environ.get('PUREFA_URL'), api_token=(environ.get('PUREFA_API')), user_agent=user_agent)
else:
module.fail_json(msg="You must set PUREFA_URL and PUREFA_API environment variables or the fa_url and api_token module arguments")
try:
system.get()
except Exception:
module.fail_json(msg="Pure Storage FlashArray authentication failed. Check your credentials")
return system
def get_blade(module):
"""Return System Object or Fail"""
user_agent = '%(base)s %(class)s/%(version)s (%(platform)s)' % {
'base': USER_AGENT_BASE,
'class': __name__,
'version': VERSION,
'platform': platform.platform()
}
blade_name = module.params['fb_url']
api = module.params['api_token']
if blade_name and api:
blade = PurityFb(blade_name)
blade.disable_verify_ssl()
try:
blade.login(api)
versions = blade.api_version.list_versions().versions
if API_AGENT_VERSION in versions:
blade._api_client.user_agent = user_agent
except rest.ApiException as e:
module.fail_json(msg="Pure Storage FlashBlade authentication failed. Check your credentials")
elif environ.get('PUREFB_URL') and environ.get('PUREFB_API'):
blade = PurityFb(environ.get('PUREFB_URL'))
blade.disable_verify_ssl()
try:
blade.login(environ.get('PUREFB_API'))
versions = blade.api_version.list_versions().versions
if API_AGENT_VERSION in versions:
blade._api_client.user_agent = user_agent
except rest.ApiException as e:
module.fail_json(msg="Pure Storage FlashBlade authentication failed. Check your credentials")
else:
module.fail_json(msg="You must set PUREFB_URL and PUREFB_API environment variables or the fb_url and api_token module arguments")
return blade
def purefa_argument_spec():
"""Return standard base dictionary used for the argument_spec argument in AnsibleModule"""
return dict(
fa_url=dict(),
api_token=dict(no_log=True),
)
def purefb_argument_spec():
"""Return standard base dictionary used for the argument_spec argument in AnsibleModule"""
return dict(
fb_url=dict(),
api_token=dict(no_log=True),
)
| Name | Type | Size | Permission | Actions |
|---|---|---|---|---|
| __pycache__ | Folder | 0755 |
|
|
| identity | Folder | 0755 |
|
|
| mh | Folder | 0755 |
|
|
| net_tools | Folder | 0755 |
|
|
| oracle | Folder | 0755 |
|
|
| remote_management | Folder | 0755 |
|
|
| source_control | Folder | 0755 |
|
|
| storage | Folder | 0755 |
|
|
| _filelock.py | File | 3.35 KB | 0644 |
|
| _mount.py | File | 1.71 KB | 0644 |
|
| _stormssh.py | File | 8.27 KB | 0644 |
|
| alicloud_ecs.py | File | 12.38 KB | 0644 |
|
| btrfs.py | File | 16.95 KB | 0644 |
|
| cloud.py | File | 8.15 KB | 0644 |
|
| cmd_runner.py | File | 10.79 KB | 0644 |
|
| csv.py | File | 2 KB | 0644 |
|
| database.py | File | 6.44 KB | 0644 |
|
| deps.py | File | 2.35 KB | 0644 |
|
| dimensiondata.py | File | 10.52 KB | 0644 |
|
| gandi_livedns_api.py | File | 7.4 KB | 0644 |
|
| gconftool2.py | File | 1023 B | 0644 |
|
| gitlab.py | File | 4.59 KB | 0644 |
|
| heroku.py | File | 1.25 KB | 0644 |
|
| hwc_utils.py | File | 12.56 KB | 0644 |
|
| ibm_sa_utils.py | File | 3.17 KB | 0644 |
|
| ilo_redfish_utils.py | File | 9.76 KB | 0644 |
|
| influxdb.py | File | 3.35 KB | 0644 |
|
| ipa.py | File | 8.38 KB | 0644 |
|
| jenkins.py | File | 1.06 KB | 0644 |
|
| known_hosts.py | File | 5.68 KB | 0644 |
|
| ldap.py | File | 4.4 KB | 0644 |
|
| linode.py | File | 939 B | 0644 |
|
| lxd.py | File | 5.12 KB | 0644 |
|
| manageiq.py | File | 16.23 KB | 0644 |
|
| memset.py | File | 4.22 KB | 0644 |
|
| module_helper.py | File | 1.45 KB | 0644 |
|
| ocapi_utils.py | File | 20.75 KB | 0644 |
|
| oneandone.py | File | 9.12 KB | 0644 |
|
| onepassword.py | File | 872 B | 0644 |
|
| oneview.py | File | 17.51 KB | 0644 |
|
| online.py | File | 3.83 KB | 0644 |
|
| opennebula.py | File | 12.04 KB | 0644 |
|
| pipx.py | File | 1.72 KB | 0644 |
|
| proxmox.py | File | 5.09 KB | 0644 |
|
| puppet.py | File | 3.88 KB | 0644 |
|
| pure.py | File | 4.07 KB | 0644 |
|
| rax.py | File | 11.26 KB | 0644 |
|
| redfish_utils.py | File | 135.75 KB | 0644 |
|
| redhat.py | File | 9.08 KB | 0644 |
|
| redis.py | File | 3.14 KB | 0644 |
|
| rundeck.py | File | 3.29 KB | 0644 |
|
| saslprep.py | File | 6.67 KB | 0644 |
|
| scaleway.py | File | 12.96 KB | 0644 |
|
| ssh.py | File | 723 B | 0644 |
|
| univention_umc.py | File | 7.53 KB | 0644 |
|
| utm_utils.py | File | 9.08 KB | 0644 |
|
| version.py | File | 878 B | 0644 |
|
| vexata.py | File | 3.14 KB | 0644 |
|
| wdc_redfish_utils.py | File | 23.09 KB | 0644 |
|
| xenserver.py | File | 30.1 KB | 0644 |
|
| xfconf.py | File | 1.33 KB | 0644 |
|