Showing preview only (3,868K chars total). Download the full file or copy to clipboard to get everything.
Repository: sodafoundation/delfin
Branch: master
Commit: 14c1e86b6a86
Files: 416
Total size: 3.6 MB
Directory structure:
gitextract_3m8g0ek4/
├── .coveragerc
├── .github/
│ ├── ISSUE_TEMPLATE.md
│ ├── PULL_REQUEST_TEMPLATE.md
│ └── workflows/
│ ├── delfin_ci.yml
│ └── delfin_e2e_test.yml
├── .gitignore
├── CHANGELOG/
│ ├── CHANGELOG-v1.0.0.md
│ └── CHANGELOG-v1.1.0.md
├── Dockerfile
├── LICENSE
├── README.md
├── codecov.yml
├── delfin/
│ ├── __init__.py
│ ├── alert_manager/
│ │ ├── __init__.py
│ │ ├── alert_processor.py
│ │ ├── constants.py
│ │ ├── rpcapi.py
│ │ ├── snmp_validator.py
│ │ └── trap_receiver.py
│ ├── api/
│ │ ├── __init__.py
│ │ ├── api_utils.py
│ │ ├── common/
│ │ │ ├── __init__.py
│ │ │ └── wsgi.py
│ │ ├── contrib/
│ │ │ └── __init__.py
│ │ ├── extensions.py
│ │ ├── middlewares.py
│ │ ├── schemas/
│ │ │ ├── __init__.py
│ │ │ ├── access_info.py
│ │ │ ├── alert_source.py
│ │ │ ├── alerts.py
│ │ │ ├── storage_capabilities_schema.py
│ │ │ └── storages.py
│ │ ├── v1/
│ │ │ ├── __init__.py
│ │ │ ├── access_info.py
│ │ │ ├── alert_source.py
│ │ │ ├── alerts.py
│ │ │ ├── controllers.py
│ │ │ ├── disks.py
│ │ │ ├── filesystems.py
│ │ │ ├── masking_views.py
│ │ │ ├── port_groups.py
│ │ │ ├── ports.py
│ │ │ ├── qtrees.py
│ │ │ ├── quotas.py
│ │ │ ├── router.py
│ │ │ ├── shares.py
│ │ │ ├── storage_host_groups.py
│ │ │ ├── storage_host_initiators.py
│ │ │ ├── storage_hosts.py
│ │ │ ├── storage_pools.py
│ │ │ ├── storages.py
│ │ │ ├── volume_groups.py
│ │ │ └── volumes.py
│ │ ├── validation/
│ │ │ ├── __init__.py
│ │ │ ├── parameter_types.py
│ │ │ └── validators.py
│ │ └── views/
│ │ ├── __init__.py
│ │ ├── access_info.py
│ │ ├── alert_source.py
│ │ ├── alerts.py
│ │ ├── controllers.py
│ │ ├── disks.py
│ │ ├── filesystems.py
│ │ ├── masking_views.py
│ │ ├── port_groups.py
│ │ ├── ports.py
│ │ ├── qtrees.py
│ │ ├── quotas.py
│ │ ├── shares.py
│ │ ├── storage_host_groups.py
│ │ ├── storage_host_initiators.py
│ │ ├── storage_hosts.py
│ │ ├── storage_pools.py
│ │ ├── storages.py
│ │ ├── volume_groups.py
│ │ └── volumes.py
│ ├── cmd/
│ │ ├── __init__.py
│ │ ├── alert.py
│ │ ├── api.py
│ │ └── task.py
│ ├── common/
│ │ ├── __init__.py
│ │ ├── alert_util.py
│ │ ├── config.py
│ │ ├── constants.py
│ │ └── sqlalchemyutils.py
│ ├── context.py
│ ├── coordination.py
│ ├── cryptor.py
│ ├── db/
│ │ ├── __init__.py
│ │ ├── api.py
│ │ ├── base.py
│ │ └── sqlalchemy/
│ │ ├── __init__.py
│ │ ├── api.py
│ │ └── models.py
│ ├── drivers/
│ │ ├── __init__.py
│ │ ├── api.py
│ │ ├── dell_emc/
│ │ │ ├── __init__.py
│ │ │ ├── power_store/
│ │ │ │ ├── __init__.py
│ │ │ │ ├── consts.py
│ │ │ │ ├── power_store.py
│ │ │ │ └── rest_handler.py
│ │ │ ├── scaleio/
│ │ │ │ ├── __init__.py
│ │ │ │ ├── alert_consts.py
│ │ │ │ ├── consts.py
│ │ │ │ ├── rest_handler.py
│ │ │ │ └── scaleio_stor.py
│ │ │ ├── unity/
│ │ │ │ ├── __init__.py
│ │ │ │ ├── alert_handler.py
│ │ │ │ ├── consts.py
│ │ │ │ ├── rest_handler.py
│ │ │ │ └── unity.py
│ │ │ ├── vmax/
│ │ │ │ ├── __init__.py
│ │ │ │ ├── alert_handler/
│ │ │ │ │ ├── __init__.py
│ │ │ │ │ ├── alert_mapper.py
│ │ │ │ │ ├── oid_mapper.py
│ │ │ │ │ ├── snmp_alerts.py
│ │ │ │ │ └── unisphere_alerts.py
│ │ │ │ ├── client.py
│ │ │ │ ├── constants.py
│ │ │ │ ├── perf_utils.py
│ │ │ │ ├── rest.py
│ │ │ │ └── vmax.py
│ │ │ ├── vnx/
│ │ │ │ ├── __init__.py
│ │ │ │ └── vnx_block/
│ │ │ │ ├── __init__.py
│ │ │ │ ├── alert_handler.py
│ │ │ │ ├── component_handler.py
│ │ │ │ ├── consts.py
│ │ │ │ ├── navi_handler.py
│ │ │ │ ├── navicli_client.py
│ │ │ │ └── vnx_block.py
│ │ │ └── vplex/
│ │ │ ├── __init__.py
│ │ │ ├── alert_handler.py
│ │ │ ├── consts.py
│ │ │ ├── rest_handler.py
│ │ │ └── vplex_stor.py
│ │ ├── driver.py
│ │ ├── fake_storage/
│ │ │ └── __init__.py
│ │ ├── fujitsu/
│ │ │ ├── __init__.py
│ │ │ └── eternus/
│ │ │ ├── __init__.py
│ │ │ ├── cli_handler.py
│ │ │ ├── consts.py
│ │ │ ├── eternus_ssh_client.py
│ │ │ └── eternus_stor.py
│ │ ├── h3c/
│ │ │ ├── __init__.py
│ │ │ └── unistor_cf/
│ │ │ ├── __init__.py
│ │ │ └── unistor_cf.py
│ │ ├── helper.py
│ │ ├── hitachi/
│ │ │ ├── __init__.py
│ │ │ ├── hnas/
│ │ │ │ ├── __init__.py
│ │ │ │ ├── constants.py
│ │ │ │ ├── hds_nas.py
│ │ │ │ └── nas_handler.py
│ │ │ └── vsp/
│ │ │ ├── __init__.py
│ │ │ ├── consts.py
│ │ │ ├── rest_handler.py
│ │ │ └── vsp_stor.py
│ │ ├── hpe/
│ │ │ ├── __init__.py
│ │ │ ├── hpe_3par/
│ │ │ │ ├── __init__.py
│ │ │ │ ├── alert_handler.py
│ │ │ │ ├── component_handler.py
│ │ │ │ ├── consts.py
│ │ │ │ ├── hpe_3parstor.py
│ │ │ │ ├── rest_handler.py
│ │ │ │ └── ssh_handler.py
│ │ │ └── hpe_msa/
│ │ │ ├── __init__.py
│ │ │ ├── consts.py
│ │ │ ├── hpe_msastor.py
│ │ │ └── ssh_handler.py
│ │ ├── huawei/
│ │ │ ├── __init__.py
│ │ │ └── oceanstor/
│ │ │ ├── __init__.py
│ │ │ ├── alert_handler.py
│ │ │ ├── consts.py
│ │ │ ├── oceanstor.py
│ │ │ ├── oid_mapper.py
│ │ │ └── rest_client.py
│ │ ├── ibm/
│ │ │ ├── __init__.py
│ │ │ ├── ds8k/
│ │ │ │ ├── __init__.py
│ │ │ │ ├── alert_handler.py
│ │ │ │ ├── consts.py
│ │ │ │ ├── ds8k.py
│ │ │ │ └── rest_handler.py
│ │ │ └── storwize_svc/
│ │ │ ├── __init__.py
│ │ │ ├── consts.py
│ │ │ ├── ssh_handler.py
│ │ │ └── storwize_svc.py
│ │ ├── inspur/
│ │ │ ├── __init__.py
│ │ │ └── as5500/
│ │ │ ├── __init__.py
│ │ │ └── as5500.py
│ │ ├── macro_san/
│ │ │ ├── __init__.py
│ │ │ └── ms/
│ │ │ ├── __init__.py
│ │ │ ├── consts.py
│ │ │ ├── file/
│ │ │ │ └── __init__.py
│ │ │ ├── macro_ssh_client.py
│ │ │ ├── ms_handler.py
│ │ │ └── ms_stor.py
│ │ ├── manager.py
│ │ ├── netapp/
│ │ │ ├── __init__.py
│ │ │ └── dataontap/
│ │ │ ├── __init__.py
│ │ │ ├── cluster_mode.py
│ │ │ ├── constants.py
│ │ │ ├── mapping_handler.py
│ │ │ ├── netapp_handler.py
│ │ │ └── performance_handler.py
│ │ ├── pure/
│ │ │ ├── __init__.py
│ │ │ └── flasharray/
│ │ │ ├── __init__.py
│ │ │ ├── consts.py
│ │ │ ├── pure_flasharray.py
│ │ │ └── rest_handler.py
│ │ └── utils/
│ │ ├── __init__.py
│ │ ├── performance_file/
│ │ │ ├── __init__.py
│ │ │ ├── macro_san/
│ │ │ │ └── __init__.py
│ │ │ ├── svc/
│ │ │ │ └── __init__.py
│ │ │ └── vnx_block/
│ │ │ └── __init__.py
│ │ ├── rest_client.py
│ │ ├── ssh_client.py
│ │ └── tools.py
│ ├── exception.py
│ ├── exporter/
│ │ ├── __init__.py
│ │ ├── base_exporter.py
│ │ ├── example.py
│ │ ├── kafka/
│ │ │ ├── __init__.py
│ │ │ ├── exporter.py
│ │ │ └── kafka.py
│ │ └── prometheus/
│ │ ├── __init__.py
│ │ ├── alert_manager.py
│ │ ├── exporter.py
│ │ ├── exporter_server.py
│ │ └── prometheus.py
│ ├── i18n.py
│ ├── leader_election/
│ │ ├── __init__.py
│ │ ├── distributor/
│ │ │ ├── __init__.py
│ │ │ ├── perf_job_manager.py
│ │ │ └── task_distributor.py
│ │ ├── factory.py
│ │ ├── interface.py
│ │ └── tooz/
│ │ ├── __init__.py
│ │ ├── callback.py
│ │ └── leader_elector.py
│ ├── manager.py
│ ├── rpc.py
│ ├── service.py
│ ├── ssl_utils.py
│ ├── task_manager/
│ │ ├── __init__.py
│ │ ├── manager.py
│ │ ├── metrics_manager.py
│ │ ├── metrics_rpcapi.py
│ │ ├── perf_job_controller.py
│ │ ├── rpcapi.py
│ │ ├── scheduler/
│ │ │ ├── __init__.py
│ │ │ ├── schedule_manager.py
│ │ │ └── schedulers/
│ │ │ ├── __init__.py
│ │ │ └── telemetry/
│ │ │ ├── __init__.py
│ │ │ ├── failed_performance_collection_handler.py
│ │ │ ├── job_handler.py
│ │ │ └── performance_collection_handler.py
│ │ ├── subprocess_manager.py
│ │ ├── subprocess_rpcapi.py
│ │ └── tasks/
│ │ ├── __init__.py
│ │ ├── alerts.py
│ │ ├── resources.py
│ │ └── telemetry.py
│ ├── test.py
│ ├── tests/
│ │ ├── __init__.py
│ │ ├── e2e/
│ │ │ ├── GetResources.robot
│ │ │ ├── GetStorage.robot
│ │ │ ├── README.md
│ │ │ ├── RegisterStorage.robot
│ │ │ ├── RemoveStorage.robot
│ │ │ ├── UpdateAccessInfo.robot
│ │ │ ├── __init__.py
│ │ │ ├── test.json
│ │ │ ├── test_e2e.sh
│ │ │ └── testdriver/
│ │ │ ├── __init__.py
│ │ │ └── storage.json
│ │ └── unit/
│ │ ├── __init__.py
│ │ ├── alert_manager/
│ │ │ ├── __init__.py
│ │ │ ├── fakes.py
│ │ │ ├── test_alert_processor.py
│ │ │ ├── test_snmp_validator.py
│ │ │ └── test_trap_receiver.py
│ │ ├── api/
│ │ │ ├── __init__.py
│ │ │ ├── extensions/
│ │ │ │ ├── __init__.py
│ │ │ │ └── foxinsocks.py
│ │ │ ├── fakes.py
│ │ │ ├── test_api_validation.py
│ │ │ ├── test_extensions.py
│ │ │ ├── test_middlewares.py
│ │ │ ├── test_wsgi.py
│ │ │ └── v1/
│ │ │ ├── __init__.py
│ │ │ ├── test_access_info.py
│ │ │ ├── test_alert_source.py
│ │ │ ├── test_alerts.py
│ │ │ ├── test_storage_pools.py
│ │ │ ├── test_storages.py
│ │ │ └── test_volumes.py
│ │ ├── conf_fixture.py
│ │ ├── db/
│ │ │ ├── __init__.py
│ │ │ └── test_db_api.py
│ │ ├── drivers/
│ │ │ ├── __init__.py
│ │ │ ├── dell_emc/
│ │ │ │ ├── __init__.py
│ │ │ │ ├── power_store/
│ │ │ │ │ ├── __init__.py
│ │ │ │ │ └── test_power_store.py
│ │ │ │ ├── scaleio/
│ │ │ │ │ ├── __init__.py
│ │ │ │ │ ├── test_constans.py
│ │ │ │ │ └── test_scaleio_stor.py
│ │ │ │ ├── unity/
│ │ │ │ │ ├── __init__.py
│ │ │ │ │ └── test_emc_unity.py
│ │ │ │ ├── vmax/
│ │ │ │ │ ├── __init__.py
│ │ │ │ │ ├── test_alert_handler.py
│ │ │ │ │ └── test_vmax.py
│ │ │ │ ├── vnx/
│ │ │ │ │ ├── __init__.py
│ │ │ │ │ └── vnx_block/
│ │ │ │ │ ├── __init__.py
│ │ │ │ │ └── test_vnx_block.py
│ │ │ │ └── vplex/
│ │ │ │ ├── __init__.py
│ │ │ │ └── test_emc_vplex.py
│ │ │ ├── fujitsu/
│ │ │ │ ├── __init__.py
│ │ │ │ └── eternus/
│ │ │ │ ├── __init__.py
│ │ │ │ └── test_eternus_stor.py
│ │ │ ├── hitachi/
│ │ │ │ ├── __init__.py
│ │ │ │ ├── hnas/
│ │ │ │ │ ├── __init__.py
│ │ │ │ │ ├── constants.py
│ │ │ │ │ └── test_hnas.py
│ │ │ │ └── vsp/
│ │ │ │ ├── __init__.py
│ │ │ │ └── test_hitachi_vspstor.py
│ │ │ ├── hpe/
│ │ │ │ ├── __init__.py
│ │ │ │ ├── hpe_3par/
│ │ │ │ │ ├── __init__.py
│ │ │ │ │ └── test_hpe_3parstor.py
│ │ │ │ └── hpe_msa/
│ │ │ │ ├── __init__.py
│ │ │ │ ├── test_constans.py
│ │ │ │ └── test_hpe_msastor.py
│ │ │ ├── huawei/
│ │ │ │ ├── __init__.py
│ │ │ │ └── oceanstor/
│ │ │ │ ├── __init__.py
│ │ │ │ ├── test_alert_handler.py
│ │ │ │ ├── test_oceanstor.py
│ │ │ │ └── test_rest_client.py
│ │ │ ├── ibm/
│ │ │ │ ├── __init__.py
│ │ │ │ ├── ibm_ds8k/
│ │ │ │ │ ├── __init__.py
│ │ │ │ │ └── test_ibm_ds8k.py
│ │ │ │ └── storwize_svc/
│ │ │ │ ├── __init__.py
│ │ │ │ └── test_ibm_storwize_svc.py
│ │ │ ├── macro_san/
│ │ │ │ ├── __init__.py
│ │ │ │ └── ms/
│ │ │ │ ├── __init__.py
│ │ │ │ └── test_ms_stor.py
│ │ │ ├── netapp/
│ │ │ │ ├── __init__.py
│ │ │ │ └── netapp_ontap/
│ │ │ │ ├── __init__.py
│ │ │ │ ├── test_constans.py
│ │ │ │ └── test_netapp.py
│ │ │ ├── pure/
│ │ │ │ ├── __init__.py
│ │ │ │ └── flasharray/
│ │ │ │ ├── __init__.py
│ │ │ │ └── test_pure_flasharray.py
│ │ │ ├── test_api.py
│ │ │ └── test_manager.py
│ │ ├── exporter/
│ │ │ └── prometheus/
│ │ │ ├── __init__.py
│ │ │ └── test_prometheus.py
│ │ ├── fake_data.py
│ │ ├── fake_notifier.py
│ │ ├── leader_election/
│ │ │ ├── __init__.py
│ │ │ └── distributor/
│ │ │ ├── __init__.py
│ │ │ └── test_task_distributor.py
│ │ ├── task_manager/
│ │ │ ├── __init__.py
│ │ │ ├── scheduler/
│ │ │ │ ├── __init__.py
│ │ │ │ ├── schedulers/
│ │ │ │ │ ├── __init__.py
│ │ │ │ │ └── telemetry/
│ │ │ │ │ ├── __init__.py
│ │ │ │ │ ├── test_failed_performance_collection_handler.py
│ │ │ │ │ ├── test_job_handler.py
│ │ │ │ │ └── test_performance_collection_handler.py
│ │ │ │ └── test_scheduler.py
│ │ │ ├── test_alert_task.py
│ │ │ ├── test_resources.py
│ │ │ └── test_telemetry.py
│ │ ├── test_context.py
│ │ ├── test_coordination.py
│ │ ├── test_manager.py
│ │ ├── test_rpc.py
│ │ ├── utils.py
│ │ └── wsgi/
│ │ ├── __init__.py
│ │ └── test_common.py
│ ├── utils.py
│ ├── version.py
│ └── wsgi/
│ ├── __init__.py
│ └── common.py
├── docker-compose.yml
├── etc/
│ └── delfin/
│ ├── api-paste.ini
│ └── delfin.conf
├── installer/
│ ├── README.md
│ ├── ansible/
│ │ ├── clean.yml
│ │ ├── group_vars/
│ │ │ └── delfin.yml
│ │ ├── local.hosts
│ │ ├── roles/
│ │ │ ├── cleaner/
│ │ │ │ ├── scenarios/
│ │ │ │ │ ├── delfin.yml
│ │ │ │ │ └── release.yml
│ │ │ │ └── tasks/
│ │ │ │ └── main.yml
│ │ │ └── delfin-installer/
│ │ │ ├── scenarios/
│ │ │ │ ├── container.yml
│ │ │ │ ├── rabbitmq.yml
│ │ │ │ ├── redis.yml
│ │ │ │ ├── source-code.yml
│ │ │ │ └── start-delfin.yml
│ │ │ └── tasks/
│ │ │ └── main.yml
│ │ ├── script/
│ │ │ ├── create_db.py
│ │ │ └── virtualenv3_exec.j2
│ │ └── site.yml
│ ├── helper.py
│ ├── install
│ ├── install.conf
│ ├── install_delfin.py
│ ├── install_dependencies.sh
│ ├── precheck
│ ├── uninstall
│ └── util.sh
├── openapi-spec/
│ └── swagger.yaml
├── requirements.txt
├── script/
│ ├── create_db.py
│ └── start.sh
├── setup.cfg
├── setup.py
├── test-requirements.txt
└── tox.ini
================================================
FILE CONTENTS
================================================
================================================
FILE: .coveragerc
================================================
[run]
branch = true
source = delfin
omit = delfin/tests/*
================================================
FILE: .github/ISSUE_TEMPLATE.md
================================================
<!-- This form is for bug reports and feature requests! -->
**Is this a BUG REPORT or FEATURE REQUEST?**:
> Uncomment only one, leave it on its own line:
>
> /kind bug
> /kind feature
**What happened**:
**What you expected to happen**:
**How to reproduce it (as minimally and precisely as possible)**:
**Anything else we need to know?**:
**Environment**:
- Delfin(release/branch) version:
- OS (e.g. from /etc/os-release):
- Kernel (e.g. `uname -a`):
- Install tools:
- Others:
================================================
FILE: .github/PULL_REQUEST_TEMPLATE.md
================================================
<!-- Thanks for sending a pull request! -->
**What this PR does / why we need it**:
**Which issue this PR fixes** *(optional, in `fixes #<issue number>(, fixes #<issue_number>, ...)` format, will close that issue when PR gets merged)*: fixes #
**Special notes for your reviewer**:
**Release note**:
<!-- Steps to write your release note:
1. Use the release-note-* labels to set the release note state (if you have access)
2. Enter your extended release note in the below block; leaving it blank means using the PR title as the release note. If no release note is required, just write `NONE`.
-->
```release-note
```
================================================
FILE: .github/workflows/delfin_ci.yml
================================================
name: Delfin CI
on: [push, pull_request, workflow_dispatch]
jobs:
build:
runs-on: ${{ matrix.platform }}
strategy:
max-parallel: 6
matrix:
platform: [ubuntu-20.04]
python-version: [ 3.8 ]
steps:
- uses: actions/checkout@v2
- name: Install Python version ${{ matrix.python-version }}
uses: actions/setup-python@v1
with:
python-version: ${{ matrix.python-version }}
- name: Install dependencies
run: |
python -m pip install --upgrade pip
pip install -r requirements.txt
pip install -r test-requirements.txt
pip install tox codecov
- name: Unit test with tox
run: tox
- name: Test coverage with codecov
run: codecov
================================================
FILE: .github/workflows/delfin_e2e_test.yml
================================================
name: Delfin E2E Test
on: [push, pull_request, workflow_dispatch]
jobs:
test:
runs-on: ${{ matrix.platform }}
strategy:
max-parallel: 6
matrix:
platform: [ubuntu-20.04]
python-version: [ 3.8 ]
steps:
- name: Checkout delfin code
uses: actions/checkout@v2
- name: Install Python version ${{ matrix.python-version }}
uses: actions/setup-python@v1
with:
python-version: ${{ matrix.python-version }}
- name: Install dependencies
run: |
python -m pip install --upgrade pip
pip install -r requirements.txt
pip install -r test-requirements.txt
pip install tox codecov
- name: E2E Testing - Add Test Driver to Delfin
run: |
str="\ \ \ \ \ \ \ \ \ \ \ \ 'test_vendor test_model = delfin.tests.e2e.testdriver:TestDriver',"
sed -i "/FakeStorageDriver',/ a $str" ./setup.py
shell: bash
- name: E2E Testing - Install RabbitMQ
uses: getong/rabbitmq-action@v1.2
with:
rabbitmq version: '3.8.2-management-alpine'
host port: 5672
rabbitmq user: 'guest'
rabbitmq password: 'guest'
- name: E2E Testing - Install Redis
uses: supercharge/redis-github-action@1.2.0
with:
redis-version: 6
- name: E2E Testing - Build and Deploy Delfin with Test driver
run: |
sudo mkdir -p /var/lib/delfin
sudo chmod 0777 /var/lib/delfin
sudo mkdir -p /etc/delfin
sudo chmod 0777 /etc/delfin
python3 setup.py install
cp ./etc/delfin/api-paste.ini /etc/delfin/
python3 ./script/create_db.py --config-file ./etc/delfin/delfin.conf
sleep 1
python3 ./delfin/cmd/task.py --config-file ./etc/delfin/delfin.conf > /tmp/task.log 2>&1 &
python3 ./delfin/cmd/alert.py --config-file ./etc/delfin/delfin.conf > /tmp/alert.log 2>&1 &
python3 ./delfin/cmd/api.py --config-file ./etc/delfin/delfin.conf > /tmp/api.log 2>&1 &
shell: bash
- name: E2E Testing - Run RobotFramework
run: |
sleep 3
pip install robotframework
pip install robotframework-requests
pip install robotframework-jsonlibrary
DELFIN_DIR=`pwd`
TOP_DIR="${DELFIN_DIR}/delfin/tests/e2e"
ORIG_PATH='"storage.json"'
FILE_PATH="${TOP_DIR}/testdriver/storage.json"
sed -i "s|${ORIG_PATH}|\"${FILE_PATH}\"|g" $TOP_DIR/test.json
sleep 1
robot delfin/tests/e2e
shell: bash
================================================
FILE: .gitignore
================================================
# IDE config file
.idea
# Byte-compiled / optimized / DLL files
__pycache__/
*.py[cod]
*$py.class
# C extensions
*.so
# Distribution / packaging
.Python
build/
develop-eggs/
dist/
downloads/
eggs/
.eggs/
lib/
lib64/
parts/
sdist/
var/
wheels/
pip-wheel-metadata/
share/python-wheels/
*.egg-info/
.installed.cfg
*.egg
MANIFEST
# PyInstaller
# Usually these files are written by a python script from a template
# before PyInstaller builds the exe, so as to inject date/other infos into it.
*.manifest
*.spec
# Installer logs
pip-log.txt
pip-delete-this-directory.txt
# Unit test / coverage reports
htmlcov/
.tox/
.nox/
.coverage
.coverage.*
.cache
nosetests.xml
coverage.xml
*.cover
*.py,cover
.hypothesis/
.pytest_cache/
# Translations
*.mo
*.pot
# Django stuff:
*.log
local_settings.py
db.sqlite3
db.sqlite3-journal
# Flask stuff:
instance/
.webassets-cache
# Scrapy stuff:
.scrapy
# Sphinx documentation
docs/_build/
# PyBuilder
target/
# Jupyter Notebook
.ipynb_checkpoints
# IPython
profile_default/
ipython_config.py
# pyenv
.python-version
# pipenv
# According to pypa/pipenv#598, it is recommended to include Pipfile.lock in version control.
# However, in case of collaboration, if having platform-specific dependencies or dependencies
# having no cross-platform support, pipenv may install dependencies that don't work, or not
# install all needed dependencies.
#Pipfile.lock
# PEP 582; used by e.g. github.com/David-OConnor/pyflow
__pypackages__/
# Celery stuff
celerybeat-schedule
celerybeat.pid
# SageMath parsed files
*.sage.py
# Environments
.env
.venv
env/
venv/
ENV/
env.bak/
venv.bak/
# Spyder project settings
.spyderproject
.spyproject
# Rope project settings
.ropeproject
# mkdocs documentation
/site
# mypy
.mypy_cache/
.dmypy.json
dmypy.json
# Pyre type checker
.pyre/
================================================
FILE: CHANGELOG/CHANGELOG-v1.0.0.md
================================================
# Changelog
## [v1.0.0](https://github.com/sodafoundation/delfin/tree/v1.0.0) (2020-09-29)
[Full Changelog](https://github.com/sodafoundation/delfin/compare/v0.8.0...v1.0.0)
**Merged pull requests:**
- Fixing config path to sync with ansible installer [\#346](https://github.com/sodafoundation/delfin/pull/346) ([PravinRanjan10](https://github.com/PravinRanjan10))
- Syncing dev branch to master [\#345](https://github.com/sodafoundation/delfin/pull/345) ([PravinRanjan10](https://github.com/PravinRanjan10))
- Standalone Installer script for delfin [\#342](https://github.com/sodafoundation/delfin/pull/342) ([PravinRanjan10](https://github.com/PravinRanjan10))
- Sync master to performance collection dev branch [\#339](https://github.com/sodafoundation/delfin/pull/339) ([NajmudheenCT](https://github.com/NajmudheenCT))
- Updating Fake driver to sync with vmax model [\#338](https://github.com/sodafoundation/delfin/pull/338) ([PravinRanjan10](https://github.com/PravinRanjan10))
## [v0.8.0](https://github.com/sodafoundation/delfin/tree/v0.8.0) (2020-09-28)
[Full Changelog](https://github.com/sodafoundation/delfin/compare/v0.6.0...v0.8.0)
**Merged pull requests:**
- Modifying some exception in VMAX and schema validation of ssh acces info [\#343](https://github.com/sodafoundation/delfin/pull/343) ([NajmudheenCT](https://github.com/NajmudheenCT))
## [v0.6.0](https://github.com/sodafoundation/delfin/tree/v0.6.0) (2020-09-21)
[Full Changelog](https://github.com/sodafoundation/delfin/compare/v0.6.1...v0.6.0)
**Merged pull requests:**
- Code improvements [\#335](https://github.com/sodafoundation/delfin/pull/335) ([sushanthakumar](https://github.com/sushanthakumar))
- Fix static code check tools function depth defect [\#331](https://github.com/sodafoundation/delfin/pull/331) ([joseph-v](https://github.com/joseph-v))
- Fix static code check tool defects [\#330](https://github.com/sodafoundation/delfin/pull/330) ([joseph-v](https://github.com/joseph-v))
- Fix VMAX establish rest session [\#324](https://github.com/sodafoundation/delfin/pull/324) ([joseph-v](https://github.com/joseph-v))
- Fix volume name in VMAX driver [\#323](https://github.com/sodafoundation/delfin/pull/323) ([joseph-v](https://github.com/joseph-v))
- Remove plain text password caching in drivers [\#322](https://github.com/sodafoundation/delfin/pull/322) ([joseph-v](https://github.com/joseph-v))
- Correct input argument of StorageBackendException in oceanstor [\#317](https://github.com/sodafoundation/delfin/pull/317) ([joseph-v](https://github.com/joseph-v))
## [v0.6.1](https://github.com/sodafoundation/delfin/tree/v0.6.1) (2020-09-21)
[Full Changelog](https://github.com/sodafoundation/delfin/compare/v0.4.0...v0.6.1)
**Fixed bugs:**
- sync\_status is always 'synced' in the reponse of a registration [\#241](https://github.com/sodafoundation/delfin/issues/241)
- \[task manager\] Sync call stuck when rabbit-mq server is not running [\#129](https://github.com/sodafoundation/delfin/issues/129)
**Closed issues:**
- Dell EMC VMAX volume name is different from Unisphere dashboard [\#332](https://github.com/sodafoundation/delfin/issues/332)
- Encrypt password before caching in drivers [\#329](https://github.com/sodafoundation/delfin/issues/329)
**Merged pull requests:**
- Performance metric-config-update API for delfin [\#333](https://github.com/sodafoundation/delfin/pull/333) ([PravinRanjan10](https://github.com/PravinRanjan10))
- VMAX driver Performance collection: Initial framework and array level for metrics collection [\#326](https://github.com/sodafoundation/delfin/pull/326) ([NajmudheenCT](https://github.com/NajmudheenCT))
- Performance-collection framework for delfin [\#325](https://github.com/sodafoundation/delfin/pull/325) ([PravinRanjan10](https://github.com/PravinRanjan10))
- Query para driver changes for list alert api [\#319](https://github.com/sodafoundation/delfin/pull/319) ([sushanthakumar](https://github.com/sushanthakumar))
- Exception handling for delete snmp trap config [\#318](https://github.com/sodafoundation/delfin/pull/318) ([sushanthakumar](https://github.com/sushanthakumar))
- Alert sync api changes [\#316](https://github.com/sodafoundation/delfin/pull/316) ([sushanthakumar](https://github.com/sushanthakumar))
- Fix static code check defects [\#315](https://github.com/sodafoundation/delfin/pull/315) ([joseph-v](https://github.com/joseph-v))
- Fix warnings from static analyze tool [\#314](https://github.com/sodafoundation/delfin/pull/314) ([joseph-v](https://github.com/joseph-v))
- Query para update for list alert api [\#312](https://github.com/sodafoundation/delfin/pull/312) ([sushanthakumar](https://github.com/sushanthakumar))
## [v0.4.0](https://github.com/sodafoundation/delfin/tree/v0.4.0) (2020-08-28)
[Full Changelog](https://github.com/sodafoundation/delfin/compare/v0.2.0...v0.4.0)
**Implemented enhancements:**
- Need a mechanism to support SSL certificate verify for HTTPS request from driver to storage device. [\#227](https://github.com/sodafoundation/delfin/issues/227)
**Fixed bugs:**
- \[Driver\] Create extended exceptions for StorageBackendException [\#184](https://github.com/sodafoundation/delfin/issues/184)
- \[Alert Manager\] Irrelevant fields are shown as null in GET alert source [\#172](https://github.com/sodafoundation/delfin/issues/172)
- \[VMAX driver\] Firmware version is missing [\#147](https://github.com/sodafoundation/delfin/issues/147)
- VMAX volume details for volumes without Storage Group [\#74](https://github.com/sodafoundation/delfin/issues/74)
- In api.py: Change function name discover\_storage to update\_storage\_driver [\#69](https://github.com/sodafoundation/delfin/issues/69)
**Closed issues:**
- \[Alert Manager\] Clear alert implementation for EMC Vmax [\#261](https://github.com/sodafoundation/delfin/issues/261)
- \[Alert Manager\] Clear alert implementation for Huawei Oceanstor [\#260](https://github.com/sodafoundation/delfin/issues/260)
- \[Alert Manager\] Clear alert analysis for storage backends [\#259](https://github.com/sodafoundation/delfin/issues/259)
- \[Alert Manager\] Get alert analysis for storage backends [\#258](https://github.com/sodafoundation/delfin/issues/258)
- \[Alert Manager\] Alert specification check for other storage backends [\#249](https://github.com/sodafoundation/delfin/issues/249)
- \[Alert Manager\]Improve readability for alert model fields [\#239](https://github.com/sodafoundation/delfin/issues/239)
- Update Project ReadMe [\#231](https://github.com/sodafoundation/delfin/issues/231)
- Exporting alert model to export manager [\#126](https://github.com/sodafoundation/delfin/issues/126)
- \[Alert manager\] Load all custom mibs from configured path [\#114](https://github.com/sodafoundation/delfin/issues/114)
- \[Alert Manager\] Clear alert at backend [\#99](https://github.com/sodafoundation/delfin/issues/99)
- \[task manager\] Push resource data to Exporter [\#93](https://github.com/sodafoundation/delfin/issues/93)
- Handle the optimization issues in pool update [\#55](https://github.com/sodafoundation/delfin/issues/55)
- Handle multi node use cases in Driver Manager [\#50](https://github.com/sodafoundation/delfin/issues/50)
- Not correct behaviour of log info message [\#46](https://github.com/sodafoundation/delfin/issues/46)
**Merged pull requests:**
- Clear alert fix in hpe 3par driver [\#309](https://github.com/sodafoundation/delfin/pull/309) ([sushanthakumar](https://github.com/sushanthakumar))
- Alert source configuration range changes [\#308](https://github.com/sodafoundation/delfin/pull/308) ([sushanthakumar](https://github.com/sushanthakumar))
- Hpe3par: update SSL certificate verification method [\#307](https://github.com/sodafoundation/delfin/pull/307) ([jiangyutan](https://github.com/jiangyutan))
- Send clear event when snmp validation succeed [\#305](https://github.com/sodafoundation/delfin/pull/305) ([wisererik](https://github.com/wisererik))
- update next release version in setup.py [\#304](https://github.com/sodafoundation/delfin/pull/304) ([NajmudheenCT](https://github.com/NajmudheenCT))
- Adding Configurable VMAX expiration time [\#303](https://github.com/sodafoundation/delfin/pull/303) ([PravinRanjan10](https://github.com/PravinRanjan10))
- Hpe3par:separate the common parts of rest and SSH interfaces [\#302](https://github.com/sodafoundation/delfin/pull/302) ([jiangyutan](https://github.com/jiangyutan))
- Updated delfin changes [\#299](https://github.com/sodafoundation/delfin/pull/299) ([sushanthakumar](https://github.com/sushanthakumar))
- List and clear alert changes for unisphere alerts [\#298](https://github.com/sodafoundation/delfin/pull/298) ([sushanthakumar](https://github.com/sushanthakumar))
- Optimizing vmax driver exception related code. [\#297](https://github.com/sodafoundation/delfin/pull/297) ([PravinRanjan10](https://github.com/PravinRanjan10))
- Fetching Default SRP for volumes which are not associated with storage group [\#296](https://github.com/sodafoundation/delfin/pull/296) ([NajmudheenCT](https://github.com/NajmudheenCT))
- Hpe3par:modify traps;modify checkhealth's components [\#295](https://github.com/sodafoundation/delfin/pull/295) ([jiangyutan](https://github.com/jiangyutan))
- Add Secure backend driver and dynamic certificate reload [\#290](https://github.com/sodafoundation/delfin/pull/290) ([joseph-v](https://github.com/joseph-v))
- Remove debug infomation and Fix some grammar problems [\#289](https://github.com/sodafoundation/delfin/pull/289) ([jiangyutan](https://github.com/jiangyutan))
- Oceanstor driver return fix for clear alert [\#283](https://github.com/sodafoundation/delfin/pull/283) ([sushanthakumar](https://github.com/sushanthakumar))
- Handle invalid input while getting array details for VMAX driver [\#282](https://github.com/sodafoundation/delfin/pull/282) ([joseph-v](https://github.com/joseph-v))
- Adding name and firmware version for VMAX [\#277](https://github.com/sodafoundation/delfin/pull/277) ([NajmudheenCT](https://github.com/NajmudheenCT))
- Fix oceanstor driver issue [\#276](https://github.com/sodafoundation/delfin/pull/276) ([wisererik](https://github.com/wisererik))
- hpe-3par driver support [\#274](https://github.com/sodafoundation/delfin/pull/274) ([jiangyutan](https://github.com/jiangyutan))
## [v0.2.0](https://github.com/sodafoundation/delfin/tree/v0.2.0) (2020-08-11)
[Full Changelog](https://github.com/sodafoundation/delfin/compare/v0.1.0...v0.2.0)
**Implemented enhancements:**
- Remove example code because it will not be used [\#86](https://github.com/sodafoundation/delfin/issues/86)
**Closed issues:**
- Need to support SSH connection between delfin and devices. [\#245](https://github.com/sodafoundation/delfin/issues/245)
- \[Alert Manager\] Alert model filling for Huawei OceanStor [\#195](https://github.com/sodafoundation/delfin/issues/195)
**Merged pull requests:**
- Update event type for alert model [\#273](https://github.com/sodafoundation/delfin/pull/273) ([wisererik](https://github.com/wisererik))
- Custom mib path enhancement [\#271](https://github.com/sodafoundation/delfin/pull/271) ([sushanthakumar](https://github.com/sushanthakumar))
- Alert source update with snmp validation [\#270](https://github.com/sodafoundation/delfin/pull/270) ([sushanthakumar](https://github.com/sushanthakumar))
- Update VMax driver to remove PyU4V lib [\#268](https://github.com/sodafoundation/delfin/pull/268) ([joseph-v](https://github.com/joseph-v))
- Adding raw\_capacity and subscribed capacity in VMAX driver [\#267](https://github.com/sodafoundation/delfin/pull/267) ([NajmudheenCT](https://github.com/NajmudheenCT))
- Add configuration for exporter framework [\#266](https://github.com/sodafoundation/delfin/pull/266) ([wisererik](https://github.com/wisererik))
- Clear alert support [\#265](https://github.com/sodafoundation/delfin/pull/265) ([sushanthakumar](https://github.com/sushanthakumar))
- Alert model refine changes [\#264](https://github.com/sodafoundation/delfin/pull/264) ([sushanthakumar](https://github.com/sushanthakumar))
- Add raw capacity to database model [\#263](https://github.com/sodafoundation/delfin/pull/263) ([ThisIsClark](https://github.com/ThisIsClark))
- Modify the constant type of sync status [\#255](https://github.com/sodafoundation/delfin/pull/255) ([ThisIsClark](https://github.com/ThisIsClark))
- swagger correction in mutiple APIS [\#253](https://github.com/sodafoundation/delfin/pull/253) ([NajmudheenCT](https://github.com/NajmudheenCT))
- Update access\_info model to support both REST and SSH. [\#246](https://github.com/sodafoundation/delfin/pull/246) ([sfzeng](https://github.com/sfzeng))
\* *This Changelog was automatically generated by [github_changelog_generator](https://github.com/github-changelog-generator/github-changelog-generator)*
================================================
FILE: CHANGELOG/CHANGELOG-v1.1.0.md
================================================
# Changelog
## [Unreleased](https://github.com/sodafoundation/delfin/tree/HEAD)
[Full Changelog](https://github.com/sodafoundation/delfin/compare/v1.1.0-rc2...HEAD)
**Closed issues:**
- Module file is missing in IBM driver folder [\#455](https://github.com/sodafoundation/delfin/issues/455)
- Open API Spec \(Swagger file\) do not display disk api correctly [\#453](https://github.com/sodafoundation/delfin/issues/453)
**Merged pull requests:**
- Add python module file for ibm drivers [\#456](https://github.com/sodafoundation/delfin/pull/456) ([joseph-v](https://github.com/joseph-v))
- Fix api spec for format error in disk api [\#454](https://github.com/sodafoundation/delfin/pull/454) ([joseph-v](https://github.com/joseph-v))
## [v1.1.0-rc2](https://github.com/sodafoundation/delfin/tree/v1.1.0-rc2) (2021-01-05)
[Full Changelog](https://github.com/sodafoundation/delfin/compare/v1.1.0-rc1...v1.1.0-rc2)
**Merged pull requests:**
- Performance collection unregistration during storage deletion [\#451](https://github.com/sodafoundation/delfin/pull/451) ([sushanthakumar](https://github.com/sushanthakumar))
- Add EMC Unity driver [\#442](https://github.com/sodafoundation/delfin/pull/442) ([sushanthakumar](https://github.com/sushanthakumar))
- delfin 0.8.0 to master [\#439](https://github.com/sodafoundation/delfin/pull/439) ([PravinRanjan10](https://github.com/PravinRanjan10))
- Seperation of task service class [\#435](https://github.com/sodafoundation/delfin/pull/435) ([sushanthakumar](https://github.com/sushanthakumar))
## [v1.1.0-rc1](https://github.com/sodafoundation/delfin/tree/v1.1.0-rc1) (2020-12-24)
[Full Changelog](https://github.com/sodafoundation/delfin/compare/v1.0.0...v1.1.0-rc1)
**Closed issues:**
- Add python-dev instruction for delfin installation [\#418](https://github.com/sodafoundation/delfin/issues/418)
- Provide additional labels, storage name & storage serial number, in metrics collection data sent to Prometheus exporter [\#417](https://github.com/sodafoundation/delfin/issues/417)
- API update \(swagger\) for resource model improvement [\#405](https://github.com/sodafoundation/delfin/issues/405)
- Resource management improvement implementation [\#404](https://github.com/sodafoundation/delfin/issues/404)
- oslo\_service.wsgi.ConfigNotFound: Could not find config at api-paste.ini [\#390](https://github.com/sodafoundation/delfin/issues/390)
- Code improvements based on 0.8.0 version [\#356](https://github.com/sodafoundation/delfin/issues/356)
- Delfin installation doesn't work [\#340](https://github.com/sodafoundation/delfin/issues/340)
**Merged pull requests:**
- Adding Prometheus alert manager exporter [\#437](https://github.com/sodafoundation/delfin/pull/437) ([NajmudheenCT](https://github.com/NajmudheenCT))
- Update installer for the changed exporter path [\#436](https://github.com/sodafoundation/delfin/pull/436) ([joseph-v](https://github.com/joseph-v))
- Delfin exporter configurations and modified exporter selction mechanism [\#433](https://github.com/sodafoundation/delfin/pull/433) ([NajmudheenCT](https://github.com/NajmudheenCT))
- Update oceanstor for Controller, Port and Disk resource support [\#426](https://github.com/sodafoundation/delfin/pull/426) ([joseph-v](https://github.com/joseph-v))
- Adding more labels to array leval metrics [\#422](https://github.com/sodafoundation/delfin/pull/422) ([NajmudheenCT](https://github.com/NajmudheenCT))
- Add python3-dev package instruction [\#419](https://github.com/sodafoundation/delfin/pull/419) ([Anmolbansal1](https://github.com/Anmolbansal1))
- Update Delfin APIs for new resources controller, port & disk [\#415](https://github.com/sodafoundation/delfin/pull/415) ([joseph-v](https://github.com/joseph-v))
- Add Port resource to Delfin [\#408](https://github.com/sodafoundation/delfin/pull/408) ([joseph-v](https://github.com/joseph-v))
- Add Disk resource to Delfin [\#407](https://github.com/sodafoundation/delfin/pull/407) ([joseph-v](https://github.com/joseph-v))
- Delfin resource support enhancement for 'controller' [\#403](https://github.com/sodafoundation/delfin/pull/403) ([joseph-v](https://github.com/joseph-v))
\* *This Changelog was automatically generated by [github_changelog_generator](https://github.com/github-changelog-generator/github-changelog-generator)*
================================================
FILE: Dockerfile
================================================
# Copyright 2020 The SODA Authors.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# 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.
FROM ubuntu:18.04
MAINTAINER soda team
RUN apt-get update -y && \
apt-get install -y python3-pip && \
apt-get install -y sqlite3 && \
apt-get install -y libffi-dev && \
pip3 install --upgrade pip
ADD . /delfin
WORKDIR /delfin
RUN pip3 install -r requirements.txt && \
python3 setup.py install
ENTRYPOINT ["/delfin/script/start.sh"]
================================================
FILE: LICENSE
================================================
Apache License
Version 2.0, January 2004
http://www.apache.org/licenses/
TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION
1. Definitions.
"License" shall mean the terms and conditions for use, reproduction,
and distribution as defined by Sections 1 through 9 of this document.
"Licensor" shall mean the copyright owner or entity authorized by
the copyright owner that is granting the License.
"Legal Entity" shall mean the union of the acting entity and all
other entities that control, are controlled by, or are under common
control with that entity. For the purposes of this definition,
"control" means (i) the power, direct or indirect, to cause the
direction or management of such entity, whether by contract or
otherwise, or (ii) ownership of fifty percent (50%) or more of the
outstanding shares, or (iii) beneficial ownership of such entity.
"You" (or "Your") shall mean an individual or Legal Entity
exercising permissions granted by this License.
"Source" form shall mean the preferred form for making modifications,
including but not limited to software source code, documentation
source, and configuration files.
"Object" form shall mean any form resulting from mechanical
transformation or translation of a Source form, including but
not limited to compiled object code, generated documentation,
and conversions to other media types.
"Work" shall mean the work of authorship, whether in Source or
Object form, made available under the License, as indicated by a
copyright notice that is included in or attached to the work
(an example is provided in the Appendix below).
"Derivative Works" shall mean any work, whether in Source or Object
form, that is based on (or derived from) the Work and for which the
editorial revisions, annotations, elaborations, or other modifications
represent, as a whole, an original work of authorship. For the purposes
of this License, Derivative Works shall not include works that remain
separable from, or merely link (or bind by name) to the interfaces of,
the Work and Derivative Works thereof.
"Contribution" shall mean any work of authorship, including
the original version of the Work and any modifications or additions
to that Work or Derivative Works thereof, that is intentionally
submitted to Licensor for inclusion in the Work by the copyright owner
or by an individual or Legal Entity authorized to submit on behalf of
the copyright owner. For the purposes of this definition, "submitted"
means any form of electronic, verbal, or written communication sent
to the Licensor or its representatives, including but not limited to
communication on electronic mailing lists, source code control systems,
and issue tracking systems that are managed by, or on behalf of, the
Licensor for the purpose of discussing and improving the Work, but
excluding communication that is conspicuously marked or otherwise
designated in writing by the copyright owner as "Not a Contribution."
"Contributor" shall mean Licensor and any individual or Legal Entity
on behalf of whom a Contribution has been received by Licensor and
subsequently incorporated within the Work.
2. Grant of Copyright License. Subject to the terms and conditions of
this License, each Contributor hereby grants to You a perpetual,
worldwide, non-exclusive, no-charge, royalty-free, irrevocable
copyright license to reproduce, prepare Derivative Works of,
publicly display, publicly perform, sublicense, and distribute the
Work and such Derivative Works in Source or Object form.
3. Grant of Patent License. Subject to the terms and conditions of
this License, each Contributor hereby grants to You a perpetual,
worldwide, non-exclusive, no-charge, royalty-free, irrevocable
(except as stated in this section) patent license to make, have made,
use, offer to sell, sell, import, and otherwise transfer the Work,
where such license applies only to those patent claims licensable
by such Contributor that are necessarily infringed by their
Contribution(s) alone or by combination of their Contribution(s)
with the Work to which such Contribution(s) was submitted. If You
institute patent litigation against any entity (including a
cross-claim or counterclaim in a lawsuit) alleging that the Work
or a Contribution incorporated within the Work constitutes direct
or contributory patent infringement, then any patent licenses
granted to You under this License for that Work shall terminate
as of the date such litigation is filed.
4. Redistribution. You may reproduce and distribute copies of the
Work or Derivative Works thereof in any medium, with or without
modifications, and in Source or Object form, provided that You
meet the following conditions:
(a) You must give any other recipients of the Work or
Derivative Works a copy of this License; and
(b) You must cause any modified files to carry prominent notices
stating that You changed the files; and
(c) You must retain, in the Source form of any Derivative Works
that You distribute, all copyright, patent, trademark, and
attribution notices from the Source form of the Work,
excluding those notices that do not pertain to any part of
the Derivative Works; and
(d) If the Work includes a "NOTICE" text file as part of its
distribution, then any Derivative Works that You distribute must
include a readable copy of the attribution notices contained
within such NOTICE file, excluding those notices that do not
pertain to any part of the Derivative Works, in at least one
of the following places: within a NOTICE text file distributed
as part of the Derivative Works; within the Source form or
documentation, if provided along with the Derivative Works; or,
within a display generated by the Derivative Works, if and
wherever such third-party notices normally appear. The contents
of the NOTICE file are for informational purposes only and
do not modify the License. You may add Your own attribution
notices within Derivative Works that You distribute, alongside
or as an addendum to the NOTICE text from the Work, provided
that such additional attribution notices cannot be construed
as modifying the License.
You may add Your own copyright statement to Your modifications and
may provide additional or different license terms and conditions
for use, reproduction, or distribution of Your modifications, or
for any such Derivative Works as a whole, provided Your use,
reproduction, and distribution of the Work otherwise complies with
the conditions stated in this License.
5. Submission of Contributions. Unless You explicitly state otherwise,
any Contribution intentionally submitted for inclusion in the Work
by You to the Licensor shall be under the terms and conditions of
this License, without any additional terms or conditions.
Notwithstanding the above, nothing herein shall supersede or modify
the terms of any separate license agreement you may have executed
with Licensor regarding such Contributions.
6. Trademarks. This License does not grant permission to use the trade
names, trademarks, service marks, or product names of the Licensor,
except as required for reasonable and customary use in describing the
origin of the Work and reproducing the content of the NOTICE file.
7. Disclaimer of Warranty. Unless required by applicable law or
agreed to in writing, Licensor provides the Work (and each
Contributor provides its Contributions) on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
implied, including, without limitation, any warranties or conditions
of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A
PARTICULAR PURPOSE. You are solely responsible for determining the
appropriateness of using or redistributing the Work and assume any
risks associated with Your exercise of permissions under this License.
8. Limitation of Liability. In no event and under no legal theory,
whether in tort (including negligence), contract, or otherwise,
unless required by applicable law (such as deliberate and grossly
negligent acts) or agreed to in writing, shall any Contributor be
liable to You for damages, including any direct, indirect, special,
incidental, or consequential damages of any character arising as a
result of this License or out of the use or inability to use the
Work (including but not limited to damages for loss of goodwill,
work stoppage, computer failure or malfunction, or any and all
other commercial damages or losses), even if such Contributor
has been advised of the possibility of such damages.
9. Accepting Warranty or Additional Liability. While redistributing
the Work or Derivative Works thereof, You may choose to offer,
and charge a fee for, acceptance of support, warranty, indemnity,
or other liability obligations and/or rights consistent with this
License. However, in accepting such obligations, You may act only
on Your own behalf and on Your sole responsibility, not on behalf
of any other Contributor, and only if You agree to indemnify,
defend, and hold each Contributor harmless for any liability
incurred by, or claims asserted against, such Contributor by reason
of your accepting any such warranty or additional liability.
================================================
FILE: README.md
================================================
# delfin : SODA Infrastructure Manager Project
[](https://travis-ci.com/sodafoundation/delfin)
[](https://codecov.io/github/sodafoundation/delfin?branch=master)
[](https://github.com/sodafoundation/delfin/releases)
[](https://github.com/sodafoundation/delfin/blob/master/LICENSE)
<img src="https://sodafoundation.io/wp-content/uploads/2020/01/SODA_logo_outline_color_800x800.png" width="200" height="200">
## Introduction
delfin (Dolphin in spanish!) , the SODA Infrastructure Manager project is an an open source project to provide unified, intelligent and scalable resource management, alert and performance monitoring. It will cover the resource management of all the storage backends & other infrastructures under SODA deployment. It will also provide the alert management and metric data(performance/health) for monitoring and further analysis. It will provide a scalable framework where more and more backends as well as client exporters can be added. This will enable to add more storage and infrastructure backends and also support different management clients for monitoring and health prediction.
It provides unified APIs to access, export and connect with clients as well as a set of interfaces for various driver addition.
This is one of the SODA Core Projects and is maintained by SODA Foundation directly.
## Documentation
[https://docs.sodafoundation.io](https://docs.sodafoundation.io/)
## Quick Start - To Use/Experience
[https://docs.sodafoundation.io/guides/user-guides/delfin](https://docs.sodafoundation.io/guides/user-guides/delfin/)
## Quick Start - To Develop
[https://docs.sodafoundation.io/guides/developer-guides/delfin](https://docs.sodafoundation.io/guides/developer-guides/delfin/)
## Demo videos - To get to know the capabilities better
[https://www.youtube.com/watch?v=WtlxF7SHID4](https://www.youtube.com/watch?v=WtlxF7SHID4)
## Latest Releases
[https://github.com/sodafoundation/delfin/releases](https://github.com/sodafoundation/delfin/releases)
## Support and Issues
[https://github.com/sodafoundation/delfin/issues](https://github.com/sodafoundation/delfin/issues)
## Project Community
[https://sodafoundation.io/slack/](https://sodafoundation.io/slack/)
## How to contribute to this project?
Join [https://sodafoundation.io/slack/](https://sodafoundation.io/slack/) and share your interest in the ‘general’ channel
Checkout [https://github.com/sodafoundation/delfin/issues](https://github.com/sodafoundation/delfin/issues) labelled with ‘good first issue’ or ‘help needed’ or ‘help wanted’ or ‘StartMyContribution’ or ‘SMC’
## Project Roadmap
We want to build a unified intelligent and scalable infrastructure management framework for resource management (config, add, remove, update), alert management and performance metrics management.
[https://docs.sodafoundation.io](https://docs.sodafoundation.io/)
## Join SODA Foundation
Website : [https://sodafoundation.io](https://sodafoundation.io/)
Slack : [https://sodafoundation.io/slack/](https://sodafoundation.io/slack/)
Twitter : [@sodafoundation](https://twitter.com/sodafoundation)
Mailinglist : [https://lists.sodafoundation.io](https://lists.sodafoundation.io/)
================================================
FILE: codecov.yml
================================================
comment:
layout: "header, diff, tree"
coverage:
range: "70...100"
precision: 2
round: down
status:
project:
default:
target: 70%
patch: off
================================================
FILE: delfin/__init__.py
================================================
================================================
FILE: delfin/alert_manager/__init__.py
================================================
================================================
FILE: delfin/alert_manager/alert_processor.py
================================================
# Copyright 2020 The SODA Authors.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# 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.
import time
import threading
from oslo_log import log
from delfin import context
from delfin import coordination
from delfin import db
from delfin import exception
from delfin.common import alert_util
from delfin.drivers import api as driver_manager
from delfin.exporter import base_exporter
from delfin.task_manager import rpcapi
LOG = log.getLogger(__name__)
class AlertProcessor(object):
"""Alert model translation and export functions"""
def __init__(self):
self.driver_manager = driver_manager.API()
self.exporter_manager = base_exporter.AlertExporterManager()
self.task_rpcapi = rpcapi.TaskAPI()
def process_alert_info(self, alert):
"""Fills alert model using driver manager interface."""
ctxt = context.get_admin_context()
storage = db.storage_get(ctxt, alert['storage_id'])
alert_model = {}
try:
alert_model = self.driver_manager.parse_alert(ctxt,
alert['storage_id'],
alert)
# Fill storage specific info
if alert_model:
storage = self.get_storage_from_parsed_alert(
ctxt, storage, alert_model)
alert_util.fill_storage_attributes(alert_model, storage)
except exception.IncompleteTrapInformation as e:
LOG.warning(e)
threading.Thread(target=self.sync_storage_alert,
args=(ctxt, alert['storage_id'])).start()
except exception.AlertSourceNotFound:
LOG.info("Could not identify alert source from parsed alert. "
"Skipping the dispatch of alert")
return
except Exception as e:
LOG.error(e)
raise exception.InvalidResults(
"Failed to fill the alert model from driver.")
# Export to base exporter which handles dispatch for all exporters
if alert_model:
LOG.info("Dispatching one SNMP Trap to {} with sn {}".format(
alert_model['storage_id'], alert_model['serial_number']))
self.exporter_manager.dispatch(ctxt, [alert_model])
def get_storage_from_parsed_alert(self, ctxt, storage, alert_model):
# If parse_alert sets 'serial_number' or 'storage_name' in the
# alert_model, we need to get corresponding storage details
# from the db and fill that in alert_model
storage_sn = alert_model.get('serial_number')
storage_name = alert_model.get('storage_name')
filters = {
"vendor": storage['vendor'],
"model": storage['model'],
}
try:
if storage_sn and storage_sn != storage['serial_number']:
filters['serial_number'] = storage_sn
elif storage_name and storage_name != storage['name']:
filters['name'] = storage_name
else:
return storage
storage_list = db.storage_get_all(ctxt, filters=filters)
if not storage_list:
msg = "Failed to get destination storage for SNMP Trap. " \
"Storage with serial number {} or storage name {} " \
"not found in DB".format(storage_sn, storage_name)
raise exception.AlertSourceNotFound(msg)
db.alert_source_get(ctxt, storage_list[0]['id'])
storage = storage_list[0]
except exception.AlertSourceNotFound:
LOG.info("Storage with serial number {} or name {} "
"is not registered for receiving "
"SNMP Trap".format(storage_sn, storage_name))
raise
return storage
@coordination.synchronized('sync-trap-{storage_id}', blocking=False)
def sync_storage_alert(self, context, storage_id):
time.sleep(10)
self.task_rpcapi.sync_storage_alerts(context, storage_id, None)
================================================
FILE: delfin/alert_manager/constants.py
================================================
# Copyright 2020 The SODA Authors.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# 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.
# SNMP dispatcher job id (static identifier)
SNMP_DISPATCHER_JOB_ID = 1
# Valid SNMP versions.
SNMP_V1_INT = 1
SNMP_V2_INT = 2
SNMP_V3_INT = 3
VALID_SNMP_VERSIONS = {"snmpv1": SNMP_V1_INT, "snmpv2c": SNMP_V2_INT,
"snmpv3": SNMP_V3_INT}
# Default limitation for batch query.
DEFAULT_LIMIT = 1000
================================================
FILE: delfin/alert_manager/rpcapi.py
================================================
# Copyright 2012, Red Hat, Inc.
#
# Licensed under the Apache License, Version 2.0 (the "License"); you may
# not use this file except in compliance with the License. You may obtain
# a copy of the License at
#
# 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.
"""
Client side of the alert manager RPC API.
"""
import oslo_messaging as messaging
from oslo_config import cfg
from delfin import rpc
CONF = cfg.CONF
class AlertAPI(object):
"""Client side of the alert manager rpc API.
API version history:
1.0 - Initial version.
"""
RPC_API_VERSION = '1.0'
def __init__(self):
super(AlertAPI, self).__init__()
target = messaging.Target(topic=CONF.delfin_alert_topic,
version=self.RPC_API_VERSION)
self.client = rpc.get_client(target, version_cap=self.RPC_API_VERSION)
def sync_snmp_config(self, ctxt, snmp_config_to_del, snmp_config_to_add):
call_context = self.client.prepare(version='1.0', fanout=True)
return call_context.cast(ctxt,
'sync_snmp_config',
snmp_config_to_del=snmp_config_to_del,
snmp_config_to_add=snmp_config_to_add)
def check_snmp_config(self, ctxt, snmp_config):
call_context = self.client.prepare(version='1.0')
return call_context.cast(ctxt,
'check_snmp_config',
snmp_config=snmp_config)
================================================
FILE: delfin/alert_manager/snmp_validator.py
================================================
# Copyright 2020 The SODA Authors.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# 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.
import binascii
import copy
import six
from oslo_config import cfg
from oslo_log import log
from oslo_utils import encodeutils
from pyasn1.type.univ import OctetString
from pysnmp.entity.rfc3413.oneliner import cmdgen
from delfin import cryptor
from delfin import db
from delfin import exception
from delfin import utils
from delfin.common import constants
from delfin.exporter import base_exporter
CONF = cfg.CONF
LOG = log.getLogger(__name__)
class SNMPValidator(object):
def __init__(self):
self.exporter = base_exporter.AlertExporterManager()
self.snmp_error_flag = {}
def validate(self, ctxt, alert_source):
engine_id = alert_source.get('engine_id')
try:
hosts = alert_source['host'].split(',')
temp_alert_source = copy.deepcopy(alert_source)
# Sets a value to raise a SNMPConnectionFailed when multiple
# alarm sources fail to be verified
connection_times = 0
for host in hosts:
temp_alert_source['host'] = host
try:
connection_times += 1
alert_source = \
self.validate_connectivity(ctxt, temp_alert_source)
break
except Exception as e:
if connection_times == len(hosts):
raise e
# If protocol is snmpv3, the snmp_validator will update
# engine id if engine id is empty. Therefore, engine id
# should be saved in database.
if not engine_id and alert_source.get('engine_id'):
alert_source_dict = {
'engine_id': alert_source.get('engine_id')}
db.alert_source_update(ctxt,
alert_source.get('storage_id'),
alert_source_dict)
self._handle_validation_result(ctxt,
alert_source.get('storage_id'),
constants.Category.RECOVERY)
except exception.SNMPConnectionFailed:
self._handle_validation_result(ctxt,
alert_source.get('storage_id'))
except Exception as e:
msg = six.text_type(e)
LOG.error("Failed to check snmp config. Reason: %s", msg)
@staticmethod
def validate_connectivity(ctxt, alert_source):
# Fill optional parameters with default values if not set in input
if not alert_source.get('port'):
alert_source['port'] = constants.DEFAULT_SNMP_CONNECT_PORT
if not alert_source.get('context_name'):
alert_source['context_name'] = None
if not alert_source.get('retry_num'):
alert_source['retry_num'] = constants.DEFAULT_SNMP_RETRY_NUM
if not alert_source.get('expiration'):
alert_source['expiration'] = constants.DEFAULT_SNMP_EXPIRATION_TIME
if CONF.snmp_validation_enabled is False:
return alert_source
storage_id = alert_source.get('storage_id')
access_info = db.access_info_get(ctxt, storage_id)
access_info = dict(access_info)
if access_info.get('model') not in constants.SNMP_SUPPORTED_MODELS:
return alert_source
cmd_gen = cmdgen.CommandGenerator()
version = alert_source.get('version')
# Connect to alert source through snmp get to check the configuration
try:
target = cmdgen.UdpTransportTarget((alert_source['host'],
alert_source['port']),
timeout=alert_source[
'expiration'],
retries=alert_source[
'retry_num'])
target.setLocalAddress((CONF.my_ip, 0))
if version.lower() == 'snmpv3':
# Register engine observer to get engineId,
# Code reference from: http://snmplabs.com/pysnmp/
observer_context = {}
cmd_gen.snmpEngine.observer.registerObserver(
lambda e, p, v, c: c.update(
securityEngineId=v['securityEngineId']),
'rfc3412.prepareDataElements:internal',
cbCtx=observer_context
)
auth_key = None
if alert_source['auth_key']:
auth_key = encodeutils.to_utf8(
cryptor.decode(alert_source['auth_key']))
privacy_key = None
if alert_source['privacy_key']:
privacy_key = encodeutils.to_utf8(
cryptor.decode(alert_source['privacy_key']))
auth_protocol = None
privacy_protocol = None
if alert_source['auth_protocol']:
auth_protocol = constants.AUTH_PROTOCOL_MAP.get(
alert_source['auth_protocol'].lower())
if alert_source['privacy_protocol']:
privacy_protocol = constants.PRIVACY_PROTOCOL_MAP.get(
alert_source['privacy_protocol'].lower())
engine_id = alert_source.get('engine_id')
if engine_id:
engine_id = OctetString.fromHexString(engine_id)
error_indication, __, __, __ = cmd_gen.getCmd(
cmdgen.UsmUserData(alert_source['username'],
authKey=auth_key,
privKey=privacy_key,
authProtocol=auth_protocol,
privProtocol=privacy_protocol,
securityEngineId=engine_id),
target,
constants.SNMP_QUERY_OID,
)
if 'securityEngineId' in observer_context:
engine_id = observer_context.get('securityEngineId')
alert_source['engine_id'] = binascii.hexlify(
engine_id.asOctets()).decode()
else:
community_string = encodeutils.to_utf8(
cryptor.decode(alert_source['community_string']))
error_indication, __, __, __ = cmd_gen.getCmd(
cmdgen.CommunityData(
community_string,
contextName=alert_source['context_name']),
target,
constants.SNMP_QUERY_OID,
)
cmd_gen.snmpEngine.transportDispatcher.closeDispatcher()
if not error_indication:
return alert_source
# Prepare exception with error_indication
msg = six.text_type(error_indication)
except Exception as e:
msg = six.text_type(e)
# Since validation occur error, raise exception
LOG.error("Configuration validation failed with alert source for "
"reason: %s." % msg)
raise exception.SNMPConnectionFailed(msg)
def _handle_validation_result(self, ctxt, storage_id,
category=constants.Category.FAULT):
try:
storage = db.storage_get(ctxt, storage_id)
serial_number = storage.get('serial_number')
if category == constants.Category.FAULT:
self.snmp_error_flag[serial_number] = True
self._dispatch_snmp_validation_alert(ctxt, storage, category)
elif self.snmp_error_flag.get(serial_number, True):
self.snmp_error_flag[serial_number] = False
self._dispatch_snmp_validation_alert(ctxt, storage, category)
except Exception as e:
msg = six.text_type(e)
LOG.error("Exception occurred when handling validation "
"error: %s ." % msg)
def _dispatch_snmp_validation_alert(self, ctxt, storage, category):
alert = {
'storage_id': storage['id'],
'storage_name': storage['name'],
'vendor': storage['vendor'],
'model': storage['model'],
'serial_number': storage['serial_number'],
'alert_id': constants.SNMP_CONNECTION_FAILED_ALERT_ID,
'sequence_number': 0,
'alert_name': 'SNMP connect failed',
'category': category,
'severity': constants.Severity.MAJOR,
'type': constants.EventType.COMMUNICATIONS_ALARM,
'location': 'NetworkEntity=%s' % storage['name'],
'description': "SNMP connection to the storage failed. "
"SNMP traps from storage will not be received.",
'recovery_advice': "1. The network connection is abnormal. "
"2. SNMP authentication parameters "
"are invalid.",
'occur_time': utils.utcnow_ms(),
}
self.exporter.dispatch(ctxt, alert)
================================================
FILE: delfin/alert_manager/trap_receiver.py
================================================
# Copyright 2020 The SODA Authors.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# 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.
import six
from oslo_log import log
from oslo_service import periodic_task
from oslo_utils import encodeutils
from pysnmp.carrier.asyncore.dgram import udp
from pysnmp.entity import engine, config
from pysnmp.entity.rfc3413 import ntfrcv
from pysnmp.proto.api import v2c
from pysnmp.smi import builder, view
from retrying import retry
from delfin import context, cryptor
from delfin import db
from delfin import exception
from delfin import manager
from delfin.alert_manager import alert_processor
from delfin.alert_manager import constants
from delfin.alert_manager import rpcapi
from delfin.alert_manager import snmp_validator
from delfin.common import constants as common_constants
from delfin.db import api as db_api
from delfin.i18n import _
LOG = log.getLogger(__name__)
class TrapReceiver(manager.Manager):
"""Trap listening and processing functions"""
RPC_API_VERSION = '1.0'
def __init__(self, service_name=None, *args, **kwargs):
self.mib_view_controller = kwargs.get('mib_view_controller')
self.snmp_engine = kwargs.get('snmp_engine')
self.trap_receiver_address = kwargs.get('trap_receiver_address')
self.trap_receiver_port = kwargs.get('trap_receiver_port')
self.alert_processor = alert_processor.AlertProcessor()
self.snmp_validator = snmp_validator.SNMPValidator()
self.alert_rpc_api = rpcapi.AlertAPI()
super(TrapReceiver, self).__init__(host=kwargs.get('host'))
def sync_snmp_config(self, ctxt, snmp_config_to_del=None,
snmp_config_to_add=None):
if snmp_config_to_del:
self._delete_snmp_config(ctxt, snmp_config_to_del)
if snmp_config_to_add:
self.snmp_validator.validate(ctxt, snmp_config_to_add)
self._add_snmp_config(ctxt, snmp_config_to_add)
def _add_snmp_config(self, ctxt, new_config):
storage_id = new_config.get("storage_id")
LOG.info("Start to add snmp trap config for storage: %s",
storage_id)
try:
version_int = self._get_snmp_version_int(ctxt,
new_config.get("version"))
if version_int == constants.SNMP_V2_INT or \
version_int == constants.SNMP_V1_INT:
community_string = cryptor.decode(
new_config.get("community_string"))
community_string = encodeutils.to_utf8(community_string)
community_index = self._get_community_index(storage_id)
config.addV1System(self.snmp_engine, community_index,
community_string,
contextName=community_string)
else:
username = new_config.get("username")
engine_id = new_config.get("engine_id")
if engine_id:
engine_id = v2c.OctetString(hexValue=engine_id)
auth_key = new_config.get("auth_key")
auth_protocol = new_config.get("auth_protocol")
privacy_key = new_config.get("privacy_key")
privacy_protocol = new_config.get("privacy_protocol")
if auth_key:
auth_key = encodeutils.to_utf8(cryptor.decode(auth_key))
if privacy_key:
privacy_key = encodeutils.to_utf8(
cryptor.decode(privacy_key))
config.addV3User(
self.snmp_engine,
userName=username,
authKey=auth_key,
privKey=privacy_key,
authProtocol=self._get_usm_auth_protocol(ctxt,
auth_protocol),
privProtocol=self._get_usm_priv_protocol(ctxt,
privacy_protocol),
securityEngineId=engine_id)
LOG.info("Add snmp trap config for storage: %s successfully.",
storage_id)
except Exception as e:
msg = six.text_type(e)
LOG.error("Failed to add snmp trap config for storage: %s. "
"Reason: %s", storage_id, msg)
raise e
def _delete_snmp_config(self, ctxt, snmp_config):
LOG.info("Start to remove snmp trap config.")
version_int = self._get_snmp_version_int(ctxt,
snmp_config.get("version"))
if version_int == constants.SNMP_V3_INT:
username = snmp_config.get('username')
engine_id = snmp_config.get('engine_id')
if engine_id:
engine_id = v2c.OctetString(hexValue=engine_id)
try:
config.delV3User(self.snmp_engine, userName=username,
securityEngineId=engine_id)
except Exception as e:
msg = six.text_type(e)
LOG.warning("Snmp trap configuration to be "
"deleted could not be found. Reason: %s", msg)
else:
storage_id = snmp_config.get('storage_id')
community_index = self._get_community_index(storage_id)
config.delV1System(self.snmp_engine, community_index)
def _get_community_index(self, storage_id):
return storage_id.replace('-', '')
def _get_snmp_version_int(self, ctxt, version):
_version = version.lower()
version_int = constants.VALID_SNMP_VERSIONS.get(_version)
if version_int is None:
msg = "Invalid snmp version %s." % version
raise exception.InvalidSNMPConfig(msg)
return version_int
def _get_usm_auth_protocol(self, ctxt, auth_protocol):
if auth_protocol:
usm_auth_protocol = common_constants.AUTH_PROTOCOL_MAP \
.get(auth_protocol.lower())
if usm_auth_protocol:
return usm_auth_protocol
else:
msg = "Invalid auth_protocol %s." % auth_protocol
raise exception.InvalidSNMPConfig(msg)
else:
return config.usmNoAuthProtocol
def _get_usm_priv_protocol(self, ctxt, privacy_protocol):
if privacy_protocol:
usm_priv_protocol = common_constants.PRIVACY_PROTOCOL_MAP.get(
privacy_protocol.lower())
if usm_priv_protocol:
return usm_priv_protocol
else:
msg = "Invalid privacy_protocol %s." % privacy_protocol
raise exception.InvalidSNMPConfig(msg)
return config.usmNoPrivProtocol
def _mib_builder(self):
"""Loads given set of mib files from given path."""
mib_builder = builder.MibBuilder()
self.mib_view_controller = view.MibViewController(mib_builder)
def _add_transport(self):
"""Configures the transport parameters for the snmp engine."""
try:
config.addTransport(
self.snmp_engine,
udp.domainName,
udp.UdpTransport().openServerMode(
(self.trap_receiver_address, int(self.trap_receiver_port)))
)
except Exception as e:
LOG.error('Failed to add transport, error is %s'
% six.text_type(e))
raise exception.DelfinException(message=six.text_type(e))
@staticmethod
def _get_alert_source_by_host(source_ip):
"""Gets alert source for given source ip address."""
filters = {'host~': source_ip}
ctxt = context.RequestContext()
# Using the known filter and db exceptions are handled by api
alert_sources = db.alert_source_get_all(ctxt, filters=filters)
if not alert_sources:
raise exception.AlertSourceNotFoundWithHost(source_ip)
# This is to make sure unique host is configured each alert source
unique_alert_source = None
if len(alert_sources) > 1:
# Clear invalid alert_source
for alert_source in alert_sources:
try:
db.storage_get(ctxt, alert_source['storage_id'])
except exception.StorageNotFound:
LOG.warning('Found redundancy alert source for storage %s'
% alert_source['storage_id'])
try:
db.alert_source_delete(
ctxt, alert_source['storage_id'])
except Exception as e:
LOG.warning('Delete the invalid alert source failed, '
'reason is %s' % six.text_type(e))
else:
unique_alert_source = alert_source
else:
unique_alert_source = alert_sources[0]
if unique_alert_source is None:
msg = (_("Failed to get unique alert source with host %s.")
% source_ip)
raise exception.InvalidResults(msg)
return unique_alert_source
def _cb_fun(self, state_reference, context_engine_id, context_name,
var_binds, cb_ctx):
"""Callback function to process the incoming trap."""
exec_context = self.snmp_engine.observer.getExecutionContext(
'rfc3412.receiveMessage:request')
LOG.debug("Get notification from: %s" %
"#".join([str(x) for x in exec_context['transportAddress']]))
alert = {}
try:
# transportAddress contains both ip and port, extract ip address
source_ip = exec_context['transportAddress'][0]
alert_source = self._get_alert_source_by_host(source_ip)
# In case of non v3 version, community string is used to map the
# trap. Pysnmp library helps to filter traps whose community string
# are not configured. But if a given community name x is configured
# for storage1, if the trap is received with x from storage 2,
# library will allow the trap. So for non v3 version, we need to
# verify that community name is configured at alert source db for
# the storage which is sending traps.
# context_name contains the incoming community string value
if exec_context['securityModel'] != constants.SNMP_V3_INT \
and cryptor.decode(alert_source['community_string']) \
!= str(context_name):
msg = (_("Community string not matching with alert source %s, "
"dropping it.") % source_ip)
raise exception.InvalidResults(msg)
for oid, val in var_binds:
# Fill raw oid and values
oid_str = str(oid)
alert[oid_str] = str(val)
# Fill additional info to alert info
alert['transport_address'] = source_ip
alert['storage_id'] = alert_source['storage_id']
filters = {'mgmt_ip': source_ip,
'storage_id': alert_source['storage_id']}
ctxt = context.RequestContext()
controllers = db.controller_get_all(ctxt, filters=filters)
if controllers:
alert['controller_name'] = controllers[0].get('name')
# Handover to alert processor for model translation and export
self.alert_processor.process_alert_info(alert)
except exception.DelfinException as e:
# Log and end the trap processing error flow
err_msg = _("Failed to process alert report (%s).") % e.msg
LOG.exception(err_msg)
except Exception as e:
err_msg = six.text_type(e)
LOG.exception(err_msg)
def _load_snmp_config(self):
"""Load snmp config from database when service start."""
ctxt = context.get_admin_context()
marker = None
finished = False
limit = constants.DEFAULT_LIMIT
while not finished:
alert_sources = db_api.alert_source_get_all(ctxt, marker=marker,
limit=limit)
for alert_source in alert_sources:
snmp_config = dict()
snmp_config.update(alert_source)
self._add_snmp_config(ctxt, snmp_config)
marker = alert_source['storage_id']
if len(alert_sources) < limit:
finished = True
@retry(stop_max_attempt_number=180, wait_random_min=4000,
wait_random_max=6000)
def start(self):
"""Starts the snmp trap receiver with necessary prerequisites."""
snmp_engine = engine.SnmpEngine()
self.snmp_engine = snmp_engine
try:
# Load all the mibs and do snmp config
self._mib_builder()
self._load_snmp_config()
# Register callback for notification receiver
ntfrcv.NotificationReceiver(snmp_engine, self._cb_fun)
# Add transport info(ip, port) and start the listener
self._add_transport()
snmp_engine.transportDispatcher.jobStarted(
constants.SNMP_DISPATCHER_JOB_ID)
except Exception as e:
LOG.error(e)
raise ValueError("Failed to setup for trap listener.")
try:
LOG.info("Starting trap receiver.")
snmp_engine.transportDispatcher.runDispatcher()
except Exception:
snmp_engine.transportDispatcher.closeDispatcher()
raise ValueError("Failed to start trap listener.")
def stop(self):
"""Brings down the snmp trap receiver."""
# Go ahead with shutdown, ignore if any errors happening during the
# process as it is shutdown
if self.snmp_engine:
self.snmp_engine.transportDispatcher.closeDispatcher()
LOG.info("Trap receiver stopped.")
@periodic_task.periodic_task(spacing=1800, run_immediately=True)
def heart_beat_task_spawn(self, ctxt):
"""Periodical task to spawn snmp heart beat check."""
LOG.info("Spawn the snmp heart beat check task.")
alert_source_list = db.alert_source_get_all(ctxt)
for alert_source in alert_source_list:
self.alert_rpc_api.check_snmp_config(ctxt, alert_source)
def check_snmp_config(self, ctxt, snmp_config):
LOG.info("Received snmp config checking request for "
"storage: %s", snmp_config['storage_id'])
self.snmp_validator.validate(ctxt, snmp_config)
================================================
FILE: delfin/api/__init__.py
================================================
# Copyright 2010 United States Government as represented by the
# Administrator of the National Aeronautics and Space Administration.
# All Rights Reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License"); you may
# not use this file except in compliance with the License. You may obtain
# a copy of the License at
#
# 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.
import paste.urlmap
def root_app_factory(loader, global_conf, **local_conf):
return paste.urlmap.urlmap_factory(loader, global_conf, **local_conf)
================================================
FILE: delfin/api/api_utils.py
================================================
# Copyright 2020 The SODA Authors.
# Copyright 2010 OpenStack Foundation
# All Rights Reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License"); you may
# not use this file except in compliance with the License. You may obtain
# a copy of the License at
#
# 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.
import six
from oslo_config import cfg
from oslo_log import log
from oslo_utils import strutils
from delfin.common import constants
from delfin import exception
from delfin.i18n import _
api_common_opts = [
cfg.IntOpt('api_max_limit',
default=1000,
help='The maximum number of items that a collection '
'resource returns in a single response'),
]
CONF = cfg.CONF
CONF.register_opts(api_common_opts)
LOG = log.getLogger(__name__)
def remove_invalid_options(context, search_options, allowed_search_options):
"""Remove search options that are not valid for API/context."""
unknown_options = [opt for opt in search_options
if opt not in allowed_search_options]
bad_options = ", ".join(unknown_options)
LOG.debug("Removing options '%(bad_options)s' from query",
{"bad_options": bad_options})
for opt in unknown_options:
del search_options[opt]
def validate_integer(value, name, min_value=None, max_value=None):
"""Make sure that value is a valid integer, potentially within range.
:param value: the value of the integer
:param name: the name of the integer
:param min_value: the min_value of the integer
:param max_value: the max_value of the integer
:returns: integer
"""
try:
value = strutils.validate_integer(value, name, min_value, max_value)
return value
except ValueError as e:
raise exception.InvalidInput(six.text_type(e))
def get_pagination_params(params, max_limit=None):
"""Return marker, limit, offset tuple from request.
:param params: `wsgi.Request`'s GET dictionary, possibly containing
'marker', 'limit', and 'offset' variables. 'marker' is the
id of the last element the client has seen, 'limit' is the
maximum number of items to return and 'offset' is the number
of items to skip from the marker or from the first element.
If 'limit' is not specified, or > max_limit, we default to
max_limit. Negative values for either offset or limit will
cause delfin.InvalidInput() exceptions to be raised. If no
offset is present we'll default to 0 and if no marker is
present we'll default to None.
:param max_limit: Max value 'limit' return value can take
:returns: Tuple (marker, limit, offset)
"""
max_limit = max_limit or CONF.api_max_limit
limit = _get_limit_param(params, max_limit)
marker = _get_marker_param(params)
offset = _get_offset_param(params)
return marker, limit, offset
def _get_limit_param(params, max_limit=None):
"""Extract integer limit from request's dictionary or fail.
Defaults to max_limit if not present and returns max_limit if present
'limit' is greater than max_limit.
"""
max_limit = max_limit or CONF.osapi_max_limit
try:
limit = int(params.pop('limit', max_limit))
except ValueError:
msg = _('limit param must be an integer')
raise exception.InvalidInput(msg)
if limit < 0:
msg = _('limit param must be positive')
raise exception.InvalidInput(msg)
limit = min(limit, max_limit)
return limit
def _get_marker_param(params):
"""Extract marker id from request's dictionary (defaults to None)."""
return params.pop('marker', None)
def _get_offset_param(params):
"""Extract offset id from request's dictionary (defaults to 0) or fail."""
offset = params.pop('offset', 0)
return validate_integer(offset,
'offset',
0,
constants.DB_MAX_INT)
def get_sort_params(params, default_key='created_at', default_dir='desc'):
"""Retrieves sort keys/directions parameters.
Processes the parameters to create a list of sort keys and sort directions
that correspond to either the 'sort' parameter or the 'sort_key' and
'sort_dir' parameter values. The value of the 'sort' parameter is a comma-
separated list of sort keys, each key is optionally appended with
':<sort_direction>'.
The sort parameters are removed from the request parameters by this
function.
:param params: query parameters in the request
:param default_key: default sort key value, added to the list if no
sort keys are supplied
:param default_dir: default sort dir value, added to the list if the
corresponding key does not have a direction
specified
:returns: list of sort keys, list of sort dirs
"""
sort_keys = []
sort_dirs = []
if 'sort' in params:
for sort in params.pop('sort').strip().split(','):
sort_key, _sep, sort_dir = sort.partition(':')
if not sort_dir:
sort_dir = default_dir
sort_keys.append(sort_key.strip())
sort_dirs.append(sort_dir.strip())
else:
sort_key = params.pop('sort_key', default_key)
sort_dir = params.pop('sort_dir', default_dir)
sort_keys.append(sort_key.strip())
sort_dirs.append(sort_dir.strip())
return sort_keys, sort_dirs
================================================
FILE: delfin/api/common/__init__.py
================================================
# Copyright 2020 The SODA Authors.
# Copyright (c) 2013 OpenStack, LLC.
#
# All Rights Reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License"); you may
# not use this file except in compliance with the License. You may obtain
# a copy of the License at
#
# 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.
"""
WSGI middleware for OpenStack API controllers.
"""
from oslo_log import log
from oslo_service import wsgi as base_wsgi
import routes
from delfin.api.common import wsgi
from delfin.i18n import _
LOG = log.getLogger(__name__)
class APIMapper(routes.Mapper):
def routematch(self, url=None, environ=None):
if url == "":
result = self._match("", environ)
return result[0], result[1]
return routes.Mapper.routematch(self, url, environ)
def connect(self, *args, **kwargs):
# NOTE(inhye): Default the format part of a route to only accept json
# and xml so it doesn't eat all characters after a '.'
# in the url.
kwargs.setdefault('requirements', {})
if not kwargs['requirements'].get('format'):
kwargs['requirements']['format'] = 'json|xml'
return routes.Mapper.connect(self, *args, **kwargs)
class ProjectMapper(APIMapper):
def resource(self, member_name, collection_name, **kwargs):
if 'parent_resource' not in kwargs:
kwargs['path_prefix'] = '/'
else:
parent_resource = kwargs['parent_resource']
p_collection = parent_resource['collection_name']
p_member = parent_resource['member_name']
kwargs['path_prefix'] = '/%s/:%s_id' % (p_collection, p_member)
routes.Mapper.resource(self,
member_name,
collection_name,
**kwargs)
class APIRouter(base_wsgi.Router):
"""Routes requests on the API to the appropriate controller and method."""
ExtensionManager = None # override in subclasses
@classmethod
def factory(cls, global_config, **local_config):
"""Simple paste factory, :class:`delfin.wsgi.Router` doesn't have."""
return cls()
def __init__(self, ext_mgr=None):
if ext_mgr is None:
if self.ExtensionManager:
# pylint: disable=not-callable
ext_mgr = self.ExtensionManager()
else:
raise Exception(_("Must specify an ExtensionManager class"))
mapper = ProjectMapper()
self.resources = {}
self._setup_routes(mapper)
self._setup_ext_routes(mapper, ext_mgr)
self._setup_extensions(ext_mgr)
super(APIRouter, self).__init__(mapper)
def _setup_ext_routes(self, mapper, ext_mgr):
for resource in ext_mgr.get_resources():
LOG.debug('Extended resource: %s',
resource.collection)
wsgi_resource = wsgi.Resource(resource.controller)
self.resources[resource.collection] = wsgi_resource
kargs = dict(
controller=wsgi_resource,
collection=resource.collection_actions,
member=resource.member_actions)
if resource.parent:
kargs['parent_resource'] = resource.parent
mapper.resource(resource.collection, resource.collection, **kargs)
if resource.custom_routes_fn:
resource.custom_routes_fn(mapper, wsgi_resource)
def _setup_extensions(self, ext_mgr):
for extension in ext_mgr.get_controller_extensions():
ext_name = extension.extension.name
collection = extension.collection
controller = extension.controller
if collection not in self.resources:
LOG.warning('Extension %(ext_name)s: Cannot extend '
'resource %(collection)s: No such resource',
{'ext_name': ext_name, 'collection': collection})
continue
LOG.debug('Extension %(ext_name)s extending resource: '
'%(collection)s',
{'ext_name': ext_name, 'collection': collection})
resource = self.resources[collection]
resource.register_actions(controller)
resource.register_extensions(controller)
def _setup_routes(self, mapper):
raise NotImplementedError
================================================
FILE: delfin/api/common/wsgi.py
================================================
# Copyright 2020 The SODA Authors.
# Copyright 2011 OpenStack LLC.
# All Rights Reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License"); you may
# not use this file except in compliance with the License. You may obtain
# a copy of the License at
#
# 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.
import inspect
from oslo_log import log
from oslo_serialization import jsonutils
import six
import webob
import webob.exc
from delfin import exception
from delfin.i18n import _
from delfin.wsgi import common as wsgi
LOG = log.getLogger(__name__)
SUPPORTED_CONTENT_TYPES = (
'application/json',
)
_MEDIA_TYPE_MAP = {
'application/json': 'json',
}
class Request(webob.Request):
"""Add some OpenStack API-specific logic to the base webob.Request."""
def __init__(self, *args, **kwargs):
super(Request, self).__init__(*args, **kwargs)
self._resource_cache = {}
def cache_resource(self, resource_to_cache, id_attribute='id', name=None):
"""Cache the given resource.
Allow API methods to cache objects, such as results from a DB query,
to be used by API extensions within the same API request.
The resource_to_cache can be a list or an individual resource,
but ultimately resources are cached individually using the given
id_attribute.
Different resources types might need to be cached during the same
request, they can be cached using the name parameter. For example:
Controller 1:
request.cache_resource(db_volumes, 'volumes')
request.cache_resource(db_volume_types, 'types')
Controller 2:
db_volumes = request.cached_resource('volumes')
db_type_1 = request.cached_resource_by_id('1', 'types')
If no name is given, a default name will be used for the resource.
An instance of this class only lives for the lifetime of a
single API request, so there's no need to implement full
cache management.
"""
if not isinstance(resource_to_cache, list):
resource_to_cache = [resource_to_cache]
if not name:
name = self.path
cached_resources = self._resource_cache.setdefault(name, {})
for resource in resource_to_cache:
cached_resources[resource[id_attribute]] = resource
def cached_resource(self, name=None):
"""Get the cached resources cached under the given resource name.
Allow an API extension to get previously stored objects within
the same API request.
Note that the object data will be slightly stale.
:returns: a dict of id_attribute to the resource from the cached
resources, an empty map if an empty collection was cached,
or None if nothing has been cached yet under this name
"""
if not name:
name = self.path
if name not in self._resource_cache:
# Nothing has been cached for this key yet
return None
return self._resource_cache[name]
def cached_resource_by_id(self, resource_id, name=None):
"""Get a resource by ID cached under the given resource name.
Allow an API extension to get a previously stored object
within the same API request. This is basically a convenience method
to lookup by ID on the dictionary of all cached resources.
Note that the object data will be slightly stale.
:returns: the cached resource or None if the item is not in the cache
"""
resources = self.cached_resource(name)
if not resources:
# Nothing has been cached yet for this key yet
return None
return resources.get(resource_id)
def cache_db_items(self, key, items, item_key='id'):
"""Cache db items.
Allow API methods to store objects from a DB query to be
used by API extensions within the same API request.
An instance of this class only lives for the lifetime of a
single API request, so there's no need to implement full
cache management.
"""
self.cache_resource(items, item_key, key)
def get_db_items(self, key):
"""Get db item by key.
Allow an API extension to get previously stored objects within
the same API request.
Note that the object data will be slightly stale.
"""
return self.cached_resource(key)
def get_db_item(self, key, item_key):
"""Get db item by key and item key.
Allow an API extension to get a previously stored object
within the same API request.
Note that the object data will be slightly stale.
"""
return self.get_db_items(key).get(item_key)
def cache_db_share_types(self, share_types):
self.cache_db_items('share_types', share_types, 'id')
def cache_db_share_type(self, share_type):
self.cache_db_items('share_types', [share_type], 'id')
def get_db_share_types(self):
return self.get_db_items('share_types')
def get_db_share_type(self, share_type_id):
return self.get_db_item('share_types', share_type_id)
def best_match_content_type(self):
"""Determine the requested response content-type."""
if 'delfin.best_content_type' not in self.environ:
# Calculate the best MIME type
content_type = None
# Check URL path suffix
parts = self.path.rsplit('.', 1)
if len(parts) > 1:
possible_type = 'application/' + parts[1]
if possible_type in SUPPORTED_CONTENT_TYPES:
content_type = possible_type
if not content_type:
content_type = self.accept.best_match(SUPPORTED_CONTENT_TYPES)
self.environ['delfin.best_content_type'] = (content_type or
'application/json')
return self.environ['delfin.best_content_type']
def get_content_type(self):
"""Determine content type of the request body.
Does not do any body introspection, only checks header.
"""
if "Content-Type" not in self.headers:
return None
allowed_types = SUPPORTED_CONTENT_TYPES
content_type = self.content_type
if content_type not in allowed_types:
raise exception.InvalidContentType(content_type)
return content_type
class ActionDispatcher(object):
"""Maps method name to local methods through action name."""
def dispatch(self, *args, **kwargs):
"""Find and call local method."""
action = kwargs.pop('action', 'default')
action_method = getattr(self, six.text_type(action), self.default)
return action_method(*args, **kwargs)
def default(self, data):
raise NotImplementedError()
class TextDeserializer(ActionDispatcher):
"""Default request body deserialization."""
def deserialize(self, datastring, action='default'):
return self.dispatch(datastring, action=action)
def default(self, datastring):
return {}
class JSONDeserializer(TextDeserializer):
def _from_json(self, datastring):
try:
return jsonutils.loads(datastring)
except ValueError:
msg = _("cannot understand JSON")
raise exception.MalformedRequestBody(msg)
def default(self, datastring):
return {'body': self._from_json(datastring)}
class DictSerializer(ActionDispatcher):
"""Default request body serialization."""
def serialize(self, data, action='default'):
return self.dispatch(data, action=action)
def default(self, data):
return ""
class JSONDictSerializer(DictSerializer):
"""Default JSON request body serialization."""
def default(self, data):
return six.b(jsonutils.dumps(data))
def serializers(**serializers):
"""Attaches serializers to a method.
This decorator associates a dictionary of serializers with a
method. Note that the function attributes are directly
manipulated; the method is not wrapped.
"""
def decorator(func):
if not hasattr(func, 'wsgi_serializers'):
func.wsgi_serializers = {}
func.wsgi_serializers.update(serializers)
return func
return decorator
def deserializers(**deserializers):
"""Attaches deserializers to a method.
This decorator associates a dictionary of deserializers with a
method. Note that the function attributes are directly
manipulated; the method is not wrapped.
"""
def decorator(func):
if not hasattr(func, 'wsgi_deserializers'):
func.wsgi_deserializers = {}
func.wsgi_deserializers.update(deserializers)
return func
return decorator
def response(code):
"""Attaches response code to a method.
This decorator associates a response code with a method. Note
that the function attributes are directly manipulated; the method
is not wrapped.
"""
def decorator(func):
func.wsgi_code = code
return func
return decorator
class ResponseObject(object):
"""Bundles a response object with appropriate serializers.
Object that app methods may return in order to bind alternate
serializers with a response object to be serialized. Its use is
optional.
"""
def __init__(self, obj, code=None, headers=None, **serializers):
"""Binds serializers with an object.
Takes keyword arguments akin to the @serializer() decorator
for specifying serializers. Serializers specified will be
given preference over default serializers or method-specific
serializers on return.
"""
self.obj = obj
self.serializers = serializers
self._default_code = 200
self._code = code
self._headers = headers or {}
self.serializer = None
self.media_type = None
def __getitem__(self, key):
"""Retrieves a header with the given name."""
return self._headers[key.lower()]
def __setitem__(self, key, value):
"""Sets a header with the given name to the given value."""
self._headers[key.lower()] = value
def __delitem__(self, key):
"""Deletes the header with the given name."""
del self._headers[key.lower()]
def _bind_method_serializers(self, meth_serializers):
"""Binds method serializers with the response object.
Binds the method serializers with the response object.
Serializers specified to the constructor will take precedence
over serializers specified to this method.
:param meth_serializers: A dictionary with keys mapping to
response types and values containing
serializer objects.
"""
# We can't use update because that would be the wrong
# precedence
for mtype, serializer in meth_serializers.items():
self.serializers.setdefault(mtype, serializer)
def get_serializer(self, content_type, default_serializers=None):
"""Returns the serializer for the wrapped object.
Returns the serializer for the wrapped object subject to the
indicated content type. If no serializer matching the content
type is attached, an appropriate serializer drawn from the
default serializers will be used. If no appropriate
serializer is available, raises InvalidContentType.
"""
default_serializers = default_serializers or {}
try:
mtype = _MEDIA_TYPE_MAP.get(content_type, content_type)
if mtype in self.serializers:
return mtype, self.serializers[mtype]
else:
return mtype, default_serializers[mtype]
except (KeyError, TypeError):
raise exception.InvalidContentType(content_type)
def preserialize(self, content_type, default_serializers=None):
"""Prepares the serializer that will be used to serialize.
Determines the serializer that will be used and prepares an
instance of it for later call. This allows the serializer to
be accessed by extensions for, e.g., template extension.
"""
mtype, serializer = self.get_serializer(content_type,
default_serializers)
self.media_type = mtype
self.serializer = serializer()
def attach(self, **kwargs):
"""Attach slave templates to serializers."""
if self.media_type in kwargs:
self.serializer.attach(kwargs[self.media_type])
def serialize(self, request, content_type, default_serializers=None):
"""Serializes the wrapped object.
Utility method for serializing the wrapped object. Returns a
webob.Response object.
"""
if self.serializer:
serializer = self.serializer
else:
_mtype, _serializer = self.get_serializer(content_type,
default_serializers)
serializer = _serializer()
response = webob.Response()
response.status_int = self.code
for hdr, value in self._headers.items():
response.headers[hdr] = six.text_type(value)
response.headers['Content-Type'] = six.text_type(content_type)
if self.obj is not None:
response.body = serializer.serialize(self.obj)
return response
@property
def code(self):
"""Retrieve the response status."""
return self._code or self._default_code
@property
def headers(self):
"""Retrieve the headers."""
return self._headers.copy()
def action_peek_json(body):
"""Determine action to invoke."""
try:
decoded = jsonutils.loads(body)
except ValueError:
msg = _("cannot understand JSON")
raise exception.MalformedRequestBody(msg)
# Make sure there's exactly one key...
if len(decoded) != 1:
msg = _("too many body keys")
raise exception.MalformedRequestBody(msg)
# Return the action and the decoded body...
return list(decoded.keys())[0]
class ResourceExceptionHandler(object):
"""Context manager to handle Resource exceptions.
Used when processing exceptions generated by API implementation
methods (or their extensions). Converts most exceptions to Fault
exceptions, with the appropriate logging.
"""
def __enter__(self):
return None
def __exit__(self, ex_type, ex_value, ex_traceback):
if not ex_value:
return True
if isinstance(ex_value, exception.DelfinException):
raise Fault(exception.ConvertedException(ex_value))
elif isinstance(ex_value, TypeError):
exc_info = (ex_type, ex_value, ex_traceback)
LOG.error('Exception handling resource: %s',
ex_value, exc_info=exc_info)
exc = exception.BadRequest()
raise Fault(exception.ConvertedException(exc))
elif isinstance(ex_value, Fault):
LOG.info("Fault thrown: %s", ex_value)
raise ex_value
elif isinstance(ex_value, webob.exc.HTTPException):
LOG.info("HTTP exception thrown: %s", ex_value)
raise Fault(ex_value)
# We didn't handle the exception
return False
class Resource(wsgi.Application):
"""WSGI app that handles (de)serialization and controller dispatch.
WSGI app that reads routing information supplied by RoutesMiddleware
and calls the requested action method upon its controller. All
controller action methods must accept a 'req' argument, which is the
incoming wsgi.Request. If the operation is a PUT or POST, the controller
method must also accept a 'body' argument (the deserialized request body).
They may raise a webob.exc exception or return a dict, which will be
serialized by requested content type.
Exceptions derived from webob.exc.HTTPException will be automatically
wrapped in Fault() to provide API friendly error responses.
"""
support_api_request_version = True
def __init__(self, controller, action_peek=None, **deserializers):
"""init method of Resource.
:param controller: object that implement methods created by routes lib
:param action_peek: dictionary of routines for peeking into an action
request body to determine the desired action
"""
self.controller = controller
default_deserializers = dict(json=JSONDeserializer)
default_deserializers.update(deserializers)
self.default_deserializers = default_deserializers
self.default_serializers = dict(json=JSONDictSerializer)
self.action_peek = dict(json=action_peek_json)
self.action_peek.update(action_peek or {})
# Copy over the actions dictionary
self.wsgi_actions = {}
if controller:
self.register_actions(controller)
# Save a mapping of extensions
self.wsgi_extensions = {}
self.wsgi_action_extensions = {}
def register_actions(self, controller):
"""Registers controller actions with this resource."""
actions = getattr(controller, 'wsgi_actions', {})
for key, method_name in actions.items():
self.wsgi_actions[key] = getattr(controller, method_name)
def register_extensions(self, controller):
"""Registers controller extensions with this resource."""
extensions = getattr(controller, 'wsgi_extensions', [])
for method_name, action_name in extensions:
# Look up the extending method
extension = getattr(controller, method_name)
if action_name:
# Extending an action...
if action_name not in self.wsgi_action_extensions:
self.wsgi_action_extensions[action_name] = []
self.wsgi_action_extensions[action_name].append(extension)
else:
# Extending a regular method
if method_name not in self.wsgi_extensions:
self.wsgi_extensions[method_name] = []
self.wsgi_extensions[method_name].append(extension)
def get_action_args(self, request_environment):
"""Parse dictionary created by routes library."""
# NOTE(Vek): Check for get_action_args() override in the
# controller
if hasattr(self.controller, 'get_action_args'):
return self.controller.get_action_args(request_environment)
try:
args = request_environment['wsgiorg.routing_args'][1].copy()
except (KeyError, IndexError, AttributeError):
return {}
try:
del args['controller']
except KeyError:
pass
try:
del args['format']
except KeyError:
pass
return args
def get_body(self, request):
try:
content_type = request.get_content_type()
except exception.InvalidContentType:
LOG.debug("Unrecognized Content-Type provided in request")
return None, ''
if not content_type:
LOG.debug("No Content-Type provided in request")
return None, ''
if len(request.body) <= 0:
LOG.debug("Empty body provided in request")
return None, ''
return content_type, request.body
def deserialize(self, meth, content_type, body):
meth_deserializers = getattr(meth, 'wsgi_deserializers', {})
try:
mtype = _MEDIA_TYPE_MAP.get(content_type, content_type)
if mtype in meth_deserializers:
deserializer = meth_deserializers[mtype]
else:
deserializer = self.default_deserializers[mtype]
except (KeyError, TypeError):
raise exception.InvalidContentType(content_type)
return deserializer().deserialize(body)
def pre_process_extensions(self, extensions, request, action_args):
# List of callables for post-processing extensions
post = []
for ext in extensions:
if inspect.isgeneratorfunction(ext):
response = None
# If it's a generator function, the part before the
# yield is the preprocessing stage
try:
with ResourceExceptionHandler():
gen = ext(req=request, **action_args)
response = next(gen)
except Fault as ex:
response = ex
# We had a response...
if response:
return response, []
# No response, queue up generator for post-processing
post.append(gen)
else:
# Regular functions only perform post-processing
post.append(ext)
# Run post-processing in the reverse order
return None, reversed(post)
def post_process_extensions(self, extensions, resp_obj, request,
action_args):
for ext in extensions:
response = None
if inspect.isgenerator(ext):
# If it's a generator, run the second half of
# processing
try:
with ResourceExceptionHandler():
response = ext.send(resp_obj)
except StopIteration:
# Normal exit of generator
continue
except Fault as ex:
response = ex
else:
# Regular functions get post-processing...
try:
with ResourceExceptionHandler():
response = ext(req=request, resp_obj=resp_obj,
**action_args)
except Fault as ex:
response = ex
# We had a response...
if response:
return response
return None
@webob.dec.wsgify(RequestClass=Request)
def __call__(self, request):
"""WSGI method that controls (de)serialization and method dispatch."""
LOG.info("%(method)s %(url)s", {"method": request.method,
"url": request.url})
# Identify the action, its arguments, and the requested
# content type
action_args = self.get_action_args(request.environ)
action = action_args.pop('action', None)
content_type, body = self.get_body(request)
accept = request.best_match_content_type()
# NOTE(Vek): Splitting the function up this way allows for
# auditing by external tools that wrap the existing
# function. If we try to audit __call__(), we can
# run into troubles due to the @webob.dec.wsgify()
# decorator.
return self._process_stack(request, action, action_args,
content_type, body, accept)
def _process_stack(self, request, action, action_args,
content_type, body, accept):
"""Implement the processing stack."""
# Get the implementing method
try:
meth, extensions = self.get_method(request, action,
content_type, body)
except (AttributeError, TypeError):
ex = exception.ConvertedException(exception.NotFound())
return Fault(ex)
except KeyError as ex:
ex = exception.ConvertedException(
exception.NoSuchAction(ex.args[0]))
return Fault(ex)
except exception.MalformedRequestBody as ex:
ex = exception.ConvertedException(ex)
return Fault(ex)
# Now, deserialize the request body...
try:
if content_type:
contents = self.deserialize(meth, content_type, body)
else:
contents = {}
except exception.InvalidContentType as ex:
ex = exception.ConvertedException(ex)
return Fault(ex)
except exception.MalformedRequestBody as ex:
ex = exception.ConvertedException(ex)
return Fault(ex)
# Update the action args
action_args.update(contents)
project_id = action_args.pop("project_id", None)
context = request.environ.get('delfin.context')
if (context and project_id and (project_id != context.project_id)):
ex = exception.ConvertedException(exception.MalformedRequestUrl())
return Fault(ex)
# Run pre-processing extensions
response, post = self.pre_process_extensions(extensions,
request, action_args)
if not response:
try:
with ResourceExceptionHandler():
action_result = self.dispatch(meth, request, action_args)
except Fault as ex:
response = ex
if not response:
# No exceptions; convert action_result into a
# ResponseObject
resp_obj = None
if type(action_result) is dict or action_result is None:
resp_obj = ResponseObject(action_result)
elif isinstance(action_result, ResponseObject):
resp_obj = action_result
else:
response = action_result
# Run post-processing extensions
if resp_obj:
_set_request_id_header(request, resp_obj)
# Do a preserialize to set up the response object
serializers = getattr(meth, 'wsgi_serializers', {})
resp_obj._bind_method_serializers(serializers)
if hasattr(meth, 'wsgi_code'):
resp_obj._default_code = meth.wsgi_code
resp_obj.preserialize(accept, self.default_serializers)
# Process post-processing extensions
response = self.post_process_extensions(post, resp_obj,
request, action_args)
if resp_obj and not response:
response = resp_obj.serialize(request, accept,
self.default_serializers)
try:
msg_dict = dict(url=request.url, status=response.status_int)
msg = _("%(url)s returned with HTTP %(status)s") % msg_dict
except AttributeError as e:
msg_dict = dict(url=request.url, e=e)
msg = _("%(url)s returned a fault: %(e)s") % msg_dict
LOG.info(msg)
return response
def get_method(self, request, action, content_type, body):
"""Look up the action-specific method and its extensions."""
# Look up the method
try:
if not self.controller:
meth = getattr(self, action)
else:
meth = getattr(self.controller, action)
except AttributeError:
if (not self.wsgi_actions or
action not in ['action', 'create', 'delete']):
# Propagate the error
raise
else:
return meth, self.wsgi_extensions.get(action, [])
if action == 'action':
# OK, it's an action; figure out which action...
mtype = _MEDIA_TYPE_MAP.get(content_type)
action_name = self.action_peek[mtype](body)
LOG.debug("Action body: %s", body)
else:
action_name = action
# Look up the action method
return (self.wsgi_actions[action_name],
self.wsgi_action_extensions.get(action_name, []))
def dispatch(self, method, request, action_args):
"""Dispatch a call to the action-specific method."""
return method(req=request, **action_args)
def action(name):
"""Mark a function as an action.
The given name will be taken as the action key in the body.
This is also overloaded to allow extensions to provide
non-extending definitions of create and delete operations.
"""
def decorator(func):
func.wsgi_action = name
return func
return decorator
def extends(*args, **kwargs):
"""Indicate a function extends an operation.
Can be used as either::
@extends
def index(...):
pass
or as::
@extends(action='resize')
def _action_resize(...):
pass
"""
def decorator(func):
# Store enough information to find what we're extending
func.wsgi_extends = (func.__name__, kwargs.get('action'))
return func
# If we have positional arguments, call the decorator
if args:
return decorator(*args)
# OK, return the decorator instead
return decorator
class ControllerMetaclass(type):
"""Controller metaclass.
This metaclass automates the task of assembling a dictionary
mapping action keys to method names.
"""
def __new__(mcs, name, bases, cls_dict):
"""Adds the wsgi_actions dictionary to the class."""
# Find all actions
actions = {}
extensions = []
# start with wsgi actions from base classes
for base in bases:
actions.update(getattr(base, 'wsgi_actions', {}))
for key, value in cls_dict.items():
if not callable(value):
continue
if getattr(value, 'wsgi_action', None):
actions[value.wsgi_action] = key
elif getattr(value, 'wsgi_extends', None):
extensions.append(value.wsgi_extends)
# Add the actions and extensions to the class dict
cls_dict['wsgi_actions'] = actions
cls_dict['wsgi_extensions'] = extensions
return super(ControllerMetaclass, mcs).__new__(mcs, name, bases,
cls_dict)
@six.add_metaclass(ControllerMetaclass)
class Controller(object):
"""Default controller."""
_view_builder_class = None
def __init__(self, view_builder=None):
"""Initialize controller with a view builder instance."""
if view_builder:
self._view_builder = view_builder
elif self._view_builder_class:
# pylint: disable=not-callable
self._view_builder = self._view_builder_class()
else:
self._view_builder = None
@staticmethod
def is_valid_body(body, entity_name):
if not (body and entity_name in body):
return False
def is_dict(d):
try:
d.get(None)
return True
except AttributeError:
return False
if not is_dict(body[entity_name]):
return False
return True
class Fault(webob.exc.HTTPException):
"""Wrap webob.exc.HTTPException to provide API friendly response."""
def __init__(self, exception):
"""Create a Fault for the given webob.exc.exception."""
self.wrapped_exc = exception
self.status_int = exception.status_int
@webob.dec.wsgify(RequestClass=Request)
def __call__(self, req):
"""Generate a WSGI response based on the exception passed to ctor."""
# Replace the body with fault details.
status_code = self.wrapped_exc.status_int
fault_data = {
'error_code': self.wrapped_exc.error_code,
'error_msg': self.wrapped_exc.explanation,
'error_args': self.wrapped_exc.error_args}
LOG.info("Exception response code: %(code)s, reason: %(reason)s",
{'code': status_code, 'reason': fault_data})
if status_code == 413:
retry = self.wrapped_exc.headers['Retry-After']
fault_data['retryAfter'] = '%s' % retry
content_type = req.best_match_content_type()
serializer = {
'application/json': JSONDictSerializer(),
}[content_type]
self.wrapped_exc.body = serializer.serialize(fault_data)
self.wrapped_exc.content_type = content_type
_set_request_id_header(req, self.wrapped_exc.headers)
return self.wrapped_exc
def __str__(self):
return self.wrapped_exc.__str__()
def _set_request_id_header(req, headers):
context = req.environ.get('delfin.context')
if context:
headers['x-compute-request-id'] = context.request_id
================================================
FILE: delfin/api/contrib/__init__.py
================================================
# Copyright 2011 Justin Santa Barbara
# All Rights Reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License"); you may
# not use this file except in compliance with the License. You may obtain
# a copy of the License at
#
# 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.
"""Contrib contains extensions that are shipped with delfin.
It can't be called 'extensions' because that causes namespacing problems.
"""
from oslo_config import cfg
from oslo_log import log
from delfin.api import extensions
CONF = cfg.CONF
LOG = log.getLogger(__name__)
def standard_extensions(ext_mgr):
extensions.load_standard_extensions(ext_mgr, LOG, __path__, __package__)
def select_extensions(ext_mgr):
extensions.load_standard_extensions(ext_mgr, LOG, __path__, __package__,
CONF.delfin_api_ext_list)
================================================
FILE: delfin/api/extensions.py
================================================
# Copyright 2020 The SODA Authors.
# Copyright 2011 OpenStack LLC.
# Copyright 2011 Justin Santa Barbara
# All Rights Reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License"); you may
# not use this file except in compliance with the License. You may obtain
# a copy of the License at
#
# 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.
import os
from oslo_config import cfg
from oslo_log import log
from oslo_utils import importutils
from delfin.api.common import wsgi
from delfin import exception
CONF = cfg.CONF
LOG = log.getLogger(__name__)
class ExtensionDescriptor(object):
"""Base class that defines the contract for extensions.
Note that you don't have to derive from this class to have a valid
extension; it is purely a convenience.
"""
# The name of the extension, e.g., 'Fox In Socks'
name = None
# The alias for the extension, e.g., 'FOXNSOX'
alias = None
# Description comes from the docstring for the class
# The timestamp when the extension was last updated, e.g.,
# '2011-01-22T13:25:27-06:00'
updated = None
def __init__(self, ext_mgr):
"""Register extension with the extension manager."""
ext_mgr.register(self)
self.ext_mgr = ext_mgr
def get_resources(self):
"""List of extensions.ResourceExtension extension objects.
Resources define new nouns, and are accessible through URLs.
"""
resources = []
return resources
def get_controller_extensions(self):
"""List of extensions.ControllerExtension extension objects.
Controller extensions are used to extend existing controllers.
"""
controller_exts = []
return controller_exts
class ExtensionsResource(wsgi.Resource):
def __init__(self, extension_manager):
self.extension_manager = extension_manager
super(ExtensionsResource, self).__init__(None)
def _translate(self, ext):
ext_data = {}
ext_data['name'] = ext.name
ext_data['alias'] = ext.alias
ext_data['description'] = ext.__doc__
ext_data['updated'] = ext.updated
ext_data['links'] = [] # TODO(dprince): implement extension links
return ext_data
def index(self, req):
extensions = []
for _alias, ext in self.extension_manager.extensions.items():
extensions.append(self._translate(ext))
return dict(extensions=extensions)
def show(self, req, id):
try:
# NOTE(dprince): the extensions alias is used as the 'id' for show
ext = self.extension_manager.extensions[id]
except KeyError:
raise exception.NotFound()
return dict(extension=self._translate(ext))
def delete(self, req, id):
raise exception.NotFound()
def create(self, req):
raise exception.NotFound()
class ExtensionManager(object):
"""Load extensions from the configured extension path.
See delfin/tests/api/extensions/foxinsocks/extension.py for an
example extension implementation.
"""
def __init__(self):
LOG.info('Initializing extension manager.')
self.cls_list = CONF.delfin_api_extension
self.extensions = {}
self._load_extensions()
def register(self, ext):
# Do nothing if the extension doesn't check out
if not self._check_extension(ext):
return
alias = ext.alias
LOG.info('Loaded extension: %s', alias)
if alias in self.extensions:
raise exception.DuplicateExtension(alias)
self.extensions[alias] = ext
def get_resources(self):
"""Returns a list of ResourceExtension objects."""
resources = []
resources.append(ResourceExtension('extensions',
ExtensionsResource(self)))
for ext in self.extensions.values():
try:
resources.extend(ext.get_resources())
except AttributeError:
# NOTE(dprince): Extension aren't required to have resource
# extensions
pass
return resources
def get_controller_extensions(self):
"""Returns a list of ControllerExtension objects."""
controller_exts = []
for ext in self.extensions.values():
try:
get_ext_method = ext.get_controller_extensions
except AttributeError:
# NOTE(Vek): Extensions aren't required to have
# controller extensions
continue
controller_exts.extend(get_ext_method())
return controller_exts
def _check_extension(self, extension):
"""Checks for required methods in extension objects."""
try:
LOG.debug('Ext name: %s', extension.name)
LOG.debug('Ext alias: %s', extension.alias)
LOG.debug('Ext description: %s',
' '.join(extension.__doc__.strip().split()))
LOG.debug('Ext updated: %s', extension.updated)
except AttributeError:
LOG.exception("Exception loading extension.")
return False
return True
def load_extension(self, ext_factory):
"""Execute an extension factory.
Loads an extension. The 'ext_factory' is the name of a
callable that will be imported and called with one
argument--the extension manager. The factory callable is
expected to call the register() method at least once.
"""
LOG.debug("Loading extension %s", ext_factory)
# Load the factory
factory = importutils.import_class(ext_factory)
# Call it
LOG.debug("Calling extension factory %s", ext_factory)
factory(self)
def _load_extensions(self):
"""Load extensions specified on the command line."""
extensions = list(self.cls_list)
# NOTE(thingee): Backwards compat for the old extension loader path.
# We can drop this post-grizzly in the H release.
old_contrib_path = ('delfin.api.common.share.contrib.'
'standard_extensions')
new_contrib_path = 'delfin.api.contrib.standard_extensions'
if old_contrib_path in extensions:
LOG.warning('delfin_api_extension is set to deprecated path: '
'%s.',
old_contrib_path)
LOG.warning('Please set your flag or delfin.conf settings for '
'delfin_api_extension to: %s.', new_contrib_path)
extensions = [e.replace(old_contrib_path, new_contrib_path)
for e in extensions]
for ext_factory in extensions:
try:
self.load_extension(ext_factory)
except Exception as exc:
LOG.warning('Failed to load extension %(ext_factory)s: '
'%(exc)s.',
{"ext_factory": ext_factory, "exc": exc})
class ControllerExtension(object):
"""Extend core controllers of delfin OpenStack API.
Provide a way to extend existing delfin OpenStack API core
controllers.
"""
def __init__(self, extension, collection, controller):
self.extension = extension
self.collection = collection
self.controller = controller
class ResourceExtension(object):
"""Add top level resources to the OpenStack API in delfin."""
def __init__(self, collection, controller, parent=None,
collection_actions=None, member_actions=None,
custom_routes_fn=None):
if not collection_actions:
collection_actions = {}
if not member_actions:
member_actions = {}
self.collection = collection
self.controller = controller
self.parent = parent
self.collection_actions = collection_actions
self.member_actions = member_actions
self.custom_routes_fn = custom_routes_fn
def load_standard_extensions(ext_mgr, logger, path, package, ext_list=None):
"""Registers all standard API extensions."""
# Walk through all the modules in our directory...
our_dir = path[0]
for dirpath, dirnames, filenames in os.walk(our_dir):
# Compute the relative package name from the dirpath
relpath = os.path.relpath(dirpath, our_dir)
if relpath == '.':
relpkg = ''
else:
relpkg = '.%s' % '.'.join(relpath.split(os.sep))
# Now, consider each file in turn, only considering .py and .pyc files
for fname in filenames:
root, ext = os.path.splitext(fname)
# Skip __init__ and anything that's not .py and .pyc
if (ext not in ('.py', '.pyc')) or root == '__init__':
continue
# If .pyc and .py both exist, skip .pyc
if ext == '.pyc' and ((root + '.py') in filenames):
continue
# Try loading it
classname = "%s%s" % (root[0].upper(), root[1:])
classpath = ("%s%s.%s.%s" %
(package, relpkg, root, classname))
if ext_list is not None and classname not in ext_list:
logger.debug("Skipping extension: %s" % classpath)
continue
try:
ext_mgr.load_extension(classpath)
except Exception as exc:
logger.warning('Failed to load extension %(classpath)s: '
'%(exc)s.',
{"classpath": classpath, "exc": exc})
# Now, let's consider any subdirectories we may have...
subdirs = []
for dname in dirnames:
# Skip it if it does not have __init__.py
if not os.path.exists(os.path.join(dirpath, dname,
'__init__.py')):
continue
# If it has extension(), delegate...
ext_name = ("%s%s.%s.extension" %
(package, relpkg, dname))
try:
ext = importutils.import_class(ext_name)
except ImportError:
# extension() doesn't exist on it, so we'll explore
# the directory for ourselves
subdirs.append(dname)
else:
try:
ext(ext_mgr)
except Exception as exc:
logger.warning('Failed to load extension '
'%(ext_name)s: %(exc)s.',
{"ext_name": ext_name, "exc": exc})
# Update the list of directories we'll explore...
dirnames[:] = subdirs
================================================
FILE: delfin/api/middlewares.py
================================================
# Copyright 2020 The SODA Authors.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# 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.
import webob.dec
from delfin import context
from delfin.wsgi import common as wsgi
class ContextWrapper(wsgi.Middleware):
"""Add 'delfin.context' to req.environ"""
@webob.dec.wsgify(RequestClass=wsgi.Request)
def __call__(self, req):
req.environ['delfin.context'] = context.RequestContext()
return self.application
================================================
FILE: delfin/api/schemas/__init__.py
================================================
================================================
FILE: delfin/api/schemas/access_info.py
================================================
# Copyright 2020 The SODA Authors.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# 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.
from delfin.api.validation import parameter_types
update = {
'type': 'object',
'properties': {
'rest': {
'type': 'object',
'properties': {
'host': parameter_types.hostname_or_ip_address,
'port': parameter_types.tcp_udp_port,
'username': {'type': 'string', 'minLength': 1,
'maxLength': 255},
'password': {'type': 'string', 'minLength': 1,
'maxLength': 255}
},
'required': ['host', 'port', 'username', 'password'],
'additionalProperties': False
},
'ssh': {
'type': 'object',
'properties': {
'host': parameter_types.hostname_or_ip_address,
'port': parameter_types.tcp_udp_port,
'username': {'type': 'string', 'minLength': 1,
'maxLength': 255},
'password': {'type': 'string', 'minLength': 1,
'maxLength': 255},
'pub_key': {'type': 'string', 'minLength': 1,
'maxLength': 4096},
'pub_key_type': parameter_types.host_key_type
},
'required': ['host', 'port', 'username'],
'additionalProperties': False
},
'cli': {
'type': 'object',
'properties': {
'host': parameter_types.hostname_or_ip_address,
'port': parameter_types.tcp_udp_port,
'username': {'type': 'string', 'minLength': 1,
'maxLength': 255},
'password': {'type': 'string', 'minLength': 1,
'maxLength': 255}
},
'required': ['host', 'username', 'password'],
'additionalProperties': False
},
'smis': {
'type': 'object',
'properties': {
'host': parameter_types.hostname_or_ip_address,
'port': parameter_types.tcp_udp_port,
'username': {'type': 'string', 'minLength': 1,
'maxLength': 255},
'password': {'type': 'string', 'minLength': 1,
'maxLength': 255},
'namespace': {'type': 'string', 'minLength': 1,
'maxLength': 255}
},
'required': ['host', 'username', 'password'],
'additionalProperties': False
},
'extra_attributes': {
'type': 'object',
'patternProperties': {
'^[a-zA-Z0-9-_:. ]{1,255}$': {
'type': 'string', 'maxLength': 255
}
}
}
},
'anyOf': [
{'required': ['rest']},
{'required': ['ssh']},
{'required': ['cli']},
{'required': ['smis']}
],
'additionalProperties': False
}
================================================
FILE: delfin/api/schemas/alert_source.py
================================================
# Copyright 2020 The SODA Authors.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# 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.
from delfin.api.validation import parameter_types
# engineId is in range (5-32) octet which is 10-64 hex characters
# If it is odd length, 0 will be prefixed to last octet, so minimum length is 9
put = {
'type': 'object',
'properties': {
'host': parameter_types.hostname_or_ip_address,
'version': parameter_types.snmp_version,
'community_string': {'type': 'string',
'minLength': 1,
'maxLength': 32},
'username': {'type': 'string', 'minLength': 1, 'maxLength': 32},
'security_level': parameter_types.snmp_security_level,
'auth_key': {'type': 'string', 'minLength': 8, 'maxLength': 65535},
'auth_protocol': parameter_types.snmp_auth_protocol,
'privacy_protocol': parameter_types.snmp_privacy_protocol,
'privacy_key': {'type': 'string', 'minLength': 8, 'maxLength': 65535},
'engine_id': {'type': 'string', 'minLength': 9, 'maxLength': 64},
'context_name': {'type': 'string', 'minLength': 0, 'maxLength': 32},
'retry_num': {'type': 'integer'},
'expiration': {'type': 'integer'},
'port': parameter_types.tcp_udp_port
},
'required': ['host', 'version'],
'additionalProperties': False,
}
================================================
FILE: delfin/api/schemas/alerts.py
================================================
# Copyright 2020 The SODA Authors.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# 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.
# begin_time and end_time are time in milliseconds
post = {
'type': 'object',
'properties': {
'begin_time': {'type': 'integer'},
'end_time': {'type': 'integer'}
},
'additionalProperties': False,
}
================================================
FILE: delfin/api/schemas/storage_capabilities_schema.py
================================================
# Copyright 2021 The SODA Authors.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# 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.
from delfin.common.constants import ResourceType, StorageMetric, \
StoragePoolMetric, VolumeMetric, ControllerMetric, PortMetric, \
DiskMetric, FileSystemMetric
STORAGE_CAPABILITIES_SCHEMA = {
'type': 'object',
'properties': {
'is_historic': {'type': 'boolean'},
'performance_metric_retention_window': {'type': 'integer'},
'resource_metrics': {
'type': 'object',
'properties': {
ResourceType.STORAGE: {
'type': 'object',
'properties': {
StorageMetric.THROUGHPUT.name: {
'type': 'object',
'properties': {
'unit': {'type': 'string',
'enum': [StorageMetric.THROUGHPUT
.unit]
},
'description': {'type': 'string',
'minLength': 1,
'maxLength': 255}
},
},
StorageMetric.RESPONSE_TIME.name: {
'type': 'object',
'properties': {
'unit': {'type': 'string',
'enum': [StorageMetric.RESPONSE_TIME
.unit]
},
'description': {'type': 'string',
'minLength': 1,
'maxLength': 255}
},
},
StorageMetric.READ_RESPONSE_TIME.name: {
'type': 'object',
'properties': {
'unit': {'type': 'string',
'enum': [StorageMetric
.READ_RESPONSE_TIME.unit]
},
'description': {'type': 'string',
'minLength': 1,
'maxLength': 255}
},
},
StorageMetric.WRITE_RESPONSE_TIME.name: {
'type': 'object',
'properties': {
'unit': {'type': 'string',
'enum': [StorageMetric
.WRITE_RESPONSE_TIME.unit]
},
'description': {'type': 'string',
'minLength': 1,
'maxLength': 255}
},
},
StorageMetric.IOPS.name: {
'type': 'object',
'properties': {
'unit': {'type': 'string',
'enum': [StorageMetric.IOPS.unit]
},
'description': {'type': 'string',
'minLength': 1,
'maxLength': 255}
},
},
StorageMetric.READ_THROUGHPUT.name: {
'type': 'object',
'properties': {
'unit': {'type': 'string',
'enum': [StorageMetric
.READ_THROUGHPUT.unit]
},
'description': {'type': 'string',
'minLength': 1,
'maxLength': 255}
},
},
StorageMetric.WRITE_THROUGHPUT.name: {
'type': 'object',
'properties': {
'unit': {'type': 'string',
'enum': [StorageMetric
.WRITE_THROUGHPUT.unit]
},
'description': {'type': 'string',
'minLength': 1,
'maxLength': 255}
},
},
StorageMetric.READ_IOPS.name: {
'type': 'object',
'properties': {
'unit': {'type': 'string',
'enum': [StorageMetric.READ_IOPS.unit]
},
'description': {'type': 'string',
'minLength': 1,
'maxLength': 255}
},
},
StorageMetric.WRITE_IOPS.name: {
'type': 'object',
'properties': {
'unit': {'type': 'string',
'enum': [StorageMetric.WRITE_IOPS
.unit]
},
'description': {'type': 'string',
'minLength': 1,
'maxLength': 255}
},
},
},
'additionalProperties': False
},
ResourceType.STORAGE_POOL: {
'type': 'object',
'properties': {
StoragePoolMetric.THROUGHPUT.name: {
'type': 'object',
'properties': {
'unit': {'type': 'string',
'enum': [StoragePoolMetric
.THROUGHPUT.unit]
},
'description': {'type': 'string',
'minLength': 1,
'maxLength': 255}
},
},
StoragePoolMetric.RESPONSE_TIME.name: {
'type': 'object',
'properties': {
'unit': {'type': 'string',
'enum': [StoragePoolMetric
.RESPONSE_TIME.unit]
},
'description': {'type': 'string',
'minLength': 1,
'maxLength': 255}
},
},
StoragePoolMetric.IOPS.name: {
'type': 'object',
'properties': {
'unit': {'type': 'string',
'enum': [StoragePoolMetric.IOPS.unit]
},
'description': {'type': 'string',
'minLength': 1,
'maxLength': 255}
},
},
StoragePoolMetric.READ_THROUGHPUT.name: {
'type': 'object',
'properties': {
'unit': {'type': 'string',
'enum': [StoragePoolMetric
.READ_THROUGHPUT.unit]
},
'description': {'type': 'string',
'minLength': 1,
'maxLength': 255}
},
},
StoragePoolMetric.WRITE_THROUGHPUT.name: {
'type': 'object',
'properties': {
'unit': {'type': 'string',
'enum': [StoragePoolMetric
.WRITE_THROUGHPUT.unit]
},
'description': {'type': 'string',
'minLength': 1,
'maxLength': 255}
},
},
StoragePoolMetric.READ_IOPS.name: {
'type': 'object',
'properties': {
'unit': {'type': 'string',
'enum': [StoragePoolMetric.READ_IOPS
.unit]
},
'description': {'type': 'string',
'minLength': 1,
'maxLength': 255}
},
},
StoragePoolMetric.WRITE_IOPS.name: {
'type': 'object',
'properties': {
'unit': {'type': 'string',
'enum': [StoragePoolMetric.WRITE_IOPS
.unit]
},
'description': {'type': 'string',
'minLength': 1,
'maxLength': 255}
},
},
},
'additionalProperties': False
},
ResourceType.VOLUME: {
'type': 'object',
'properties': {
VolumeMetric.THROUGHPUT.name: {
'type': 'object',
'properties': {
'unit': {'type': 'string',
'enum': [VolumeMetric.THROUGHPUT.unit]
},
'description': {'type': 'string',
'minLength': 1,
'maxLength': 255}
},
},
VolumeMetric.RESPONSE_TIME.name: {
'type': 'object',
'properties': {
'unit': {'type': 'string',
'enum': [VolumeMetric.RESPONSE_TIME
.unit]
},
'description': {'type': 'string',
'minLength': 1,
'maxLength': 255}
},
},
VolumeMetric.READ_RESPONSE_TIME.name: {
'type': 'object',
'properties': {
'unit': {'type': 'string',
'enum': [VolumeMetric
.READ_RESPONSE_TIME.unit]
},
'description': {'type': 'string',
'minLength': 1,
'maxLength': 255}
},
},
VolumeMetric.WRITE_RESPONSE_TIME.name: {
'type': 'object',
'properties': {
'unit': {'type': 'string',
'enum': [VolumeMetric
.WRITE_RESPONSE_TIME.unit]
},
'description': {'type': 'string',
'minLength': 1,
'maxLength': 255}
},
},
VolumeMetric.IOPS.name: {
'type': 'object',
'properties': {
'unit': {'type': 'string',
'enum': [VolumeMetric.IOPS.unit]
},
'description': {'type': 'string',
'minLength': 1,
'maxLength': 255}
},
},
VolumeMetric.READ_THROUGHPUT.name: {
'type': 'object',
'properties': {
'unit': {'type': 'string',
'enum': [VolumeMetric.READ_THROUGHPUT
.unit]
},
'description': {'type': 'string',
'minLength': 1,
'maxLength': 255}
},
},
VolumeMetric.WRITE_THROUGHPUT.name: {
'type': 'object',
'properties': {
'unit': {'type': 'string',
'enum': [VolumeMetric
.WRITE_THROUGHPUT.unit]
},
'description': {'type': 'string',
'minLength': 1,
'maxLength': 255}
},
},
VolumeMetric.READ_IOPS.name: {
'type': 'object',
'properties': {
'unit': {'type': 'string',
'enum': [VolumeMetric.READ_IOPS.unit]
},
'description': {'type': 'string',
'minLength': 1,
'maxLength': 255}
},
},
VolumeMetric.WRITE_IOPS.name: {
'type': 'object',
'properties': {
'unit': {'type': 'string',
'enum': [VolumeMetric.WRITE_IOPS.unit]
},
'description': {'type': 'string',
'minLength': 1,
'maxLength': 255}
},
},
VolumeMetric.CACHE_HIT_RATIO.name: {
'type': 'object',
'properties': {
'unit': {'type': 'string',
'enum': [VolumeMetric.CACHE_HIT_RATIO
.unit]
},
'description': {'type': 'string',
'minLength': 1,
'maxLength': 255}
},
},
VolumeMetric.READ_CACHE_HIT_RATIO.name: {
'type': 'object',
'properties': {
'unit': {'type': 'string',
'enum': [VolumeMetric
.READ_CACHE_HIT_RATIO.unit]
},
'description': {'type': 'string',
'minLength': 1,
'maxLength': 255}
},
},
VolumeMetric.WRITE_CACHE_HIT_RATIO.name: {
'type': 'object',
'properties': {
'unit': {'type': 'string',
'enum': [VolumeMetric
.WRITE_CACHE_HIT_RATIO.unit]
},
'description': {'type': 'string',
'minLength': 1,
'maxLength': 255}
},
},
VolumeMetric.IO_SIZE.name: {
'type': 'object',
'properties': {
'unit': {'type': 'string',
'enum': [VolumeMetric.IO_SIZE.unit]
},
'description': {'type': 'string',
'minLength': 1,
'maxLength': 255}
},
},
VolumeMetric.READ_IO_SIZE.name: {
'type': 'object',
'properties': {
'unit': {'type': 'string',
'enum': [VolumeMetric.READ_IO_SIZE
.unit]
},
'description': {'type': 'string',
'minLength': 1,
'maxLength': 255}
},
},
VolumeMetric.WRITE_IO_SIZE.name: {
'type': 'object',
'properties': {
'unit': {'type': 'string',
'enum': [VolumeMetric.WRITE_IO_SIZE
.unit]
},
'description': {'type': 'string',
'minLength': 1,
'maxLength': 255}
},
},
},
'additionalProperties': False
},
ResourceType.CONTROLLER: {
'type': 'object',
'properties': {
ControllerMetric.THROUGHPUT.name: {
'type': 'object',
'properties': {
'unit': {'type': 'string',
'enum': [ControllerMetric.THROUGHPUT
.unit]
},
'description': {'type': 'string',
'minLength': 1,
'maxLength': 255}
},
},
ControllerMetric.RESPONSE_TIME.name: {
'type': 'object',
'properties': {
'unit': {'type': 'string',
'enum': [ControllerMetric
.RESPONSE_TIME.unit]
},
'description': {'type': 'string',
'minLength': 1,
'maxLength': 255}
},
},
ControllerMetric.IOPS.name: {
'type': 'object',
'properties': {
'unit': {'type': 'string',
'enum': [ControllerMetric.IOPS.unit]
},
'description': {'type': 'string',
'minLength': 1,
'maxLength': 255}
},
},
ControllerMetric.READ_THROUGHPUT.name: {
'type': 'object',
'properties': {
'unit': {'type': 'string',
'enum': [ControllerMetric
.READ_THROUGHPUT.unit]
},
'description': {'type': 'string',
'minLength': 1,
'maxLength': 255}
},
},
ControllerMetric.WRITE_THROUGHPUT.name: {
'type': 'object',
'properties': {
'unit': {'type': 'string',
'enum': [ControllerMetric
.WRITE_THROUGHPUT.unit]
},
'description': {'type': 'string',
'minLength': 1,
'maxLength': 255}
},
},
ControllerMetric.READ_IOPS.name: {
'type': 'object',
'properties': {
'unit': {'type': 'string',
'enum': [ControllerMetric.READ_IOPS
.unit]
},
'description': {'type': 'string',
'minLength': 1,
'maxLength': 255}
},
},
ControllerMetric.WRITE_IOPS.name: {
'type': 'object',
'properties': {
'unit': {'type': 'string',
'enum': [ControllerMetric.WRITE_IOPS
.unit]
},
'description': {'type': 'string',
'minLength': 1,
'maxLength': 255}
},
},
ControllerMetric.CPU_USAGE.name: {
'type': 'object',
'properties': {
'unit': {'type': 'string',
'enum': [ControllerMetric.CPU_USAGE
.unit]
},
'description': {'type': 'string',
'minLength': 1,
'maxLength': 255}
},
}
},
'additionalProperties': False
},
ResourceType.PORT: {
'type': 'object',
'properties': {
PortMetric.THROUGHPUT.name: {
'type': 'object',
'properties': {
'unit': {'type': 'string',
'enum': [PortMetric.THROUGHPUT.unit]
},
'description': {'type': 'string',
'minLength': 1,
'maxLength': 255}
},
},
PortMetric.RESPONSE_TIME.name: {
'type': 'object',
'properties': {
'unit': {'type': 'string',
'enum': [PortMetric.RESPONSE_TIME
.unit]
},
'description': {'type': 'string',
'minLength': 1,
'maxLength': 255}
},
},
PortMetric.IOPS.name: {
'type': 'object',
'properties': {
'unit': {'type': 'string',
'enum': [PortMetric.IOPS.unit]
},
'description': {'type': 'string',
'minLength': 1,
'maxLength': 255}
},
},
PortMetric.READ_THROUGHPUT.name: {
'type': 'object',
'properties': {
'unit': {'type': 'string',
'enum': [PortMetric.READ_THROUGHPUT
.unit]
},
'description': {'type': 'string',
'minLength': 1,
'maxLength': 255}
},
},
PortMetric.WRITE_THROUGHPUT.name: {
'type': 'object',
'properties': {
'unit': {'type': 'string',
'enum': [PortMetric.WRITE_THROUGHPUT
.unit]
},
'description': {'type': 'string',
'minLength': 1,
'maxLength': 255}
},
},
PortMetric.READ_IOPS.name: {
'type': 'object',
'properties': {
'unit': {'type': 'string',
'enum': [PortMetric.READ_IOPS.unit]
},
'description': {'type': 'string',
'minLength': 1,
'maxLength': 255}
},
},
PortMetric.WRITE_IOPS.name: {
'type': 'object',
'properties': {
'unit': {'type': 'string',
'enum': [PortMetric.WRITE_IOPS.unit]
},
'description': {'type': 'string',
'minLength': 1,
'maxLength': 255}
},
},
},
'additionalProperties': False
},
ResourceType.DISK: {
'type': 'object',
'properties': {
DiskMetric.THROUGHPUT.name: {
'type': 'object',
'properties': {
'unit': {'type': 'string',
'enum': [DiskMetric.THROUGHPUT.unit]
},
'description': {'type': 'string',
'minLength': 1,
'maxLength': 255}
},
},
DiskMetric.RESPONSE_TIME.name: {
'type': 'object',
'properties': {
'unit': {'type': 'string',
'enum': [DiskMetric.RESPONSE_TIME
.unit]
},
'description': {'type': 'string',
'minLength': 1,
'maxLength': 255}
},
},
DiskMetric.IOPS.name: {
'type': 'object',
'properties': {
'unit': {'type': 'string',
'enum': [DiskMetric.IOPS.unit]
},
'description': {'type': 'string',
'minLength': 1,
'maxLength': 255}
},
},
DiskMetric.READ_IOPS.name: {
'type': 'object',
'properties': {
'unit': {'type': 'string',
'enum': [DiskMetric.READ_IOPS.unit]
},
'description': {'type': 'string',
'minLength': 1,
'maxLength': 255}
},
},
DiskMetric.WRITE_IOPS.name: {
'type': 'object',
'properties': {
'unit': {'type': 'string',
'enum': [DiskMetric.WRITE_IOPS.unit]
},
'description': {'type': 'string',
'minLength': 1,
'maxLength': 255}
},
},
DiskMetric.READ_THROUGHPUT.name: {
'type': 'object',
'properties': {
'unit': {'type': 'string',
'enum': [DiskMetric.READ_THROUGHPUT
.unit]
},
'description': {'type': 'string',
'minLength': 1,
'maxLength': 255}
},
},
DiskMetric.WRITE_THROUGHPUT.name: {
'type': 'object',
'properties': {
'unit': {'type': 'string',
'enum': [DiskMetric.WRITE_THROUGHPUT
.unit]
},
'description': {'type': 'string',
'minLength': 1,
'maxLength': 255}
},
},
},
'additionalProperties': False
},
ResourceType.FILESYSTEM: {
'type': 'object',
'properties': {
FileSystemMetric.THROUGHPUT.name: {
'type': 'object',
'properties': {
'unit': {'type': 'string',
'enum': [FileSystemMetric.THROUGHPUT
.unit]
},
'description': {'type': 'string',
'minLength': 1,
'maxLength': 255}
},
},
FileSystemMetric.IOPS.name: {
'type': 'object',
'properties': {
'unit': {'type': 'string',
'enum': [FileSystemMetric.IOPS.unit]
},
'description': {'type': 'string',
'minLength': 1,
'maxLength': 255}
},
},
FileSystemMetric.READ_THROUGHPUT.name: {
'type': 'object',
'properties': {
'unit': {'type': 'string',
'enum': [FileSystemMetric
.READ_THROUGHPUT.unit]
},
'description': {'type': 'string',
'minLength': 1,
'maxLength': 255}
},
},
FileSystemMetric.WRITE_THROUGHPUT.name: {
'type': 'object',
'properties': {
'unit': {'type': 'string',
'enum': [FileSystemMetric
.WRITE_THROUGHPUT.unit]
},
'description': {'type': 'string',
'minLength': 1,
'maxLength': 255}
},
},
FileSystemMetric.READ_IOPS.name: {
'type': 'object',
'properties': {
'unit': {'type': 'string',
'enum': [FileSystemMetric.READ_IOPS
.unit]
},
'description': {'type': 'string',
'minLength': 1,
'maxLength': 255}
},
},
FileSystemMetric.WRITE_IOPS.name: {
'type': 'object',
'properties': {
'unit': {'type': 'string',
'enum': [FileSystemMetric.WRITE_IOPS
.unit]
},
'description': {'type': 'string',
'minLength': 1,
'maxLength': 255}
},
},
FileSystemMetric.READ_RESPONSE_TIME.name: {
'type': 'object',
'properties': {
'unit': {'type': 'string',
'enum': [FileSystemMetric
.READ_RESPONSE_TIME.unit]
},
'description': {'type': 'string',
'minLength': 1,
'maxLength': 255}
},
},
FileSystemMetric.WRITE_RESPONSE_TIME.name: {
'type': 'object',
'properties': {
'unit': {'type': 'string',
'enum': [FileSystemMetric
.WRITE_RESPONSE_TIME.unit]
},
'description': {'type': 'string',
'minLength': 1,
'maxLength': 255}
},
},
FileSystemMetric.IO_SIZE.name: {
'type': 'object',
'properties': {
'unit': {'type': 'string',
'enum': [FileSystemMetric.IO_SIZE
.unit]
},
'description': {'type': 'string',
'minLength': 1,
'maxLength': 255}
},
},
FileSystemMetric.READ_IO_SIZE.name: {
'type': 'object',
'properties': {
'unit': {'type': 'string',
'enum': [FileSystemMetric
.READ_IO_SIZE.unit]
},
'description': {'type': 'string',
'minLength': 1,
'maxLength': 255}
},
},
FileSystemMetric.WRITE_IO_SIZE.name: {
'type': 'object',
'properties': {
'unit': {'type': 'string',
'enum': [FileSystemMetric
.WRITE_IO_SIZE.unit]
},
'description': {'type': 'string',
'minLength': 1,
'maxLength': 255}
},
},
},
'additionalProperties': False
},
},
'additionalProperties': False
},
},
'additionalProperties': False,
'required': ['is_historic']
}
================================================
FILE: delfin/api/schemas/storages.py
================================================
# Copyright 2020 The SODA Authors.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# 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.
from delfin.api.validation import parameter_types
create = {
'type': 'object',
'properties': {
'vendor': {'type': 'string', 'minLength': 1, 'maxLength': 255},
'model': {'type': 'string', 'minLength': 1, 'maxLength': 255},
'storage_name': {'type': 'string', 'minLength': 1, 'maxLength': 255},
'rest': {
'type': 'object',
'properties': {
'host': parameter_types.hostname_or_ip_address,
'port': parameter_types.tcp_udp_port,
'username': {'type': 'string', 'minLength': 1,
'maxLength': 255},
'password': {'type': 'string', 'minLength': 1,
'maxLength': 255}
},
'required': ['host', 'port', 'username', 'password'],
'additionalProperties': False
},
'ssh': {
'type': 'object',
'properties': {
'host': parameter_types.hostname_or_ip_address,
'port': parameter_types.tcp_udp_port,
'username': {'type': 'string', 'minLength': 1,
'maxLength': 255},
'password': {'type': 'string', 'minLength': 1,
'maxLength': 255},
'pub_key': {'type': 'string', 'minLength': 1,
'maxLength': 4096},
'pub_key_type': parameter_types.host_key_type
},
'required': ['host', 'port', 'username', 'password', 'pub_key'],
'additionalProperties': False
},
'cli': {
'type': 'object',
'properties': {
'host': parameter_types.hostname_or_ip_address,
'port': parameter_types.tcp_udp_port,
'username': {'type': 'string', 'minLength': 1,
'maxLength': 255},
'password': {'type': 'string', 'minLength': 1,
'maxLength': 255}
},
'required': ['host', 'username', 'password'],
'additionalProperties': False
},
'smis': {
'type': 'object',
'properties': {
'host': parameter_types.hostname_or_ip_address,
'port': parameter_types.tcp_udp_port,
'username': {'type': 'string', 'minLength': 1,
'maxLength': 255},
'password': {'type': 'string', 'minLength': 1,
'maxLength': 255},
'namespace': {'type': 'string', 'minLength': 1,
'maxLength': 255}
},
'required': ['host', 'username', 'password'],
'additionalProperties': False
},
'extra_attributes': {
'type': 'object',
'patternProperties': {
'^[a-zA-Z0-9-_:. ]{1,255}$': {
'type': 'string', 'maxLength': 255
}
}
}
},
'required': ['vendor', 'model'],
'anyOf': [
{'required': ['rest']},
{'required': ['ssh']},
{'required': ['cli']},
{'required': ['smis']}
],
'additionalProperties': False
}
================================================
FILE: delfin/api/v1/__init__.py
================================================
================================================
FILE: delfin/api/v1/access_info.py
================================================
# Copyright 2020 The SODA Authors.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# 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.
import copy
from delfin import db
from delfin import cryptor
from delfin.api import validation
from delfin.api.common import wsgi
from delfin.api.schemas import access_info as schema_access_info
from delfin.api.views import access_info as access_info_viewer
from delfin.db.sqlalchemy.models import AccessInfo
from delfin.common import constants
from delfin.drivers import api as driverapi
class AccessInfoController(wsgi.Controller):
def __init__(self):
super(AccessInfoController, self).__init__()
self._view_builder = access_info_viewer.ViewBuilder()
self.driver_api = driverapi.API()
def show(self, req, id):
"""Show access information by storage id."""
ctxt = req.environ['delfin.context']
access_info = db.access_info_get(ctxt, id)
return self._view_builder.show(access_info)
def _cm_access_info_update(self, ctxt, access_info, body):
access_info_dict = copy.deepcopy(access_info)
unused = ['created_at', 'updated_at', 'storage_name',
'storage_id', 'extra_attributes']
access_info_dict = AccessInfo.to_dict(access_info_dict)
for field in unused:
if access_info_dict.get(field):
access_info_dict.pop(field)
for access in constants.ACCESS_TYPE:
if access_info_dict.get(access):
access_info_dict.pop(access)
access_info_list = db.access_info_get_all(
ctxt, filters=access_info_dict)
for cm_access_info in access_info_list:
if cm_access_info['storage_id'] == access_info['storage_id']:
continue
for access in constants.ACCESS_TYPE:
if cm_access_info.get(access):
cm_access_info[access]['password'] = cryptor.decode(
cm_access_info[access]['password'])
if body.get(access):
cm_access_info[access].update(body[access])
self.driver_api.update_access_info(ctxt, cm_access_info)
@validation.schema(schema_access_info.update)
def update(self, req, id, body):
"""Update storage access information."""
ctxt = req.environ.get('delfin.context')
access_info = db.access_info_get(ctxt, id)
self._cm_access_info_update(ctxt, access_info, body)
for access in constants.ACCESS_TYPE:
if access_info.get(access):
access_info[access]['password'] = cryptor.decode(
access_info[access]['password'])
if body.get(access):
access_info[access].update(body[access])
access_info = self.driver_api.update_access_info(ctxt, access_info)
return self._view_builder.show(access_info)
def show_all(self, req):
"""Show all access information."""
ctxt = req.environ.get('delfin.context')
access_infos = db.access_info_get_all(ctxt)
return self._view_builder.show_all(access_infos)
def create_resource():
return wsgi.Resource(AccessInfoController())
================================================
FILE: delfin/api/v1/alert_source.py
================================================
# Copyright 2020 The SODA Authors.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# 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.
from oslo_log import log
from pyasn1.type.univ import OctetString
from delfin import db, cryptor
from delfin import exception
from delfin.alert_manager import rpcapi
from delfin.api import validation
from delfin.api.common import wsgi
from delfin.api.schemas import alert_source as schema_alert
from delfin.api.views import alert_source as alert_view
from delfin.common import constants
LOG = log.getLogger(__name__)
SNMPv3_keys = ('username', 'auth_key', 'security_level', 'auth_protocol',
'privacy_protocol', 'privacy_key', 'engine_id')
class AlertSourceController(wsgi.Controller):
def __init__(self):
super().__init__()
self.alert_rpcapi = rpcapi.AlertAPI()
@wsgi.response(200)
@validation.schema(schema_alert.put)
def put(self, req, id, body):
"""Create a new alert source or update an exist one."""
ctx = req.environ['delfin.context']
alert_source = body
alert_source["storage_id"] = id
db.storage_get(ctx, id)
alert_source = self._input_check(alert_source)
snmp_config_to_del = self._get_snmp_config_brief(ctx, id)
if snmp_config_to_del is not None:
alert_source = db.alert_source_update(ctx, id, alert_source)
else:
alert_source = db.alert_source_create(ctx, alert_source)
snmp_config_to_add = alert_source
self.alert_rpcapi.sync_snmp_config(ctx, snmp_config_to_del,
snmp_config_to_add)
return alert_view.build_alert_source(alert_source.to_dict())
@wsgi.response(200)
def show(self, req, id):
ctx = req.environ['delfin.context']
alert_source = db.alert_source_get(ctx, id)
return alert_view.build_alert_source(alert_source.to_dict())
@wsgi.response(200)
def delete(self, req, id):
ctx = req.environ['delfin.context']
snmp_config_to_del = self._get_snmp_config_brief(ctx, id)
if snmp_config_to_del is not None:
self.alert_rpcapi.sync_snmp_config(ctx, snmp_config_to_del,
None)
db.alert_source_delete(ctx, id)
else:
raise exception.AlertSourceNotFound(id)
def _input_check(self, alert_source):
version = alert_source.get('version')
if version.lower() == 'snmpv3':
user_name = alert_source.get('username')
security_level = alert_source.get('security_level')
engine_id = alert_source.get('engine_id')
# Validate engine_id, check octet string can be formed from it
if engine_id:
try:
OctetString.fromHexString(engine_id)
except (TypeError, ValueError):
msg = "engine_id should be a set of octets in " \
"hexadecimal format."
raise exception.InvalidInput(msg)
if not user_name or not security_level:
msg = "If snmp version is SNMPv3, then username, " \
"security_level are required."
raise exception.InvalidInput(msg)
if security_level == constants.SecurityLevel.AUTHNOPRIV\
or security_level == constants.SecurityLevel.AUTHPRIV:
auth_protocol = alert_source.get('auth_protocol')
auth_key = alert_source.get('auth_key')
if not auth_protocol or not auth_key:
msg = "If snmp version is SNMPv3 and security_level is " \
"authPriv or authNoPriv, auth_protocol and " \
"auth_key are required."
raise exception.InvalidInput(msg)
alert_source['auth_key'] = cryptor.encode(
alert_source['auth_key'])
if security_level == constants.SecurityLevel.AUTHPRIV:
privacy_protocol = alert_source.get('privacy_protocol')
privacy_key = alert_source.get('privacy_key')
if not privacy_protocol or not privacy_key:
msg = "If snmp version is SNMPv3 and security_level" \
" is authPriv, privacy_protocol and " \
"privacy_key are required."
raise exception.InvalidInput(msg)
alert_source['privacy_key'] = cryptor.encode(
alert_source['privacy_key'])
else:
alert_source['privacy_key'] = None
alert_source['privacy_protocol'] = None
else:
alert_source['auth_key'] = None
alert_source['auth_protocol'] = None
alert_source['privacy_key'] = None
alert_source['privacy_protocol'] = None
# Clear keys for other versions.
alert_source['community_string'] = None
else:
community_string = alert_source.get('community_string')
if not community_string:
msg = "If snmp version is SNMPv1 or SNMPv2c, " \
"community_string is required."
raise exception.InvalidInput(msg)
alert_source['community_string'] = cryptor.encode(
alert_source['community_string'])
# Clear keys for SNMPv3
for k in SNMPv3_keys:
alert_source[k] = None
return alert_source
def _get_snmp_config_brief(self, ctx, storage_id):
"""
Get snmp configuration that will be used to delete from trap receiver.
Only community_index(storage_id) required for snmp v1/v2 deletion,
user_name and engine_id are required for snmp v3. So here we only get
those required parameters. Return None if configuration not found.
"""
try:
alert_source = db.alert_source_get(ctx, storage_id)
snmp_config = {"storage_id": alert_source["storage_id"],
"version": alert_source["version"]}
if snmp_config["version"].lower() == "snmpv3":
snmp_config["username"] = alert_source["username"]
snmp_config["engine_id"] = alert_source["engine_id"]
return snmp_config
except exception.AlertSourceNotFound:
return None
def _decrypt_auth_key(self, alert_source):
auth_key = alert_source.get('auth_key', None)
privacy_key = alert_source.get('privacy_key', None)
if auth_key:
alert_source['auth_key'] = cryptor.decode(auth_key)
if privacy_key:
alert_source['privacy_key'] = cryptor.decode(privacy_key)
return alert_source
def show_all(self, req):
"""Show all snmp configs."""
ctx = req.environ['delfin.context']
snmp_configs = db.alert_source_get_all(ctx)
return alert_view.show_all_snmp_configs(snmp_configs)
def create_resource():
return wsgi.Resource(AlertSourceController())
================================================
FILE: delfin/api/v1/alerts.py
================================================
# Copyright 2020 The SODA Authors.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# 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.
from oslo_log import log
from delfin import db
from delfin import exception
from delfin.api import validation
from delfin.api.common import wsgi
from delfin.api.schemas import alerts as schema_alerts
from delfin.api.views import alerts as alerts_view
from delfin.common import alert_util
from delfin.drivers import api as driver_manager
from delfin.task_manager import rpcapi as task_rpcapi
LOG = log.getLogger(__name__)
class AlertController(wsgi.Controller):
def __init__(self):
super().__init__()
self.task_rpcapi = task_rpcapi.TaskAPI()
self.driver_manager = driver_manager.API()
@wsgi.response(200)
def show(self, req, id):
ctx = req.environ['delfin.context']
query_para = {}
query_para.update(req.GET)
try:
begin_time = None
end_time = None
if query_para.get('begin_time'):
begin_time = int(query_para.get('begin_time'))
if query_para.get('end_time'):
end_time = int(query_para.get('end_time'))
except Exception:
msg = "begin_time and end_time should be integer values in " \
"milliseconds."
raise exception.InvalidInput(msg)
# When both begin_time and end_time are provided, end_time should
# be greater than begin_time
if begin_time and end_time and end_time <= begin_time:
msg = "end_time should be greater than begin_time."
raise exception.InvalidInput(msg)
storage = db.storage_get(ctx, id)
gitextract_3m8g0ek4/ ├── .coveragerc ├── .github/ │ ├── ISSUE_TEMPLATE.md │ ├── PULL_REQUEST_TEMPLATE.md │ └── workflows/ │ ├── delfin_ci.yml │ └── delfin_e2e_test.yml ├── .gitignore ├── CHANGELOG/ │ ├── CHANGELOG-v1.0.0.md │ └── CHANGELOG-v1.1.0.md ├── Dockerfile ├── LICENSE ├── README.md ├── codecov.yml ├── delfin/ │ ├── __init__.py │ ├── alert_manager/ │ │ ├── __init__.py │ │ ├── alert_processor.py │ │ ├── constants.py │ │ ├── rpcapi.py │ │ ├── snmp_validator.py │ │ └── trap_receiver.py │ ├── api/ │ │ ├── __init__.py │ │ ├── api_utils.py │ │ ├── common/ │ │ │ ├── __init__.py │ │ │ └── wsgi.py │ │ ├── contrib/ │ │ │ └── __init__.py │ │ ├── extensions.py │ │ ├── middlewares.py │ │ ├── schemas/ │ │ │ ├── __init__.py │ │ │ ├── access_info.py │ │ │ ├── alert_source.py │ │ │ ├── alerts.py │ │ │ ├── storage_capabilities_schema.py │ │ │ └── storages.py │ │ ├── v1/ │ │ │ ├── __init__.py │ │ │ ├── access_info.py │ │ │ ├── alert_source.py │ │ │ ├── alerts.py │ │ │ ├── controllers.py │ │ │ ├── disks.py │ │ │ ├── filesystems.py │ │ │ ├── masking_views.py │ │ │ ├── port_groups.py │ │ │ ├── ports.py │ │ │ ├── qtrees.py │ │ │ ├── quotas.py │ │ │ ├── router.py │ │ │ ├── shares.py │ │ │ ├── storage_host_groups.py │ │ │ ├── storage_host_initiators.py │ │ │ ├── storage_hosts.py │ │ │ ├── storage_pools.py │ │ │ ├── storages.py │ │ │ ├── volume_groups.py │ │ │ └── volumes.py │ │ ├── validation/ │ │ │ ├── __init__.py │ │ │ ├── parameter_types.py │ │ │ └── validators.py │ │ └── views/ │ │ ├── __init__.py │ │ ├── access_info.py │ │ ├── alert_source.py │ │ ├── alerts.py │ │ ├── controllers.py │ │ ├── disks.py │ │ ├── filesystems.py │ │ ├── masking_views.py │ │ ├── port_groups.py │ │ ├── ports.py │ │ ├── qtrees.py │ │ ├── quotas.py │ │ ├── shares.py │ │ ├── storage_host_groups.py │ │ ├── storage_host_initiators.py │ │ ├── storage_hosts.py │ │ ├── storage_pools.py │ │ ├── storages.py │ │ ├── volume_groups.py │ │ └── volumes.py │ ├── cmd/ │ │ ├── __init__.py │ │ ├── alert.py │ │ ├── api.py │ │ └── task.py │ ├── common/ │ │ ├── __init__.py │ │ ├── alert_util.py │ │ ├── config.py │ │ ├── constants.py │ │ └── sqlalchemyutils.py │ ├── context.py │ ├── coordination.py │ ├── cryptor.py │ ├── db/ │ │ ├── __init__.py │ │ ├── api.py │ │ ├── base.py │ │ └── sqlalchemy/ │ │ ├── __init__.py │ │ ├── api.py │ │ └── models.py │ ├── drivers/ │ │ ├── __init__.py │ │ ├── api.py │ │ ├── dell_emc/ │ │ │ ├── __init__.py │ │ │ ├── power_store/ │ │ │ │ ├── __init__.py │ │ │ │ ├── consts.py │ │ │ │ ├── power_store.py │ │ │ │ └── rest_handler.py │ │ │ ├── scaleio/ │ │ │ │ ├── __init__.py │ │ │ │ ├── alert_consts.py │ │ │ │ ├── consts.py │ │ │ │ ├── rest_handler.py │ │ │ │ └── scaleio_stor.py │ │ │ ├── unity/ │ │ │ │ ├── __init__.py │ │ │ │ ├── alert_handler.py │ │ │ │ ├── consts.py │ │ │ │ ├── rest_handler.py │ │ │ │ └── unity.py │ │ │ ├── vmax/ │ │ │ │ ├── __init__.py │ │ │ │ ├── alert_handler/ │ │ │ │ │ ├── __init__.py │ │ │ │ │ ├── alert_mapper.py │ │ │ │ │ ├── oid_mapper.py │ │ │ │ │ ├── snmp_alerts.py │ │ │ │ │ └── unisphere_alerts.py │ │ │ │ ├── client.py │ │ │ │ ├── constants.py │ │ │ │ ├── perf_utils.py │ │ │ │ ├── rest.py │ │ │ │ └── vmax.py │ │ │ ├── vnx/ │ │ │ │ ├── __init__.py │ │ │ │ └── vnx_block/ │ │ │ │ ├── __init__.py │ │ │ │ ├── alert_handler.py │ │ │ │ ├── component_handler.py │ │ │ │ ├── consts.py │ │ │ │ ├── navi_handler.py │ │ │ │ ├── navicli_client.py │ │ │ │ └── vnx_block.py │ │ │ └── vplex/ │ │ │ ├── __init__.py │ │ │ ├── alert_handler.py │ │ │ ├── consts.py │ │ │ ├── rest_handler.py │ │ │ └── vplex_stor.py │ │ ├── driver.py │ │ ├── fake_storage/ │ │ │ └── __init__.py │ │ ├── fujitsu/ │ │ │ ├── __init__.py │ │ │ └── eternus/ │ │ │ ├── __init__.py │ │ │ ├── cli_handler.py │ │ │ ├── consts.py │ │ │ ├── eternus_ssh_client.py │ │ │ └── eternus_stor.py │ │ ├── h3c/ │ │ │ ├── __init__.py │ │ │ └── unistor_cf/ │ │ │ ├── __init__.py │ │ │ └── unistor_cf.py │ │ ├── helper.py │ │ ├── hitachi/ │ │ │ ├── __init__.py │ │ │ ├── hnas/ │ │ │ │ ├── __init__.py │ │ │ │ ├── constants.py │ │ │ │ ├── hds_nas.py │ │ │ │ └── nas_handler.py │ │ │ └── vsp/ │ │ │ ├── __init__.py │ │ │ ├── consts.py │ │ │ ├── rest_handler.py │ │ │ └── vsp_stor.py │ │ ├── hpe/ │ │ │ ├── __init__.py │ │ │ ├── hpe_3par/ │ │ │ │ ├── __init__.py │ │ │ │ ├── alert_handler.py │ │ │ │ ├── component_handler.py │ │ │ │ ├── consts.py │ │ │ │ ├── hpe_3parstor.py │ │ │ │ ├── rest_handler.py │ │ │ │ └── ssh_handler.py │ │ │ └── hpe_msa/ │ │ │ ├── __init__.py │ │ │ ├── consts.py │ │ │ ├── hpe_msastor.py │ │ │ └── ssh_handler.py │ │ ├── huawei/ │ │ │ ├── __init__.py │ │ │ └── oceanstor/ │ │ │ ├── __init__.py │ │ │ ├── alert_handler.py │ │ │ ├── consts.py │ │ │ ├── oceanstor.py │ │ │ ├── oid_mapper.py │ │ │ └── rest_client.py │ │ ├── ibm/ │ │ │ ├── __init__.py │ │ │ ├── ds8k/ │ │ │ │ ├── __init__.py │ │ │ │ ├── alert_handler.py │ │ │ │ ├── consts.py │ │ │ │ ├── ds8k.py │ │ │ │ └── rest_handler.py │ │ │ └── storwize_svc/ │ │ │ ├── __init__.py │ │ │ ├── consts.py │ │ │ ├── ssh_handler.py │ │ │ └── storwize_svc.py │ │ ├── inspur/ │ │ │ ├── __init__.py │ │ │ └── as5500/ │ │ │ ├── __init__.py │ │ │ └── as5500.py │ │ ├── macro_san/ │ │ │ ├── __init__.py │ │ │ └── ms/ │ │ │ ├── __init__.py │ │ │ ├── consts.py │ │ │ ├── file/ │ │ │ │ └── __init__.py │ │ │ ├── macro_ssh_client.py │ │ │ ├── ms_handler.py │ │ │ └── ms_stor.py │ │ ├── manager.py │ │ ├── netapp/ │ │ │ ├── __init__.py │ │ │ └── dataontap/ │ │ │ ├── __init__.py │ │ │ ├── cluster_mode.py │ │ │ ├── constants.py │ │ │ ├── mapping_handler.py │ │ │ ├── netapp_handler.py │ │ │ └── performance_handler.py │ │ ├── pure/ │ │ │ ├── __init__.py │ │ │ └── flasharray/ │ │ │ ├── __init__.py │ │ │ ├── consts.py │ │ │ ├── pure_flasharray.py │ │ │ └── rest_handler.py │ │ └── utils/ │ │ ├── __init__.py │ │ ├── performance_file/ │ │ │ ├── __init__.py │ │ │ ├── macro_san/ │ │ │ │ └── __init__.py │ │ │ ├── svc/ │ │ │ │ └── __init__.py │ │ │ └── vnx_block/ │ │ │ └── __init__.py │ │ ├── rest_client.py │ │ ├── ssh_client.py │ │ └── tools.py │ ├── exception.py │ ├── exporter/ │ │ ├── __init__.py │ │ ├── base_exporter.py │ │ ├── example.py │ │ ├── kafka/ │ │ │ ├── __init__.py │ │ │ ├── exporter.py │ │ │ └── kafka.py │ │ └── prometheus/ │ │ ├── __init__.py │ │ ├── alert_manager.py │ │ ├── exporter.py │ │ ├── exporter_server.py │ │ └── prometheus.py │ ├── i18n.py │ ├── leader_election/ │ │ ├── __init__.py │ │ ├── distributor/ │ │ │ ├── __init__.py │ │ │ ├── perf_job_manager.py │ │ │ └── task_distributor.py │ │ ├── factory.py │ │ ├── interface.py │ │ └── tooz/ │ │ ├── __init__.py │ │ ├── callback.py │ │ └── leader_elector.py │ ├── manager.py │ ├── rpc.py │ ├── service.py │ ├── ssl_utils.py │ ├── task_manager/ │ │ ├── __init__.py │ │ ├── manager.py │ │ ├── metrics_manager.py │ │ ├── metrics_rpcapi.py │ │ ├── perf_job_controller.py │ │ ├── rpcapi.py │ │ ├── scheduler/ │ │ │ ├── __init__.py │ │ │ ├── schedule_manager.py │ │ │ └── schedulers/ │ │ │ ├── __init__.py │ │ │ └── telemetry/ │ │ │ ├── __init__.py │ │ │ ├── failed_performance_collection_handler.py │ │ │ ├── job_handler.py │ │ │ └── performance_collection_handler.py │ │ ├── subprocess_manager.py │ │ ├── subprocess_rpcapi.py │ │ └── tasks/ │ │ ├── __init__.py │ │ ├── alerts.py │ │ ├── resources.py │ │ └── telemetry.py │ ├── test.py │ ├── tests/ │ │ ├── __init__.py │ │ ├── e2e/ │ │ │ ├── GetResources.robot │ │ │ ├── GetStorage.robot │ │ │ ├── README.md │ │ │ ├── RegisterStorage.robot │ │ │ ├── RemoveStorage.robot │ │ │ ├── UpdateAccessInfo.robot │ │ │ ├── __init__.py │ │ │ ├── test.json │ │ │ ├── test_e2e.sh │ │ │ └── testdriver/ │ │ │ ├── __init__.py │ │ │ └── storage.json │ │ └── unit/ │ │ ├── __init__.py │ │ ├── alert_manager/ │ │ │ ├── __init__.py │ │ │ ├── fakes.py │ │ │ ├── test_alert_processor.py │ │ │ ├── test_snmp_validator.py │ │ │ └── test_trap_receiver.py │ │ ├── api/ │ │ │ ├── __init__.py │ │ │ ├── extensions/ │ │ │ │ ├── __init__.py │ │ │ │ └── foxinsocks.py │ │ │ ├── fakes.py │ │ │ ├── test_api_validation.py │ │ │ ├── test_extensions.py │ │ │ ├── test_middlewares.py │ │ │ ├── test_wsgi.py │ │ │ └── v1/ │ │ │ ├── __init__.py │ │ │ ├── test_access_info.py │ │ │ ├── test_alert_source.py │ │ │ ├── test_alerts.py │ │ │ ├── test_storage_pools.py │ │ │ ├── test_storages.py │ │ │ └── test_volumes.py │ │ ├── conf_fixture.py │ │ ├── db/ │ │ │ ├── __init__.py │ │ │ └── test_db_api.py │ │ ├── drivers/ │ │ │ ├── __init__.py │ │ │ ├── dell_emc/ │ │ │ │ ├── __init__.py │ │ │ │ ├── power_store/ │ │ │ │ │ ├── __init__.py │ │ │ │ │ └── test_power_store.py │ │ │ │ ├── scaleio/ │ │ │ │ │ ├── __init__.py │ │ │ │ │ ├── test_constans.py │ │ │ │ │ └── test_scaleio_stor.py │ │ │ │ ├── unity/ │ │ │ │ │ ├── __init__.py │ │ │ │ │ └── test_emc_unity.py │ │ │ │ ├── vmax/ │ │ │ │ │ ├── __init__.py │ │ │ │ │ ├── test_alert_handler.py │ │ │ │ │ └── test_vmax.py │ │ │ │ ├── vnx/ │ │ │ │ │ ├── __init__.py │ │ │ │ │ └── vnx_block/ │ │ │ │ │ ├── __init__.py │ │ │ │ │ └── test_vnx_block.py │ │ │ │ └── vplex/ │ │ │ │ ├── __init__.py │ │ │ │ └── test_emc_vplex.py │ │ │ ├── fujitsu/ │ │ │ │ ├── __init__.py │ │ │ │ └── eternus/ │ │ │ │ ├── __init__.py │ │ │ │ └── test_eternus_stor.py │ │ │ ├── hitachi/ │ │ │ │ ├── __init__.py │ │ │ │ ├── hnas/ │ │ │ │ │ ├── __init__.py │ │ │ │ │ ├── constants.py │ │ │ │ │ └── test_hnas.py │ │ │ │ └── vsp/ │ │ │ │ ├── __init__.py │ │ │ │ └── test_hitachi_vspstor.py │ │ │ ├── hpe/ │ │ │ │ ├── __init__.py │ │ │ │ ├── hpe_3par/ │ │ │ │ │ ├── __init__.py │ │ │ │ │ └── test_hpe_3parstor.py │ │ │ │ └── hpe_msa/ │ │ │ │ ├── __init__.py │ │ │ │ ├── test_constans.py │ │ │ │ └── test_hpe_msastor.py │ │ │ ├── huawei/ │ │ │ │ ├── __init__.py │ │ │ │ └── oceanstor/ │ │ │ │ ├── __init__.py │ │ │ │ ├── test_alert_handler.py │ │ │ │ ├── test_oceanstor.py │ │ │ │ └── test_rest_client.py │ │ │ ├── ibm/ │ │ │ │ ├── __init__.py │ │ │ │ ├── ibm_ds8k/ │ │ │ │ │ ├── __init__.py │ │ │ │ │ └── test_ibm_ds8k.py │ │ │ │ └── storwize_svc/ │ │ │ │ ├── __init__.py │ │ │ │ └── test_ibm_storwize_svc.py │ │ │ ├── macro_san/ │ │ │ │ ├── __init__.py │ │ │ │ └── ms/ │ │ │ │ ├── __init__.py │ │ │ │ └── test_ms_stor.py │ │ │ ├── netapp/ │ │ │ │ ├── __init__.py │ │ │ │ └── netapp_ontap/ │ │ │ │ ├── __init__.py │ │ │ │ ├── test_constans.py │ │ │ │ └── test_netapp.py │ │ │ ├── pure/ │ │ │ │ ├── __init__.py │ │ │ │ └── flasharray/ │ │ │ │ ├── __init__.py │ │ │ │ └── test_pure_flasharray.py │ │ │ ├── test_api.py │ │ │ └── test_manager.py │ │ ├── exporter/ │ │ │ └── prometheus/ │ │ │ ├── __init__.py │ │ │ └── test_prometheus.py │ │ ├── fake_data.py │ │ ├── fake_notifier.py │ │ ├── leader_election/ │ │ │ ├── __init__.py │ │ │ └── distributor/ │ │ │ ├── __init__.py │ │ │ └── test_task_distributor.py │ │ ├── task_manager/ │ │ │ ├── __init__.py │ │ │ ├── scheduler/ │ │ │ │ ├── __init__.py │ │ │ │ ├── schedulers/ │ │ │ │ │ ├── __init__.py │ │ │ │ │ └── telemetry/ │ │ │ │ │ ├── __init__.py │ │ │ │ │ ├── test_failed_performance_collection_handler.py │ │ │ │ │ ├── test_job_handler.py │ │ │ │ │ └── test_performance_collection_handler.py │ │ │ │ └── test_scheduler.py │ │ │ ├── test_alert_task.py │ │ │ ├── test_resources.py │ │ │ └── test_telemetry.py │ │ ├── test_context.py │ │ ├── test_coordination.py │ │ ├── test_manager.py │ │ ├── test_rpc.py │ │ ├── utils.py │ │ └── wsgi/ │ │ ├── __init__.py │ │ └── test_common.py │ ├── utils.py │ ├── version.py │ └── wsgi/ │ ├── __init__.py │ └── common.py ├── docker-compose.yml ├── etc/ │ └── delfin/ │ ├── api-paste.ini │ └── delfin.conf ├── installer/ │ ├── README.md │ ├── ansible/ │ │ ├── clean.yml │ │ ├── group_vars/ │ │ │ └── delfin.yml │ │ ├── local.hosts │ │ ├── roles/ │ │ │ ├── cleaner/ │ │ │ │ ├── scenarios/ │ │ │ │ │ ├── delfin.yml │ │ │ │ │ └── release.yml │ │ │ │ └── tasks/ │ │ │ │ └── main.yml │ │ │ └── delfin-installer/ │ │ │ ├── scenarios/ │ │ │ │ ├── container.yml │ │ │ │ ├── rabbitmq.yml │ │ │ │ ├── redis.yml │ │ │ │ ├── source-code.yml │ │ │ │ └── start-delfin.yml │ │ │ └── tasks/ │ │ │ └── main.yml │ │ ├── script/ │ │ │ ├── create_db.py │ │ │ └── virtualenv3_exec.j2 │ │ └── site.yml │ ├── helper.py │ ├── install │ ├── install.conf │ ├── install_delfin.py │ ├── install_dependencies.sh │ ├── precheck │ ├── uninstall │ └── util.sh ├── openapi-spec/ │ └── swagger.yaml ├── requirements.txt ├── script/ │ ├── create_db.py │ └── start.sh ├── setup.cfg ├── setup.py ├── test-requirements.txt └── tox.ini
Showing preview only (315K chars total). Download the full file or copy to clipboard to get everything.
SYMBOL INDEX (3684 symbols across 234 files)
FILE: delfin/alert_manager/alert_processor.py
class AlertProcessor (line 31) | class AlertProcessor(object):
method __init__ (line 34) | def __init__(self):
method process_alert_info (line 39) | def process_alert_info(self, alert):
method get_storage_from_parsed_alert (line 73) | def get_storage_from_parsed_alert(self, ctxt, storage, alert_model):
method sync_storage_alert (line 108) | def sync_storage_alert(self, context, storage_id):
FILE: delfin/alert_manager/rpcapi.py
class AlertAPI (line 27) | class AlertAPI(object):
method __init__ (line 36) | def __init__(self):
method sync_snmp_config (line 42) | def sync_snmp_config(self, ctxt, snmp_config_to_del, snmp_config_to_add):
method check_snmp_config (line 49) | def check_snmp_config(self, ctxt, snmp_config):
FILE: delfin/alert_manager/snmp_validator.py
class SNMPValidator (line 36) | class SNMPValidator(object):
method __init__ (line 37) | def __init__(self):
method validate (line 41) | def validate(self, ctxt, alert_source):
method validate_connectivity (line 79) | def validate_connectivity(ctxt, alert_source):
method _handle_validation_result (line 186) | def _handle_validation_result(self, ctxt, storage_id,
method _dispatch_snmp_validation_alert (line 202) | def _dispatch_snmp_validation_alert(self, ctxt, storage, category):
FILE: delfin/alert_manager/trap_receiver.py
class TrapReceiver (line 41) | class TrapReceiver(manager.Manager):
method __init__ (line 46) | def __init__(self, service_name=None, *args, **kwargs):
method sync_snmp_config (line 56) | def sync_snmp_config(self, ctxt, snmp_config_to_del=None,
method _add_snmp_config (line 65) | def _add_snmp_config(self, ctxt, new_config):
method _delete_snmp_config (line 114) | def _delete_snmp_config(self, ctxt, snmp_config):
method _get_community_index (line 135) | def _get_community_index(self, storage_id):
method _get_snmp_version_int (line 138) | def _get_snmp_version_int(self, ctxt, version):
method _get_usm_auth_protocol (line 147) | def _get_usm_auth_protocol(self, ctxt, auth_protocol):
method _get_usm_priv_protocol (line 159) | def _get_usm_priv_protocol(self, ctxt, privacy_protocol):
method _mib_builder (line 171) | def _mib_builder(self):
method _add_transport (line 176) | def _add_transport(self):
method _get_alert_source_by_host (line 191) | def _get_alert_source_by_host(source_ip):
method _cb_fun (line 229) | def _cb_fun(self, state_reference, context_engine_id, context_name,
method _load_snmp_config (line 283) | def _load_snmp_config(self):
method start (line 302) | def start(self):
method stop (line 332) | def stop(self):
method heart_beat_task_spawn (line 341) | def heart_beat_task_spawn(self, ctxt):
method check_snmp_config (line 348) | def check_snmp_config(self, ctxt, snmp_config):
FILE: delfin/api/__init__.py
function root_app_factory (line 20) | def root_app_factory(loader, global_conf, **local_conf):
FILE: delfin/api/api_utils.py
function remove_invalid_options (line 40) | def remove_invalid_options(context, search_options, allowed_search_optio...
function validate_integer (line 51) | def validate_integer(value, name, min_value=None, max_value=None):
function get_pagination_params (line 67) | def get_pagination_params(params, max_limit=None):
function _get_limit_param (line 90) | def _get_limit_param(params, max_limit=None):
function _get_marker_param (line 109) | def _get_marker_param(params):
function _get_offset_param (line 114) | def _get_offset_param(params):
function get_sort_params (line 123) | def get_sort_params(params, default_key='created_at', default_dir='desc'):
FILE: delfin/api/common/__init__.py
class APIMapper (line 32) | class APIMapper(routes.Mapper):
method routematch (line 33) | def routematch(self, url=None, environ=None):
method connect (line 39) | def connect(self, *args, **kwargs):
class ProjectMapper (line 49) | class ProjectMapper(APIMapper):
method resource (line 50) | def resource(self, member_name, collection_name, **kwargs):
class APIRouter (line 64) | class APIRouter(base_wsgi.Router):
method factory (line 69) | def factory(cls, global_config, **local_config):
method __init__ (line 73) | def __init__(self, ext_mgr=None):
method _setup_ext_routes (line 88) | def _setup_ext_routes(self, mapper, ext_mgr):
method _setup_extensions (line 108) | def _setup_extensions(self, ext_mgr):
method _setup_routes (line 128) | def _setup_routes(self, mapper):
FILE: delfin/api/common/wsgi.py
class Request (line 40) | class Request(webob.Request):
method __init__ (line 43) | def __init__(self, *args, **kwargs):
method cache_resource (line 47) | def cache_resource(self, resource_to_cache, id_attribute='id', name=No...
method cached_resource (line 81) | def cached_resource(self, name=None):
method cached_resource_by_id (line 100) | def cached_resource_by_id(self, resource_id, name=None):
method cache_db_items (line 117) | def cache_db_items(self, key, items, item_key='id'):
method get_db_items (line 128) | def get_db_items(self, key):
method get_db_item (line 137) | def get_db_item(self, key, item_key):
method cache_db_share_types (line 146) | def cache_db_share_types(self, share_types):
method cache_db_share_type (line 149) | def cache_db_share_type(self, share_type):
method get_db_share_types (line 152) | def get_db_share_types(self):
method get_db_share_type (line 155) | def get_db_share_type(self, share_type_id):
method best_match_content_type (line 158) | def best_match_content_type(self):
method get_content_type (line 179) | def get_content_type(self):
class ActionDispatcher (line 196) | class ActionDispatcher(object):
method dispatch (line 199) | def dispatch(self, *args, **kwargs):
method default (line 205) | def default(self, data):
class TextDeserializer (line 209) | class TextDeserializer(ActionDispatcher):
method deserialize (line 212) | def deserialize(self, datastring, action='default'):
method default (line 215) | def default(self, datastring):
class JSONDeserializer (line 219) | class JSONDeserializer(TextDeserializer):
method _from_json (line 221) | def _from_json(self, datastring):
method default (line 228) | def default(self, datastring):
class DictSerializer (line 232) | class DictSerializer(ActionDispatcher):
method serialize (line 235) | def serialize(self, data, action='default'):
method default (line 238) | def default(self, data):
class JSONDictSerializer (line 242) | class JSONDictSerializer(DictSerializer):
method default (line 245) | def default(self, data):
function serializers (line 249) | def serializers(**serializers):
function deserializers (line 266) | def deserializers(**deserializers):
function response (line 283) | def response(code):
class ResponseObject (line 298) | class ResponseObject(object):
method __init__ (line 306) | def __init__(self, obj, code=None, headers=None, **serializers):
method __getitem__ (line 323) | def __getitem__(self, key):
method __setitem__ (line 328) | def __setitem__(self, key, value):
method __delitem__ (line 333) | def __delitem__(self, key):
method _bind_method_serializers (line 338) | def _bind_method_serializers(self, meth_serializers):
method get_serializer (line 355) | def get_serializer(self, content_type, default_serializers=None):
method preserialize (line 376) | def preserialize(self, content_type, default_serializers=None):
method attach (line 389) | def attach(self, **kwargs):
method serialize (line 395) | def serialize(self, request, content_type, default_serializers=None):
method code (line 420) | def code(self):
method headers (line 426) | def headers(self):
function action_peek_json (line 432) | def action_peek_json(body):
class ResourceExceptionHandler (line 450) | class ResourceExceptionHandler(object):
method __enter__ (line 458) | def __enter__(self):
method __exit__ (line 461) | def __exit__(self, ex_type, ex_value, ex_traceback):
class Resource (line 484) | class Resource(wsgi.Application):
method __init__ (line 500) | def __init__(self, controller, action_peek=None, **deserializers):
method register_actions (line 528) | def register_actions(self, controller):
method register_extensions (line 535) | def register_extensions(self, controller):
method get_action_args (line 554) | def get_action_args(self, request_environment):
method get_body (line 579) | def get_body(self, request):
method deserialize (line 596) | def deserialize(self, meth, content_type, body):
method pre_process_extensions (line 609) | def pre_process_extensions(self, extensions, request, action_args):
method post_process_extensions (line 639) | def post_process_extensions(self, extensions, resp_obj, request,
method __call__ (line 670) | def __call__(self, request):
method _process_stack (line 691) | def _process_stack(self, request, action, action_args,
method get_method (line 782) | def get_method(self, request, action, content_type, body):
method dispatch (line 811) | def dispatch(self, method, request, action_args):
function action (line 817) | def action(name):
function extends (line 833) | def extends(*args, **kwargs):
class ControllerMetaclass (line 862) | class ControllerMetaclass(type):
method __new__ (line 869) | def __new__(mcs, name, bases, cls_dict):
class Controller (line 896) | class Controller(object):
method __init__ (line 901) | def __init__(self, view_builder=None):
method is_valid_body (line 912) | def is_valid_body(body, entity_name):
class Fault (line 929) | class Fault(webob.exc.HTTPException):
method __init__ (line 932) | def __init__(self, exception):
method __call__ (line 938) | def __call__(self, req):
method __str__ (line 963) | def __str__(self):
function _set_request_id_header (line 967) | def _set_request_id_header(req, headers):
FILE: delfin/api/contrib/__init__.py
function standard_extensions (line 31) | def standard_extensions(ext_mgr):
function select_extensions (line 35) | def select_extensions(ext_mgr):
FILE: delfin/api/extensions.py
class ExtensionDescriptor (line 31) | class ExtensionDescriptor(object):
method __init__ (line 51) | def __init__(self, ext_mgr):
method get_resources (line 57) | def get_resources(self):
method get_controller_extensions (line 66) | def get_controller_extensions(self):
class ExtensionsResource (line 75) | class ExtensionsResource(wsgi.Resource):
method __init__ (line 77) | def __init__(self, extension_manager):
method _translate (line 81) | def _translate(self, ext):
method index (line 90) | def index(self, req):
method show (line 96) | def show(self, req, id):
method delete (line 105) | def delete(self, req, id):
method create (line 108) | def create(self, req):
class ExtensionManager (line 112) | class ExtensionManager(object):
method __init__ (line 120) | def __init__(self):
method register (line 128) | def register(self, ext):
method get_resources (line 140) | def get_resources(self):
method get_controller_extensions (line 156) | def get_controller_extensions(self):
method _check_extension (line 169) | def _check_extension(self, extension):
method load_extension (line 183) | def load_extension(self, ext_factory):
method _load_extensions (line 201) | def _load_extensions(self):
class ControllerExtension (line 229) | class ControllerExtension(object):
method __init__ (line 236) | def __init__(self, extension, collection, controller):
class ResourceExtension (line 242) | class ResourceExtension(object):
method __init__ (line 245) | def __init__(self, collection, controller, parent=None,
function load_standard_extensions (line 260) | def load_standard_extensions(ext_mgr, logger, path, package, ext_list=No...
FILE: delfin/api/middlewares.py
class ContextWrapper (line 21) | class ContextWrapper(wsgi.Middleware):
method __call__ (line 25) | def __call__(self, req):
FILE: delfin/api/v1/access_info.py
class AccessInfoController (line 27) | class AccessInfoController(wsgi.Controller):
method __init__ (line 29) | def __init__(self):
method show (line 34) | def show(self, req, id):
method _cm_access_info_update (line 40) | def _cm_access_info_update(self, ctxt, access_info, body):
method update (line 67) | def update(self, req, id, body):
method show_all (line 81) | def show_all(self, req):
function create_resource (line 88) | def create_resource():
FILE: delfin/api/v1/alert_source.py
class AlertSourceController (line 33) | class AlertSourceController(wsgi.Controller):
method __init__ (line 34) | def __init__(self):
method put (line 40) | def put(self, req, id, body):
method show (line 61) | def show(self, req, id):
method delete (line 68) | def delete(self, req, id):
method _input_check (line 79) | def _input_check(self, alert_source):
method _get_snmp_config_brief (line 149) | def _get_snmp_config_brief(self, ctx, storage_id):
method _decrypt_auth_key (line 167) | def _decrypt_auth_key(self, alert_source):
method show_all (line 177) | def show_all(self, req):
function create_resource (line 185) | def create_resource():
FILE: delfin/api/v1/alerts.py
class AlertController (line 30) | class AlertController(wsgi.Controller):
method __init__ (line 31) | def __init__(self):
method show (line 37) | def show(self, req, id):
method delete (line 73) | def delete(self, req, id, sequence_number):
method sync (line 80) | def sync(self, req, id, body):
function create_resource (line 103) | def create_resource():
FILE: delfin/api/v1/controllers.py
class ControllerController (line 21) | class ControllerController(wsgi.Controller):
method __init__ (line 23) | def __init__(self):
method _get_controllers_search_options (line 28) | def _get_controllers_search_options(self):
method index (line 32) | def index(self, req):
method show (line 47) | def show(self, req, id):
function create_resource (line 53) | def create_resource():
FILE: delfin/api/v1/disks.py
class DiskController (line 21) | class DiskController(wsgi.Controller):
method __init__ (line 23) | def __init__(self):
method _get_disks_search_options (line 28) | def _get_disks_search_options(self):
method index (line 32) | def index(self, req):
method show (line 47) | def show(self, req, id):
function create_resource (line 53) | def create_resource():
FILE: delfin/api/v1/filesystems.py
class FilesystemController (line 21) | class FilesystemController(wsgi.Controller):
method __init__ (line 23) | def __init__(self):
method _get_fs_search_options (line 28) | def _get_fs_search_options(self):
method index (line 32) | def index(self, req):
method show (line 47) | def show(self, req, id):
function create_resource (line 53) | def create_resource():
FILE: delfin/api/v1/masking_views.py
class MaskingViewController (line 21) | class MaskingViewController(wsgi.Controller):
method __init__ (line 23) | def __init__(self):
method _get_masking_view_search_options (line 33) | def _get_masking_view_search_options(self):
method show (line 37) | def show(self, req, id):
function create_resource (line 54) | def create_resource():
FILE: delfin/api/v1/port_groups.py
class PortGroupController (line 21) | class PortGroupController(wsgi.Controller):
method __init__ (line 23) | def __init__(self):
method _get_port_group_search_options (line 28) | def _get_port_group_search_options(self):
method show (line 32) | def show(self, req, id):
function create_resource (line 64) | def create_resource():
FILE: delfin/api/v1/ports.py
class PortController (line 21) | class PortController(wsgi.Controller):
method __init__ (line 23) | def __init__(self):
method _get_ports_search_options (line 28) | def _get_ports_search_options(self):
method index (line 32) | def index(self, req):
method show (line 47) | def show(self, req, id):
function create_resource (line 53) | def create_resource():
FILE: delfin/api/v1/qtrees.py
class QtreeController (line 21) | class QtreeController(wsgi.Controller):
method __init__ (line 23) | def __init__(self):
method _get_qtrees_search_options (line 29) | def _get_qtrees_search_options(self):
method index (line 33) | def index(self, req):
method show (line 48) | def show(self, req, id):
function create_resource (line 54) | def create_resource():
FILE: delfin/api/v1/quotas.py
class QuotaController (line 21) | class QuotaController(wsgi.Controller):
method __init__ (line 23) | def __init__(self):
method _get_fs_search_options (line 30) | def _get_fs_search_options(self):
method index (line 34) | def index(self, req):
method show (line 49) | def show(self, req, id):
function create_resource (line 55) | def create_resource():
FILE: delfin/api/v1/router.py
class APIRouter (line 38) | class APIRouter(common.APIRouter):
method _setup_routes (line 42) | def _setup_routes(self, mapper):
FILE: delfin/api/v1/shares.py
class ShareController (line 21) | class ShareController(wsgi.Controller):
method __init__ (line 23) | def __init__(self):
method _get_fs_search_options (line 28) | def _get_fs_search_options(self):
method index (line 32) | def index(self, req):
method show (line 47) | def show(self, req, id):
function create_resource (line 53) | def create_resource():
FILE: delfin/api/v1/storage_host_groups.py
class StorageHostGroupController (line 21) | class StorageHostGroupController(wsgi.Controller):
method __init__ (line 23) | def __init__(self):
method _get_storage_host_group_search_options (line 28) | def _get_storage_host_group_search_options(self):
method show (line 32) | def show(self, req, id):
function create_resource (line 66) | def create_resource():
FILE: delfin/api/v1/storage_host_initiators.py
class StorageHostInitiatorController (line 22) | class StorageHostInitiatorController(wsgi.Controller):
method __init__ (line 24) | def __init__(self):
method _get_storage_host_initiator_search_options (line 30) | def _get_storage_host_initiator_search_options(self):
method show (line 34) | def show(self, req, id):
function create_resource (line 52) | def create_resource():
FILE: delfin/api/v1/storage_hosts.py
class StorageHostController (line 21) | class StorageHostController(wsgi.Controller):
method __init__ (line 23) | def __init__(self):
method _get_storage_host_search_options (line 28) | def _get_storage_host_search_options(self):
method _fill_storage_host_initiators (line 32) | def _fill_storage_host_initiators(self, ctxt, storage_host, storage_id):
method show (line 45) | def show(self, req, id):
function create_resource (line 66) | def create_resource():
FILE: delfin/api/v1/storage_pools.py
class StoragePoolController (line 21) | class StoragePoolController(wsgi.Controller):
method __init__ (line 22) | def __init__(self):
method _get_storage_pools_search_options (line 27) | def _get_storage_pools_search_options(self):
method show (line 31) | def show(self, req, id):
method index (line 36) | def index(self, req):
function create_resource (line 52) | def create_resource():
FILE: delfin/api/v1/storages.py
class StorageController (line 41) | class StorageController(wsgi.Controller):
method __init__ (line 42) | def __init__(self):
method _get_storages_search_options (line 49) | def _get_storages_search_options(self):
method index (line 53) | def index(self, req):
method show (line 68) | def show(self, req, id):
method create (line 75) | def create(self, req, body):
method delete (line 127) | def delete(self, req, id):
method sync_all (line 141) | def sync_all(self, req):
method sync (line 171) | def sync(self, req, id):
method _storage_exist (line 187) | def _storage_exist(self, context, access_info):
method get_capabilities (line 210) | def get_capabilities(self, req, id):
function create_resource (line 229) | def create_resource():
function _set_synced_if_ok (line 234) | def _set_synced_if_ok(context, storage_id, resource_count):
function access_info_filter (line 257) | def access_info_filter(context, access_info):
FILE: delfin/api/v1/volume_groups.py
class VolumeGroupController (line 21) | class VolumeGroupController(wsgi.Controller):
method __init__ (line 23) | def __init__(self):
method _get_volume_group_search_options (line 28) | def _get_volume_group_search_options(self):
method show (line 32) | def show(self, req, id):
function create_resource (line 64) | def create_resource():
FILE: delfin/api/v1/volumes.py
class VolumeController (line 21) | class VolumeController(wsgi.Controller):
method __init__ (line 23) | def __init__(self):
method _get_volumes_search_options (line 28) | def _get_volumes_search_options(self):
method index (line 32) | def index(self, req):
method show (line 47) | def show(self, req, id):
function create_resource (line 53) | def create_resource():
FILE: delfin/api/validation/__init__.py
function schema (line 30) | def schema(request_body_schema):
function validate_capabilities (line 51) | def validate_capabilities(capabilities):
FILE: delfin/api/validation/parameter_types.py
class ValidationRegex (line 29) | class ValidationRegex(object):
method __init__ (line 30) | def __init__(self, regex, reason):
function _is_printable (line 35) | def _is_printable(char):
function _get_all_chars (line 49) | def _get_all_chars():
function _build_regex_range (line 62) | def _build_regex_range(ws=True, invert=False, exclude=None):
FILE: delfin/api/validation/validators.py
function _soft_validate_additional_properties (line 35) | def _soft_validate_additional_properties(
function _validate_string_length (line 88) | def _validate_string_length(value, entity_name, mandatory=False,
function _validate_datetime_format (line 117) | def _validate_datetime_format(param_value):
function _validate_name (line 127) | def _validate_name(param_value):
function _validate_name_skip_leading_trailing_spaces (line 139) | def _validate_name_skip_leading_trailing_spaces(param_value):
function _validate_uuid_format (line 154) | def _validate_uuid_format(instance):
class FormatChecker (line 158) | class FormatChecker(jsonschema.FormatChecker):
method check (line 166) | def check(self, param_value, format):
class _SchemaValidator (line 193) | class _SchemaValidator(object):
method __init__ (line 206) | def __init__(self, schema, relax_additional_properties=False):
method validate (line 220) | def validate(self, *args, **kwargs):
method _number_from_str (line 239) | def _number_from_str(self, param_value):
method _validate_minimum (line 249) | def _validate_minimum(self, validator, minimum, param_value, schema):
method _validate_maximum (line 256) | def _validate_maximum(self, validator, maximum, param_value, schema):
FILE: delfin/api/views/access_info.py
class ViewBuilder (line 18) | class ViewBuilder(object):
method show (line 20) | def show(self, access_info):
method show_all (line 27) | def show_all(self, access_infos):
FILE: delfin/api/views/alert_source.py
function build_alert_source (line 18) | def build_alert_source(value):
function show_all_snmp_configs (line 38) | def show_all_snmp_configs(values):
FILE: delfin/api/views/alerts.py
function build_alerts (line 17) | def build_alerts(alerts):
function build_alert (line 24) | def build_alert(alert):
FILE: delfin/api/views/controllers.py
function build_controllers (line 17) | def build_controllers(controllers):
function build_controller (line 24) | def build_controller(controller):
FILE: delfin/api/views/disks.py
function build_disks (line 17) | def build_disks(disks):
function build_disk (line 24) | def build_disk(disk):
FILE: delfin/api/views/filesystems.py
function build_filesystems (line 17) | def build_filesystems(filesystems):
function build_filesystem (line 24) | def build_filesystem(filesystem):
FILE: delfin/api/views/masking_views.py
function build_masking_views (line 17) | def build_masking_views(masking_views):
function build_masking_view (line 24) | def build_masking_view(masking_view):
FILE: delfin/api/views/port_groups.py
function build_port_groups (line 17) | def build_port_groups(port_groups):
function build_port_group (line 24) | def build_port_group(port_group):
FILE: delfin/api/views/ports.py
function build_ports (line 17) | def build_ports(ports):
function build_port (line 24) | def build_port(port):
FILE: delfin/api/views/qtrees.py
function build_qtrees (line 17) | def build_qtrees(qtrees):
function build_qtree (line 24) | def build_qtree(qtree):
FILE: delfin/api/views/quotas.py
function build_quotas (line 17) | def build_quotas(quotas):
function build_quota (line 24) | def build_quota(quota):
FILE: delfin/api/views/shares.py
function build_shares (line 17) | def build_shares(shares):
function build_share (line 24) | def build_share(share):
FILE: delfin/api/views/storage_host_groups.py
function build_storage_host_groups (line 17) | def build_storage_host_groups(storage_host_groups):
function build_storage_host_group (line 24) | def build_storage_host_group(storage_host_group):
FILE: delfin/api/views/storage_host_initiators.py
function build_storage_host_initiators (line 17) | def build_storage_host_initiators(storage_host_initiators):
function build_storage_host_initiator (line 24) | def build_storage_host_initiator(storage_host_initiator):
FILE: delfin/api/views/storage_hosts.py
function build_storage_hosts (line 17) | def build_storage_hosts(storage_hosts):
function build_storage_host (line 24) | def build_storage_host(storage_host):
FILE: delfin/api/views/storage_pools.py
function build_storage_pools (line 17) | def build_storage_pools(storage_pools):
function build_storage_pool (line 24) | def build_storage_pool(storage_pool):
FILE: delfin/api/views/storages.py
function build_storages (line 19) | def build_storages(storages):
function build_storage (line 26) | def build_storage(storage):
function build_capabilities (line 35) | def build_capabilities(storage_info, capabilities):
FILE: delfin/api/views/volume_groups.py
function build_volume_groups (line 17) | def build_volume_groups(volume_groups):
function build_volume_group (line 24) | def build_volume_group(volume_group):
FILE: delfin/api/views/volumes.py
function build_volumes (line 17) | def build_volumes(volumes):
function build_volume (line 24) | def build_volume(volume):
FILE: delfin/cmd/alert.py
function main (line 38) | def main():
FILE: delfin/cmd/api.py
function main (line 38) | def main():
FILE: delfin/cmd/task.py
function main (line 39) | def main():
FILE: delfin/common/alert_util.py
function fill_storage_attributes (line 24) | def fill_storage_attributes(alert_model, storage):
function is_alert_in_time_range (line 33) | def is_alert_in_time_range(query_para, occur_time):
FILE: delfin/common/config.py
function set_middleware_defaults (line 158) | def set_middleware_defaults():
FILE: delfin/common/constants.py
class StorageStatus (line 28) | class StorageStatus(object):
class StoragePoolStatus (line 38) | class StoragePoolStatus(object):
class VolumeStatus (line 48) | class VolumeStatus(object):
class StorageType (line 55) | class StorageType(object):
class SyncStatus (line 63) | class SyncStatus(object):
class VolumeType (line 67) | class VolumeType(object):
class PortConnectionStatus (line 74) | class PortConnectionStatus(object):
class PortHealthStatus (line 82) | class PortHealthStatus(object):
class PortType (line 90) | class PortType(object):
class PortLogicalType (line 112) | class PortLogicalType(object):
class DiskStatus (line 135) | class DiskStatus(object):
class DiskPhysicalType (line 144) | class DiskPhysicalType(object):
class DiskLogicalType (line 166) | class DiskLogicalType(object):
class FilesystemStatus (line 190) | class FilesystemStatus(object):
class WORMType (line 197) | class WORMType(object):
class NASSecurityMode (line 206) | class NASSecurityMode(object):
class QuotaType (line 215) | class QuotaType(object):
class FSType (line 223) | class FSType(object):
class ShareProtocol (line 230) | class ShareProtocol(object):
class Severity (line 240) | class Severity(object):
class Category (line 251) | class Category(object):
class ClearType (line 259) | class ClearType(object):
class ControllerStatus (line 264) | class ControllerStatus(object):
class InitiatorType (line 274) | class InitiatorType(object):
class EventType (line 286) | class EventType(object):
class SecurityLevel (line 336) | class SecurityLevel(object):
class ResourceType (line 347) | class ResourceType(object):
class ResourceSync (line 375) | class ResourceSync(object):
class TelemetryCollection (line 381) | class TelemetryCollection(object):
class TelemetryTaskStatus (line 398) | class TelemetryTaskStatus(object):
class TelemetryJobStatus (line 404) | class TelemetryJobStatus(object):
class MetricUnit (line 414) | class MetricUnit:
class Metrics (line 424) | class Metrics:
class StorageMetric (line 485) | class StorageMetric:
class StoragePoolMetric (line 504) | class StoragePoolMetric:
class VolumeMetric (line 523) | class VolumeMetric:
class ControllerMetric (line 542) | class ControllerMetric:
class PortMetric (line 562) | class PortMetric:
class DiskMetric (line 581) | class DiskMetric:
class FileSystemMetric (line 597) | class FileSystemMetric:
class HostStatus (line 615) | class HostStatus(object):
class HostOSTypes (line 624) | class HostOSTypes(object):
class InitiatorStatus (line 644) | class InitiatorStatus(object):
FILE: delfin/common/sqlalchemyutils.py
function _get_default_column_value (line 44) | def _get_default_column_value(model, column_name):
function paginate_query (line 63) | def paginate_query(query, model, limit, sort_keys, marker=None,
FILE: delfin/context.py
class RequestContext (line 30) | class RequestContext(context.RequestContext):
method __init__ (line 37) | def __init__(self, user_id=None, project_id=None, is_admin=None,
method _get_read_deleted (line 91) | def _get_read_deleted(self):
method _set_read_deleted (line 94) | def _set_read_deleted(self, read_deleted):
method _del_read_deleted (line 100) | def _del_read_deleted(self):
method to_dict (line 106) | def to_dict(self):
method from_dict (line 121) | def from_dict(cls, values):
method elevated (line 124) | def elevated(self, read_deleted=None, overwrite=False):
function get_admin_context (line 138) | def get_admin_context(read_deleted="no"):
FILE: delfin/coordination.py
class Coordinator (line 60) | class Coordinator(object):
method __init__ (line 71) | def __init__(self, agent_id=None, prefix=''):
method start (line 77) | def start(self):
method stop (line 96) | def stop(self):
method get_lock (line 107) | def get_lock(self, name):
class LeaderElectionCoordinator (line 124) | class LeaderElectionCoordinator(Coordinator):
method __init__ (line 126) | def __init__(self, agent_id=None):
method start (line 131) | def start(self):
method ensure_group (line 149) | def ensure_group(self, group):
method join_group (line 166) | def join_group(self):
method register_on_start_leading_callback (line 171) | def register_on_start_leading_callback(self, callback):
method send_heartbeat (line 174) | def send_heartbeat(self):
method start_leader_watch (line 177) | def start_leader_watch(self):
method stop (line 180) | def stop(self):
method is_still_leader (line 190) | def is_still_leader(self):
class Lock (line 196) | class Lock(locking.Lock):
method __init__ (line 217) | def __init__(self, lock_name, lock_data=None, coordinator=None):
method _prepare_lock (line 224) | def _prepare_lock(self, lock_name, lock_data):
method acquire (line 229) | def acquire(self, blocking=None):
method release (line 241) | def release(self):
function synchronized (line 250) | def synchronized(lock_name, blocking=True, coordinator=None):
function _get_redis_backend_url (line 305) | def _get_redis_backend_url():
class ConsistentHashing (line 327) | class ConsistentHashing(Coordinator):
method __init__ (line 331) | def __init__(self):
method join_group (line 335) | def join_group(self):
method get_task_executor (line 344) | def get_task_executor(self, task_id):
method register_watcher_func (line 351) | def register_watcher_func(self, on_node_join, on_node_leave):
method watch_group_change (line 355) | def watch_group_change(self):
class GroupMembership (line 359) | class GroupMembership(Coordinator):
method __init__ (line 361) | def __init__(self, agent_id):
method create_group (line 365) | def create_group(self, group):
method delete_group (line 371) | def delete_group(self, group):
method join_group (line 381) | def join_group(self, group):
method leave_group (line 387) | def leave_group(self, group):
method get_members (line 393) | def get_members(self, group):
method register_watcher_func (line 401) | def register_watcher_func(self, group, on_process_join, on_process_lea...
method watch_group_change (line 405) | def watch_group_change(self):
FILE: delfin/cryptor.py
class ICryptor (line 24) | class ICryptor(metaclass=ABCMeta):
method encode (line 28) | def encode(plain_text):
method decode (line 33) | def decode(cipher_text):
class _Base64 (line 37) | class _Base64(ICryptor):
method encode (line 40) | def encode(data):
method decode (line 51) | def decode(data):
function encode (line 65) | def encode(plain_text):
function decode (line 69) | def decode(cipher_text):
FILE: delfin/db/api.py
function register_db (line 61) | def register_db():
function storage_get (line 66) | def storage_get(context, storage_id):
function storage_get_all (line 71) | def storage_get_all(context, marker=None, limit=None, sort_keys=None,
function storage_create (line 96) | def storage_create(context, values):
function storage_update (line 101) | def storage_update(context, storage_id, values):
function storage_delete (line 106) | def storage_delete(context, storage_id):
function volume_create (line 111) | def volume_create(context, values):
function volumes_create (line 116) | def volumes_create(context, values):
function volume_update (line 121) | def volume_update(context, volume_id, values):
function volumes_update (line 126) | def volumes_update(context, values):
function volumes_delete (line 131) | def volumes_delete(context, values):
function volume_get (line 136) | def volume_get(context, volume_id):
function volume_get_all (line 141) | def volume_get_all(context, marker=None, limit=None, sort_keys=None,
function volume_delete_by_storage (line 166) | def volume_delete_by_storage(context, storage_id):
function storage_pool_create (line 171) | def storage_pool_create(context, storage_pool):
function storage_pools_create (line 176) | def storage_pools_create(context, storage_pools):
function storage_pool_update (line 181) | def storage_pool_update(context, storage_pool_id, storage_pool):
function storage_pools_update (line 186) | def storage_pools_update(context, storage_pools):
function storage_pools_delete (line 191) | def storage_pools_delete(context, storage_pools):
function storage_pool_get (line 196) | def storage_pool_get(context, storage_pool_id):
function storage_pool_get_all (line 201) | def storage_pool_get_all(context, marker=None, limit=None, sort_keys=None,
function storage_pool_delete_by_storage (line 226) | def storage_pool_delete_by_storage(context, storage_id):
function controllers_create (line 231) | def controllers_create(context, values):
function controllers_update (line 236) | def controllers_update(context, values):
function controllers_delete (line 241) | def controllers_delete(context, values):
function controller_create (line 246) | def controller_create(context, values):
function controller_update (line 251) | def controller_update(context, controller_id, values):
function controller_get (line 256) | def controller_get(context, controller_id):
function controller_delete_by_storage (line 261) | def controller_delete_by_storage(context, storage_id):
function controller_get_all (line 266) | def controller_get_all(context, marker=None, limit=None, sort_keys=None,
function ports_create (line 289) | def ports_create(context, values):
function ports_update (line 294) | def ports_update(context, values):
function ports_delete (line 299) | def ports_delete(context, values):
function port_create (line 304) | def port_create(context, values):
function port_update (line 309) | def port_update(context, port_id, values):
function port_get (line 314) | def port_get(context, port_id):
function port_delete_by_storage (line 319) | def port_delete_by_storage(context, storage_id):
function port_get_all (line 324) | def port_get_all(context, marker=None, limit=None, sort_keys=None,
function disks_create (line 347) | def disks_create(context, values):
function disks_update (line 352) | def disks_update(context, values):
function disks_delete (line 357) | def disks_delete(context, values):
function disk_create (line 362) | def disk_create(context, values):
function disk_update (line 367) | def disk_update(context, disk_id, values):
function disk_get (line 372) | def disk_get(context, disk_id):
function disk_delete_by_storage (line 377) | def disk_delete_by_storage(context, storage_id):
function disk_get_all (line 382) | def disk_get_all(context, marker=None, limit=None, sort_keys=None,
function filesystems_create (line 407) | def filesystems_create(context, values):
function filesystems_update (line 412) | def filesystems_update(context, values):
function filesystems_delete (line 417) | def filesystems_delete(context, values):
function filesystem_create (line 422) | def filesystem_create(context, values):
function filesystem_update (line 427) | def filesystem_update(context, filesystem_id, values):
function filesystem_get (line 432) | def filesystem_get(context, filesystem_id):
function filesystem_delete_by_storage (line 437) | def filesystem_delete_by_storage(context, storage_id):
function filesystem_get_all (line 442) | def filesystem_get_all(context, marker=None, limit=None, sort_keys=None,
function quotas_create (line 465) | def quotas_create(context, values):
function quotas_update (line 470) | def quotas_update(context, values):
function quotas_delete (line 475) | def quotas_delete(context, values):
function quota_create (line 480) | def quota_create(context, values):
function quota_update (line 485) | def quota_update(context, quota_id, values):
function quota_get (line 490) | def quota_get(context, quota_id):
function quota_delete_by_storage (line 495) | def quota_delete_by_storage(context, storage_id):
function quota_get_all (line 500) | def quota_get_all(context, marker=None, limit=None, sort_keys=None,
function qtrees_create (line 523) | def qtrees_create(context, values):
function qtrees_update (line 528) | def qtrees_update(context, values):
function qtrees_delete (line 533) | def qtrees_delete(context, values):
function qtree_create (line 538) | def qtree_create(context, values):
function qtree_update (line 543) | def qtree_update(context, qtree_id, values):
function qtree_get (line 548) | def qtree_get(context, qtree_id):
function qtree_delete_by_storage (line 553) | def qtree_delete_by_storage(context, storage_id):
function qtree_get_all (line 558) | def qtree_get_all(context, marker=None, limit=None, sort_keys=None,
function shares_create (line 581) | def shares_create(context, values):
function shares_update (line 586) | def shares_update(context, values):
function shares_delete (line 591) | def shares_delete(context, values):
function share_create (line 596) | def share_create(context, values):
function share_update (line 601) | def share_update(context, share_id, values):
function share_get (line 606) | def share_get(context, share_id):
function share_delete_by_storage (line 611) | def share_delete_by_storage(context, storage_id):
function share_get_all (line 616) | def share_get_all(context, marker=None, limit=None, sort_keys=None,
function access_info_create (line 639) | def access_info_create(context, values):
function access_info_update (line 646) | def access_info_update(context, storage_id, values):
function access_info_get (line 651) | def access_info_get(context, storage_id):
function access_info_delete (line 656) | def access_info_delete(context, storage_id):
function access_info_get_all (line 661) | def access_info_get_all(context, marker=None, limit=None, sort_keys=None,
function is_orm_value (line 686) | def is_orm_value(obj):
function alert_source_create (line 691) | def alert_source_create(context, values):
function alert_source_update (line 696) | def alert_source_update(context, storage_id, values):
function alert_source_get (line 701) | def alert_source_get(context, storage_id):
function alert_source_delete (line 706) | def alert_source_delete(context, storage_id):
function alert_source_get_all (line 711) | def alert_source_get_all(context, marker=None, limit=None, sort_keys=None,
function task_create (line 735) | def task_create(context, values):
function task_update (line 740) | def task_update(context, task_id, values):
function task_get (line 745) | def task_get(context, task_id):
function task_get_all (line 750) | def task_get_all(context, marker=None, limit=None, sort_keys=None,
function task_delete_by_storage (line 773) | def task_delete_by_storage(context, storage_id):
function task_delete (line 780) | def task_delete(context, task_id):
function failed_task_create (line 787) | def failed_task_create(context, values):
function failed_task_update (line 792) | def failed_task_update(context, failed_task_id, values):
function failed_task_get (line 797) | def failed_task_get(context, failed_task_id):
function failed_task_get_all (line 802) | def failed_task_get_all(context, marker=None, limit=None, sort_keys=None,
function failed_task_delete_by_task_id (line 825) | def failed_task_delete_by_task_id(context, task_id):
function failed_task_delete (line 832) | def failed_task_delete(context, failed_task_id):
function failed_task_delete_by_storage (line 839) | def failed_task_delete_by_storage(context, storage_id):
function storage_host_initiators_create (line 846) | def storage_host_initiators_create(context, values):
function storage_host_initiators_update (line 851) | def storage_host_initiators_update(context, values):
function storage_host_initiators_delete (line 856) | def storage_host_initiators_delete(context, values):
function storage_host_initiators_get (line 861) | def storage_host_initiators_get(context, storage_host_initiator_id):
function storage_host_initiators_get_all (line 868) | def storage_host_initiators_get_all(context, marker=None, limit=None,
function storage_host_initiators_delete_by_storage (line 895) | def storage_host_initiators_delete_by_storage(context, storage_id):
function storage_hosts_create (line 900) | def storage_hosts_create(context, values):
function storage_hosts_update (line 905) | def storage_hosts_update(context, values):
function storage_hosts_delete (line 910) | def storage_hosts_delete(context, values):
function storage_hosts_get (line 915) | def storage_hosts_get(context, storage_host_id):
function storage_hosts_get_all (line 920) | def storage_hosts_get_all(context, marker=None, limit=None, sort_keys=None,
function storage_hosts_delete_by_storage (line 945) | def storage_hosts_delete_by_storage(context, storage_id):
function storage_host_groups_create (line 950) | def storage_host_groups_create(context, values):
function storage_host_groups_update (line 955) | def storage_host_groups_update(context, values):
function storage_host_groups_delete (line 960) | def storage_host_groups_delete(context, values):
function storage_host_groups_get (line 965) | def storage_host_groups_get(context, storage_host_grp_id):
function storage_host_groups_get_all (line 970) | def storage_host_groups_get_all(context, marker=None, limit=None,
function storage_host_groups_delete_by_storage (line 996) | def storage_host_groups_delete_by_storage(context, storage_id):
function port_groups_create (line 1001) | def port_groups_create(context, values):
function port_groups_update (line 1006) | def port_groups_update(context, values):
function port_groups_delete (line 1011) | def port_groups_delete(context, values):
function port_groups_get (line 1016) | def port_groups_get(context, port_grp_id):
function port_groups_get_all (line 1021) | def port_groups_get_all(context, marker=None, limit=None,
function port_groups_delete_by_storage (line 1047) | def port_groups_delete_by_storage(context, storage_id):
function volume_groups_create (line 1052) | def volume_groups_create(context, values):
function volume_groups_update (line 1057) | def volume_groups_update(context, values):
function volume_groups_delete (line 1062) | def volume_groups_delete(context, values):
function volume_groups_get (line 1067) | def volume_groups_get(context, volume_grp_id):
function volume_groups_get_all (line 1072) | def volume_groups_get_all(context, marker=None, limit=None,
function volume_groups_delete_by_storage (line 1098) | def volume_groups_delete_by_storage(context, storage_id):
function masking_views_create (line 1103) | def masking_views_create(context, values):
function masking_views_update (line 1108) | def masking_views_update(context, values):
function masking_views_delete (line 1113) | def masking_views_delete(context, values):
function masking_views_get (line 1118) | def masking_views_get(context, masking_view_id):
function masking_views_get_all (line 1123) | def masking_views_get_all(context, marker=None, limit=None,
function masking_views_delete_by_storage (line 1149) | def masking_views_delete_by_storage(context, storage_id):
function storage_host_grp_host_rels_create (line 1154) | def storage_host_grp_host_rels_create(context, values):
function storage_host_grp_host_rels_update (line 1161) | def storage_host_grp_host_rels_update(context, values):
function storage_host_grp_host_rels_delete (line 1166) | def storage_host_grp_host_rels_delete(context, values):
function storage_host_grp_host_rels_get (line 1171) | def storage_host_grp_host_rels_get(context, host_grp_host_relation_id):
function storage_host_grp_host_rels_get_all (line 1179) | def storage_host_grp_host_rels_get_all(context, marker=None, limit=None,
function storage_host_grp_host_rels_delete_by_storage (line 1209) | def storage_host_grp_host_rels_delete_by_storage(context, storage_id):
function port_grp_port_rels_create (line 1215) | def port_grp_port_rels_create(context, values):
function port_grp_port_rels_update (line 1222) | def port_grp_port_rels_update(context, values):
function port_grp_port_rels_delete (line 1227) | def port_grp_port_rels_delete(context, values):
function port_grp_port_rels_get (line 1232) | def port_grp_port_rels_get(context, port_grp_port_relation_id):
function port_grp_port_rels_get_all (line 1240) | def port_grp_port_rels_get_all(context, marker=None, limit=None,
function port_grp_port_rels_delete_by_storage (line 1270) | def port_grp_port_rels_delete_by_storage(context, storage_id):
function vol_grp_vol_rels_create (line 1276) | def vol_grp_vol_rels_create(context, values):
function vol_grp_vol_rels_update (line 1283) | def vol_grp_vol_rels_update(context, values):
function vol_grp_vol_rels_delete (line 1288) | def vol_grp_vol_rels_delete(context, values):
function vol_grp_vol_rels_get (line 1293) | def vol_grp_vol_rels_get(context, volume_grp_volume_relation_id):
function vol_grp_vol_rels_get_all (line 1301) | def vol_grp_vol_rels_get_all(context, marker=None, limit=None,
function vol_grp_vol_rels_delete_by_storage (line 1331) | def vol_grp_vol_rels_delete_by_storage(context, storage_id):
FILE: delfin/db/base.py
class Base (line 31) | class Base(object):
method __init__ (line 34) | def __init__(self, db_driver=None):
FILE: delfin/db/sqlalchemy/api.py
function apply_sorting (line 49) | def apply_sorting(model, query, sort_key, sort_dir):
function get_engine (line 61) | def get_engine():
function get_session (line 66) | def get_session(**kwargs):
function _create_facade_lazily (line 71) | def _create_facade_lazily():
function get_backend (line 78) | def get_backend():
function register_db (line 83) | def register_db():
function _process_model_like_filter (line 93) | def _process_model_like_filter(model, query, filters):
function apply_like_filters (line 116) | def apply_like_filters(model):
function is_valid_model_filters (line 135) | def is_valid_model_filters(model, filters, exclude_list=None):
function access_info_create (line 158) | def access_info_create(context, values):
function access_info_update (line 175) | def access_info_update(context, storage_id, values):
function access_info_delete (line 183) | def access_info_delete(context, storage_id):
function access_info_get (line 189) | def access_info_get(context, storage_id):
function _access_info_get (line 194) | def _access_info_get(context, storage_id, session=None):
function _access_info_get_query (line 205) | def _access_info_get_query(context, session=None):
function access_info_get_all (line 209) | def access_info_get_all(context, marker=None, limit=None, sort_keys=None,
function _process_access_info_filters (line 224) | def _process_access_info_filters(query, filters):
function storage_create (line 234) | def storage_create(context, values):
function storage_update (line 251) | def storage_update(context, storage_id, values):
function storage_get (line 260) | def storage_get(context, storage_id):
function _storage_get (line 265) | def _storage_get(context, storage_id, session=None):
function _storage_get_query (line 276) | def _storage_get_query(context, session=None):
function storage_get_all (line 288) | def storage_get_all(context, marker=None, limit=None, sort_keys=None,
function _process_storage_info_filters (line 304) | def _process_storage_info_filters(query, filters):
function storage_delete (line 313) | def storage_delete(context, storage_id):
function _volume_get_query (line 319) | def _volume_get_query(context, session=None):
function _volume_get (line 323) | def _volume_get(context, volume_id, session=None):
function volume_create (line 334) | def volume_create(context, values):
function volumes_create (line 351) | def volumes_create(context, volumes):
function volumes_delete (line 372) | def volumes_delete(context, volumes_id_list):
function volume_update (line 386) | def volume_update(context, vol_id, values):
function volumes_update (line 394) | def volumes_update(context, volumes):
function volume_get (line 408) | def volume_get(context, volume_id):
function volume_get_all (line 413) | def volume_get_all(context, marker=None, limit=None, sort_keys=None,
function _process_volume_info_filters (line 429) | def _process_volume_info_filters(query, filters):
function volume_delete_by_storage (line 439) | def volume_delete_by_storage(context, storage_id):
function _storage_pool_get_query (line 444) | def _storage_pool_get_query(context, session=None):
function _storage_pool_get (line 448) | def _storage_pool_get(context, storage_pool_id, session=None):
function storage_pool_create (line 459) | def storage_pool_create(context, values):
function storage_pools_create (line 476) | def storage_pools_create(context, storage_pools):
function storage_pools_delete (line 497) | def storage_pools_delete(context, storage_pools_id_list):
function storage_pool_update (line 512) | def storage_pool_update(context, storage_pool_id, values):
function storage_pools_update (line 526) | def storage_pools_update(context, storage_pools):
function storage_pool_get (line 549) | def storage_pool_get(context, storage_pool_id):
function storage_pool_get_all (line 554) | def storage_pool_get_all(context, marker=None, limit=None, sort_keys=None,
function storage_pool_delete_by_storage (line 570) | def storage_pool_delete_by_storage(context, storage_id):
function _process_storage_pool_info_filters (line 576) | def _process_storage_pool_info_filters(query, filters):
function controllers_create (line 586) | def controllers_create(context, controllers):
function controllers_update (line 607) | def controllers_update(context, controllers):
function controllers_delete (line 630) | def controllers_delete(context, controllers_id_list):
function _controller_get_query (line 645) | def _controller_get_query(context, session=None):
function _controller_get (line 649) | def _controller_get(context, controller_id, session=None):
function controller_create (line 660) | def controller_create(context, values):
function controller_update (line 677) | def controller_update(context, controller_id, values):
function controller_get (line 691) | def controller_get(context, controller_id):
function controller_delete_by_storage (line 696) | def controller_delete_by_storage(context, storage_id):
function controller_get_all (line 701) | def controller_get_all(context, marker=None, limit=None, sort_keys=None,
function _process_controller_info_filters (line 718) | def _process_controller_info_filters(query, filters):
function ports_create (line 728) | def ports_create(context, ports):
function ports_update (line 749) | def ports_update(context, ports):
function ports_delete (line 772) | def ports_delete(context, ports_id_list):
function _port_get_query (line 786) | def _port_get_query(context, session=None):
function _port_get (line 790) | def _port_get(context, port_id, session=None):
function port_create (line 801) | def port_create(context, values):
function port_update (line 818) | def port_update(context, port_id, values):
function port_get (line 832) | def port_get(context, port_id):
function port_delete_by_storage (line 837) | def port_delete_by_storage(context, storage_id):
function port_get_all (line 842) | def port_get_all(context, marker=None, limit=None, sort_keys=None,
function _process_port_info_filters (line 860) | def _process_port_info_filters(query, filters):
function disks_create (line 870) | def disks_create(context, disks):
function disks_update (line 891) | def disks_update(context, disks):
function disks_delete (line 914) | def disks_delete(context, disks_id_list):
function _disk_get_query (line 929) | def _disk_get_query(context, session=None):
function _disk_get (line 933) | def _disk_get(context, disk_id, session=None):
function disk_create (line 944) | def disk_create(context, values):
function disk_update (line 961) | def disk_update(context, disk_id, values):
function disk_get (line 975) | def disk_get(context, disk_id):
function disk_delete_by_storage (line 980) | def disk_delete_by_storage(context, storage_id):
function disk_get_all (line 985) | def disk_get_all(context, marker=None, limit=None, sort_keys=None,
function _process_disk_info_filters (line 1003) | def _process_disk_info_filters(query, filters):
function filesystems_create (line 1013) | def filesystems_create(context, filesystems):
function filesystems_update (line 1034) | def filesystems_update(context, filesystems):
function filesystems_delete (line 1057) | def filesystems_delete(context, filesystems_id_list):
function _filesystem_get_query (line 1071) | def _filesystem_get_query(context, session=None):
function _filesystem_get (line 1075) | def _filesystem_get(context, filesystem_id, session=None):
function filesystem_create (line 1086) | def filesystem_create(context, values):
function filesystem_update (line 1103) | def filesystem_update(context, filesystem_id, values):
function filesystem_get (line 1117) | def filesystem_get(context, filesystem_id):
function filesystem_delete_by_storage (line 1122) | def filesystem_delete_by_storage(context, storage_id):
function filesystem_get_all (line 1127) | def filesystem_get_all(context, marker=None, limit=None, sort_keys=None,
function _process_filesystem_info_filters (line 1145) | def _process_filesystem_info_filters(query, filters):
function quotas_create (line 1155) | def quotas_create(context, quotas):
function quotas_update (line 1176) | def quotas_update(context, quotas):
function quotas_delete (line 1199) | def quotas_delete(context, quotas_id_list):
function _quota_get_query (line 1213) | def _quota_get_query(context, session=None):
function _quota_get (line 1217) | def _quota_get(context, quota_id, session=None):
function quota_create (line 1228) | def quota_create(context, values):
function quota_update (line 1245) | def quota_update(context, quota_id, values):
function quota_get (line 1259) | def quota_get(context, quota_id):
function quota_delete_by_storage (line 1264) | def quota_delete_by_storage(context, storage_id):
function quota_get_all (line 1269) | def quota_get_all(context, marker=None, limit=None, sort_keys=None,
function _process_quota_info_filters (line 1287) | def _process_quota_info_filters(query, filters):
function qtrees_create (line 1297) | def qtrees_create(context, qtrees):
function qtrees_update (line 1318) | def qtrees_update(context, qtrees):
function qtrees_delete (line 1341) | def qtrees_delete(context, qtrees_id_list):
function _qtree_get_query (line 1355) | def _qtree_get_query(context, session=None):
function _qtree_get (line 1359) | def _qtree_get(context, qtree_id, session=None):
function qtree_create (line 1370) | def qtree_create(context, values):
function qtree_update (line 1387) | def qtree_update(context, qtree_id, values):
function qtree_get (line 1401) | def qtree_get(context, qtree_id):
function qtree_delete_by_storage (line 1406) | def qtree_delete_by_storage(context, storage_id):
function qtree_get_all (line 1411) | def qtree_get_all(context, marker=None, limit=None, sort_keys=None,
function _process_qtree_info_filters (line 1429) | def _process_qtree_info_filters(query, filters):
function shares_create (line 1439) | def shares_create(context, shares):
function shares_update (line 1460) | def shares_update(context, shares):
function shares_delete (line 1483) | def shares_delete(context, shares_id_list):
function _share_get_query (line 1497) | def _share_get_query(context, session=None):
function _share_get (line 1501) | def _share_get(context, share_id, session=None):
function share_create (line 1512) | def share_create(context, values):
function share_update (line 1529) | def share_update(context, share_id, values):
function share_get (line 1543) | def share_get(context, share_id):
function share_delete_by_storage (line 1548) | def share_delete_by_storage(context, storage_id):
function share_get_all (line 1553) | def share_get_all(context, marker=None, limit=None, sort_keys=None,
function _process_share_info_filters (line 1571) | def _process_share_info_filters(query, filters):
function is_orm_value (line 1581) | def is_orm_value(obj):
function model_query (line 1587) | def model_query(context, model, *args, **kwargs):
function alert_source_get (line 1599) | def alert_source_get(context, storage_id):
function _alert_source_get (line 1604) | def _alert_source_get(context, storage_id, session=None):
function _alert_source_get_query (line 1615) | def _alert_source_get_query(context, session=None):
function _process_alert_source_filters (line 1620) | def _process_alert_source_filters(query, filters):
function alert_source_create (line 1630) | def alert_source_create(context, values):
function alert_source_update (line 1644) | def alert_source_update(context, storage_id, values):
function alert_source_delete (line 1652) | def alert_source_delete(context, storage_id):
function alert_source_get_all (line 1666) | def alert_source_get_all(context, marker=None, limit=None, sort_keys=None,
function task_create (line 1678) | def task_create(context, values):
function task_update (line 1690) | def task_update(context, tasks_id, values):
function _task_get (line 1704) | def _task_get(context, task_id, session=None):
function _task_get_query (line 1715) | def _task_get_query(context, session=None):
function task_get (line 1719) | def task_get(context, tasks_id):
function task_delete_by_storage (line 1724) | def task_delete_by_storage(context, storage_id):
function task_delete (line 1731) | def task_delete(context, tasks_id):
function task_get_all (line 1736) | def task_get_all(context, marker=None, limit=None, sort_keys=None,
function _process_tasks_info_filters (line 1753) | def _process_tasks_info_filters(query, filters):
function failed_task_create (line 1763) | def failed_task_create(context, values):
function failed_task_update (line 1775) | def failed_task_update(context, failed_task_id, values):
function _failed_tasks_get (line 1789) | def _failed_tasks_get(context, failed_task_id, session=None):
function _failed_tasks_get_query (line 1800) | def _failed_tasks_get_query(context, session=None):
function failed_task_get (line 1804) | def failed_task_get(context, failed_task_id):
function failed_task_delete_by_task_id (line 1809) | def failed_task_delete_by_task_id(context, task_id):
function failed_task_delete_by_storage (line 1815) | def failed_task_delete_by_storage(context, storage_id):
function failed_task_delete (line 1822) | def failed_task_delete(context, failed_task_id):
function failed_task_get_all (line 1827) | def failed_task_get_all(context, marker=None, limit=None, sort_keys=None,
function _process_failed_tasks_info_filters (line 1844) | def _process_failed_tasks_info_filters(query, filters):
function _storage_host_initiators_get_query (line 1854) | def _storage_host_initiators_get_query(context, session=None):
function _storage_host_initiators_get (line 1858) | def _storage_host_initiators_get(context, storage_host_initiator_id,
function storage_host_initiators_create (line 1870) | def storage_host_initiators_create(context, storage_host_initiators):
function storage_host_initiators_delete (line 1893) | def storage_host_initiators_delete(context, storage_host_initiators_id_l...
function storage_host_initiators_update (line 1908) | def storage_host_initiators_update(context, storage_host_initiators):
function storage_host_initiators_get (line 1924) | def storage_host_initiators_get(context, storage_host_initiator_id):
function storage_host_initiators_get_all (line 1931) | def storage_host_initiators_get_all(context, marker=None, limit=None,
function _process_storage_host_initiators_info_filters (line 1950) | def _process_storage_host_initiators_info_filters(query, filters):
function storage_host_initiators_delete_by_storage (line 1960) | def storage_host_initiators_delete_by_storage(context, storage_id):
function _storage_hosts_get_query (line 1966) | def _storage_hosts_get_query(context, session=None):
function _storage_hosts_get (line 1970) | def _storage_hosts_get(context, storage_host_id, session=None):
function storage_hosts_create (line 1981) | def storage_hosts_create(context, storage_hosts):
function storage_hosts_delete (line 2003) | def storage_hosts_delete(context, storage_hosts_id_list):
function storage_hosts_update (line 2017) | def storage_hosts_update(context, storage_hosts):
function storage_hosts_get (line 2032) | def storage_hosts_get(context, storage_host_id):
function storage_hosts_get_all (line 2037) | def storage_hosts_get_all(context, marker=None, limit=None, sort_keys=None,
function _process_storage_hosts_info_filters (line 2053) | def _process_storage_hosts_info_filters(query, filters):
function storage_hosts_delete_by_storage (line 2063) | def storage_hosts_delete_by_storage(context, storage_id):
function _storage_host_groups_get_query (line 2069) | def _storage_host_groups_get_query(context, session=None):
function _storage_host_groups_get (line 2073) | def _storage_host_groups_get(context, storage_host_grp_id, session=None):
function storage_host_groups_create (line 2084) | def storage_host_groups_create(context, storage_host_groups):
function storage_host_groups_delete (line 2106) | def storage_host_groups_delete(context, storage_host_groups_id_list):
function storage_host_groups_update (line 2120) | def storage_host_groups_update(context, storage_host_groups):
function storage_host_groups_get (line 2136) | def storage_host_groups_get(context, storage_host_group_id):
function storage_host_groups_get_all (line 2141) | def storage_host_groups_get_all(context, marker=None, limit=None,
function _process_storage_host_groups_info_filters (line 2159) | def _process_storage_host_groups_info_filters(query, filters):
function storage_host_groups_delete_by_storage (line 2169) | def storage_host_groups_delete_by_storage(context, storage_id):
function _port_groups_get_query (line 2175) | def _port_groups_get_query(context, session=None):
function _port_groups_get (line 2179) | def _port_groups_get(context, port_grp_id, session=None):
function port_groups_create (line 2190) | def port_groups_create(context, port_groups):
function port_groups_delete (line 2212) | def port_groups_delete(context, port_groups_id_list):
function port_groups_update (line 2226) | def port_groups_update(context, port_groups):
function port_groups_get (line 2242) | def port_groups_get(context, port_group_id):
function port_groups_get_all (line 2247) | def port_groups_get_all(context, marker=None, limit=None,
function _process_port_groups_info_filters (line 2265) | def _process_port_groups_info_filters(query, filters):
function port_groups_delete_by_storage (line 2275) | def port_groups_delete_by_storage(context, storage_id):
function _volume_groups_get_query (line 2280) | def _volume_groups_get_query(context, session=None):
function _volume_groups_get (line 2284) | def _volume_groups_get(context, volume_grp_id, session=None):
function volume_groups_create (line 2295) | def volume_groups_create(context, volume_groups):
function volume_groups_delete (line 2317) | def volume_groups_delete(context, volume_groups_id_list):
function volume_groups_update (line 2331) | def volume_groups_update(context, volume_groups):
function volume_groups_get (line 2347) | def volume_groups_get(context, volume_group_id):
function volume_groups_get_all (line 2352) | def volume_groups_get_all(context, marker=None, limit=None,
function _process_volume_groups_info_filters (line 2370) | def _process_volume_groups_info_filters(query, filters):
function volume_groups_delete_by_storage (line 2380) | def volume_groups_delete_by_storage(context, storage_id):
function _masking_views_get_query (line 2386) | def _masking_views_get_query(context, session=None):
function _masking_views_get (line 2390) | def _masking_views_get(context, masking_view_id, session=None):
function masking_views_create (line 2401) | def masking_views_create(context, masking_views):
function masking_views_delete (line 2423) | def masking_views_delete(context, masking_views_id_list):
function masking_views_update (line 2437) | def masking_views_update(context, masking_views):
function masking_views_get (line 2453) | def masking_views_get(context, masking_view_id):
function masking_views_get_all (line 2458) | def masking_views_get_all(context, marker=None, limit=None,
function _process_masking_views_info_filters (line 2476) | def _process_masking_views_info_filters(query, filters):
function masking_views_delete_by_storage (line 2486) | def masking_views_delete_by_storage(context, storage_id):
function _storage_host_grp_host_rels_get_query (line 2492) | def _storage_host_grp_host_rels_get_query(context, session=None):
function _storage_host_grp_host_rels_get (line 2497) | def _storage_host_grp_host_rels_get(context, host_grp_host_relation_id,
function storage_host_grp_host_rels_create (line 2510) | def storage_host_grp_host_rels_create(context,
function storage_host_grp_host_rels_delete (line 2535) | def storage_host_grp_host_rels_delete(context,
function storage_host_grp_host_rels_update (line 2553) | def storage_host_grp_host_rels_update(context,
function storage_host_grp_host_rels_get (line 2571) | def storage_host_grp_host_rels_get(context, host_grp_host_relation_id):
function storage_host_grp_host_rels_get_all (line 2579) | def storage_host_grp_host_rels_get_all(context, marker=None, limit=None,
function _process_storage_host_grp_host_rels_info_filters (line 2597) | def _process_storage_host_grp_host_rels_info_filters(query, filters):
function storage_host_grp_host_rels_delete_by_storage (line 2608) | def storage_host_grp_host_rels_delete_by_storage(context, storage_id):
function _port_grp_port_rels_get_query (line 2614) | def _port_grp_port_rels_get_query(context, session=None):
function _port_grp_port_rels_get (line 2619) | def _port_grp_port_rels_get(context, port_grp_port_relation_id,
function port_grp_port_rels_create (line 2630) | def port_grp_port_rels_create(context, port_grp_port_rels):
function port_grp_port_rels_delete (line 2654) | def port_grp_port_rels_delete(context,
function port_grp_port_rels_update (line 2671) | def port_grp_port_rels_update(context,
function port_grp_port_rels_get (line 2689) | def port_grp_port_rels_get(context, port_grp_port_relation_id):
function port_grp_port_rels_get_all (line 2697) | def port_grp_port_rels_get_all(context, marker=None, limit=None,
function _process_port_grp_port_rels_info_filters (line 2715) | def _process_port_grp_port_rels_info_filters(query, filters):
function port_grp_port_rels_delete_by_storage (line 2726) | def port_grp_port_rels_delete_by_storage(context, storage_id):
function _vol_grp_vol_rels_get_query (line 2732) | def _vol_grp_vol_rels_get_query(context, session=None):
function _vol_grp_vol_rels_get (line 2737) | def _vol_grp_vol_rels_get(context, volume_grp_volume_relation_id,
function vol_grp_vol_rels_create (line 2749) | def vol_grp_vol_rels_create(context, vol_grp_vol_rels):
function vol_grp_vol_rels_delete (line 2774) | def vol_grp_vol_rels_delete(context,
function vol_grp_vol_rels_update (line 2791) | def vol_grp_vol_rels_update(context,
function vol_grp_vol_rels_get (line 2809) | def vol_grp_vol_rels_get(context, volume_grp_volume_relation_id):
function vol_grp_vol_rels_get_all (line 2817) | def vol_grp_vol_rels_get_all(context, marker=None, limit=None,
function _process_vol_grp_vol_rels_info_filters (line 2835) | def _process_vol_grp_vol_rels_info_filters(query, filters):
function vol_grp_vol_rels_delete_by_storage (line 2846) | def vol_grp_vol_rels_delete_by_storage(context, storage_id):
function process_sort_params (line 2920) | def process_sort_params(sort_keys, sort_dirs, default_keys=None,
function _generate_paginate_query (line 2991) | def _generate_paginate_query(context, session, paginate_type, marker,
FILE: delfin/db/sqlalchemy/models.py
class DelfinBase (line 36) | class DelfinBase(models.ModelBase,
method to_dict (line 42) | def to_dict(self):
class AccessInfo (line 50) | class AccessInfo(BASE, DelfinBase):
class Storage (line 64) | class Storage(BASE, DelfinBase):
class Volume (line 87) | class Volume(BASE, DelfinBase):
class StoragePool (line 106) | class StoragePool(BASE, DelfinBase):
class Disk (line 122) | class Disk(BASE, DelfinBase):
class Controller (line 143) | class Controller(BASE, DelfinBase):
class Port (line 159) | class Port(BASE, DelfinBase):
class Filesystem (line 182) | class Filesystem(BASE, DelfinBase):
class Qtree (line 201) | class Qtree(BASE, DelfinBase):
class Quota (line 213) | class Quota(BASE, DelfinBase):
class Share (line 231) | class Share(BASE, DelfinBase):
class AlertSource (line 244) | class AlertSource(BASE, DelfinBase):
class Task (line 264) | class Task(BASE, DelfinBase):
class FailedTask (line 279) | class FailedTask(BASE, DelfinBase):
class StorageHostInitiator (line 297) | class StorageHostInitiator(BASE, DelfinBase):
class StorageHost (line 312) | class StorageHost(BASE, DelfinBase):
class StorageHostGroup (line 325) | class StorageHostGroup(BASE, DelfinBase):
class PortGroup (line 335) | class PortGroup(BASE, DelfinBase):
class VolumeGroup (line 345) | class VolumeGroup(BASE, DelfinBase):
class MaskingView (line 355) | class MaskingView(BASE, DelfinBase):
class StorageHostGrpHostRel (line 370) | class StorageHostGrpHostRel(BASE, DelfinBase):
class PortGrpPortRel (line 383) | class PortGrpPortRel(BASE, DelfinBase):
class VolGrpVolRel (line 394) | class VolGrpVolRel(BASE, DelfinBase):
FILE: delfin/drivers/api.py
class API (line 27) | class API(object):
method __init__ (line 28) | def __init__(self):
method discover_storage (line 31) | def discover_storage(self, context, access_info):
method update_access_info (line 52) | def update_access_info(self, context, access_info):
method remove_storage (line 69) | def remove_storage(self, context, storage_id):
method get_storage (line 75) | def get_storage(self, context, storage_id):
method list_storage_pools (line 80) | def list_storage_pools(self, context, storage_id):
method list_volumes (line 85) | def list_volumes(self, context, storage_id):
method list_controllers (line 90) | def list_controllers(self, context, storage_id):
method list_ports (line 96) | def list_ports(self, context, storage_id):
method list_disks (line 102) | def list_disks(self, context, storage_id):
method list_quotas (line 107) | def list_quotas(self, context, storage_id):
method list_filesystems (line 112) | def list_filesystems(self, context, storage_id):
method list_qtrees (line 117) | def list_qtrees(self, context, storage_id):
method list_shares (line 122) | def list_shares(self, context, storage_id):
method add_trap_config (line 127) | def add_trap_config(self, context, storage_id, trap_config):
method remove_trap_config (line 131) | def remove_trap_config(self, context, storage_id, trap_config):
method parse_alert (line 135) | def parse_alert(self, context, storage_id, alert):
method clear_alert (line 143) | def clear_alert(self, context, storage_id, sequence_number):
method list_alerts (line 148) | def list_alerts(self, context, storage_id, query_para=None):
method collect_perf_metrics (line 153) | def collect_perf_metrics(self, context, storage_id,
method get_capabilities (line 163) | def get_capabilities(self, context, storage_id, filters=None):
method list_storage_host_initiators (line 168) | def list_storage_host_initiators(self, context, storage_id):
method list_storage_hosts (line 173) | def list_storage_hosts(self, context, storage_id):
method list_storage_host_groups (line 178) | def list_storage_host_groups(self, context, storage_id):
method list_port_groups (line 183) | def list_port_groups(self, context, storage_id):
method list_volume_groups (line 188) | def list_volume_groups(self, context, storage_id):
method list_masking_views (line 193) | def list_masking_views(self, context, storage_id):
method get_alert_sources (line 198) | def get_alert_sources(self, context, storage_id):
FILE: delfin/drivers/dell_emc/power_store/consts.py
class StatusCode (line 18) | class StatusCode(object):
class DigitalConstant (line 27) | class DigitalConstant(object):
class DiskType (line 143) | class DiskType(object):
FILE: delfin/drivers/dell_emc/power_store/power_store.py
class PowerStoreDriver (line 23) | class PowerStoreDriver(driver.StorageDriver):
method __init__ (line 25) | def __init__(self, **kwargs):
method get_storage (line 30) | def get_storage(self, context):
method list_storage_pools (line 33) | def list_storage_pools(self, context):
method list_volumes (line 36) | def list_volumes(self, context):
method list_alerts (line 39) | def list_alerts(self, context, query_para=None):
method clear_alert (line 42) | def clear_alert(self, context, alert):
method parse_alert (line 52) | def parse_alert(context, alert):
method get_alert_sources (line 55) | def get_alert_sources(self, context):
method list_controllers (line 58) | def list_controllers(self, context):
method list_disks (line 61) | def list_disks(self, context):
method list_ports (line 64) | def list_ports(self, context):
method reset_connection (line 77) | def reset_connection(self, context, **kwargs):
method add_trap_config (line 81) | def add_trap_config(self, context, trap_config):
method remove_trap_config (line 84) | def remove_trap_config(self, context, trap_config):
method get_access_url (line 88) | def get_access_url():
method collect_perf_metrics (line 91) | def collect_perf_metrics(self, context, storage_id, resource_metrics,
method get_capabilities (line 145) | def get_capabilities(context, filters=None):
method get_latest_perf_timestamp (line 157) | def get_latest_perf_timestamp(self, context):
method list_storage_host_initiators (line 160) | def list_storage_host_initiators(self, context):
method list_storage_hosts (line 163) | def list_storage_hosts(self, context):
method list_storage_host_groups (line 166) | def list_storage_host_groups(self, context):
method list_volume_groups (line 169) | def list_volume_groups(self, context):
method list_masking_views (line 172) | def list_masking_views(self, context):
FILE: delfin/drivers/dell_emc/power_store/rest_handler.py
class RestHandler (line 34) | class RestHandler(RestClient):
method __init__ (line 96) | def __init__(self, **kwargs):
method login (line 102) | def login(self):
method call_with_token (line 127) | def call_with_token(self, url, data=None, method='GET',
method logout (line 140) | def logout(self):
method rest_call (line 148) | def rest_call(self, url, data=None, method='GET', offset=0, result=None,
method get_storage (line 171) | def get_storage(self, storage_id):
method get_firmware_version (line 206) | def get_firmware_version(self, appliance_id):
method get_storage_pools (line 216) | def get_storage_pools(self, storage_id):
method get_volumes (line 246) | def get_volumes(self, storage_id):
method get_volume_used_capacity (line 277) | def get_volume_used_capacity(self, volume_id, volume_type, used_capaci...
method get_disks (line 289) | def get_disks(self, storage_id):
method get_controllers (line 330) | def get_controllers(self, storage_id):
method get_node (line 376) | def get_node(self):
method get_ip (line 386) | def get_ip(self):
method get_appliance_name (line 399) | def get_appliance_name(self):
method get_port_hardware (line 406) | def get_port_hardware(self):
method get_fc_ports (line 413) | def get_fc_ports(self, storage_id, hardware_dict, appliance_name_dict):
method convert_speed (line 443) | def convert_speed(supported_speeds):
method get_eth_ports (line 459) | def get_eth_ports(self, storage_id, hardware_dict, appliance_name_dict):
method get_sas_ports (line 488) | def get_sas_ports(self, storage_id, hardware_dict, appliance_name_dict):
method list_alerts (line 515) | def list_alerts(self, query_para=None):
method get_time_difference (line 540) | def get_time_difference():
method get_parse_alerts (line 546) | def get_parse_alerts(snmp_alert):
method get_alert_sources (line 590) | def get_alert_sources(self, storage_id):
method set_alert_model (line 600) | def set_alert_model(alert, timestamp):
method list_storage_host_initiators (line 623) | def list_storage_host_initiators(self, storage_id):
method get_initiators (line 646) | def get_initiators(self, storage_id):
method list_storage_hosts (line 668) | def list_storage_hosts(self, storage_id):
method list_storage_host_groups (line 685) | def list_storage_host_groups(self, storage_id):
method list_volume_groups (line 712) | def list_volume_groups(self, storage_id):
method list_masking_views (line 739) | def list_masking_views(self, storage_id):
method get_storage_metrics (line 759) | def get_storage_metrics(self, storage_id, resource_metrics, start_time,
method get_pool_metrics (line 779) | def get_pool_metrics(self, storage_id, resource_metrics, start_time,
method get_volume_metrics (line 798) | def get_volume_metrics(self, storage_id, resource_metrics, start_time,
method get_controllers_metrics (line 817) | def get_controllers_metrics(self, storage_id, resource_metrics, start_...
method get_resource (line 842) | def get_resource(controller, controller_dict):
method get_node_hardware (line 855) | def get_node_hardware(self):
method get_fc_port_metrics (line 869) | def get_fc_port_metrics(self, storage_id, resource_metrics, start_time,
method set_metrics_data (line 889) | def set_metrics_data(resource_id, resource_name, packaging_data,
method package_data (line 912) | def package_data(self, data, end_time, start_time):
method get_system_time (line 975) | def get_system_time(self):
FILE: delfin/drivers/dell_emc/scaleio/rest_handler.py
class RestHandler (line 34) | class RestHandler(RestClient):
method __init__ (line 36) | def __init__(self, **kwargs):
method login (line 41) | def login(self):
method logout (line 59) | def logout(self):
method get_storage (line 68) | def get_storage(self, storage_id):
method list_storage_pools (line 126) | def list_storage_pools(self, storage_id):
method list_volumes (line 167) | def list_volumes(self, storage_id):
method list_disks (line 205) | def list_disks(self, storage_id):
method list_alerts (line 235) | def list_alerts(self, query_para=None):
method list_storage_host_initiators (line 285) | def list_storage_host_initiators(self, storage_id):
method list_storage_hosts (line 329) | def list_storage_hosts(self, storage_id):
method list_masking_views (line 361) | def list_masking_views(self, storage_id):
method parse_alert (line 392) | def parse_alert(alert):
method get_rest_info (line 423) | def get_rest_info(self, url, data=None, method='GET'):
FILE: delfin/drivers/dell_emc/scaleio/scaleio_stor.py
class ScaleioStorageDriver (line 24) | class ScaleioStorageDriver(driver.StorageDriver):
method __init__ (line 26) | def __init__(self, **kwargs):
method reset_connection (line 33) | def reset_connection(self, context, **kwargs):
method get_storage (line 38) | def get_storage(self, context):
method list_storage_pools (line 41) | def list_storage_pools(self, context):
method list_volumes (line 44) | def list_volumes(self, context):
method list_disks (line 47) | def list_disks(self, context):
method list_alerts (line 50) | def list_alerts(self, context, query_para=None):
method parse_alert (line 54) | def parse_alert(context, alert):
method add_trap_config (line 57) | def add_trap_config(self, context, trap_config):
method clear_alert (line 60) | def clear_alert(self, context, trap_config):
method remove_trap_config (line 63) | def remove_trap_config(self, context, trap_config):
method list_storage_host_initiators (line 66) | def list_storage_host_initiators(self, context):
method list_storage_hosts (line 69) | def list_storage_hosts(self, context):
method list_masking_views (line 72) | def list_masking_views(self, context):
method get_access_url (line 76) | def get_access_url():
FILE: delfin/drivers/dell_emc/unity/alert_handler.py
class AlertHandler (line 29) | class AlertHandler(object):
method parse_alert (line 68) | def parse_alert(context, alert):
method parse_queried_alerts (line 98) | def parse_queried_alerts(self, alert_model_list, alert_dict, query_para):
FILE: delfin/drivers/dell_emc/unity/rest_handler.py
class RestHandler (line 28) | class RestHandler(RestClient):
method __init__ (line 53) | def __init__(self, **kwargs):
method login (line 57) | def login(self):
method call_with_token (line 84) | def call_with_token(self, url, data=None, method='GET',
method logout (line 97) | def logout(self):
method get_rest_info (line 108) | def get_rest_info(self, url, data=None, method='GET',
method call (line 124) | def call(self, url, data=None, method='GET',
method get_all_pools (line 141) | def get_all_pools(self):
method get_storage (line 148) | def get_storage(self):
method get_capacity (line 154) | def get_capacity(self):
method get_soft_version (line 161) | def get_soft_version(self):
method get_all_luns (line 167) | def get_all_luns(self, page_number):
method get_all_alerts (line 175) | def get_all_alerts(self, page_number):
method get_all_alerts_without_state (line 185) | def get_all_alerts_without_state(self, page_number):
method remove_alert (line 195) | def remove_alert(self, alert_id):
method get_all_controllers (line 202) | def get_all_controllers(self):
method get_all_disks (line 209) | def get_all_disks(self):
method get_all_fcports (line 217) | def get_all_fcports(self):
method get_all_ethports (line 224) | def get_all_ethports(self):
method get_port_interface (line 231) | def get_port_interface(self):
method get_all_filesystems (line 238) | def get_all_filesystems(self):
method get_all_filesystems_without_flr (line 245) | def get_all_filesystems_without_flr(self):
method get_all_nfsshares (line 252) | def get_all_nfsshares(self):
method get_all_cifsshares (line 258) | def get_all_cifsshares(self):
method get_all_qtrees (line 264) | def get_all_qtrees(self):
method get_all_userquotas (line 271) | def get_all_userquotas(self):
method get_quota_configs (line 278) | def get_quota_configs(self):
method get_host_initiators (line 284) | def get_host_initiators(self, page):
method get_all_hosts (line 290) | def get_all_hosts(self, page):
method get_host_ip (line 296) | def get_host_ip(self):
method get_host_lun (line 302) | def get_host_lun(self, page):
method get_history_metrics (line 308) | def get_history_metrics(self, path, page):
method get_virtual_disks (line 314) | def get_virtual_disks(self):
FILE: delfin/drivers/dell_emc/unity/unity.py
class UnityStorDriver (line 29) | class UnityStorDriver(driver.StorageDriver):
method __init__ (line 138) | def __init__(self, **kwargs):
method reset_connection (line 143) | def reset_connection(self, context, **kwargs):
method close_connection (line 148) | def close_connection(self):
method get_disk_capacity (line 151) | def get_disk_capacity(self, context):
method get_storage (line 162) | def get_storage(self, context):
method list_storage_pools (line 213) | def list_storage_pools(self, context):
method volume_handler (line 241) | def volume_handler(self, volumes, volume_list):
method list_volumes (line 271) | def list_volumes(self, context):
method list_alerts (line 287) | def list_alerts(self, context, query_para=None):
method list_controllers (line 307) | def list_controllers(self, context):
method handle_port_ip (line 340) | def handle_port_ip(ip, result):
method get_eth_ports (line 347) | def get_eth_ports(self):
method get_fc_ports (line 411) | def get_fc_ports(self):
method list_ports (line 453) | def list_ports(self, context):
method list_disks (line 464) | def list_disks(self, context):
method list_filesystems (line 513) | def list_filesystems(self, context):
method list_qtrees (line 562) | def list_qtrees(self, context):
method get_share_qtree (line 587) | def get_share_qtree(self, path, qtree_list):
method get_share (line 601) | def get_share(self, protocol, qtree_list, filesystems):
method list_shares (line 647) | def list_shares(self, context):
method get_tree_quotas (line 663) | def get_tree_quotas(self):
method get_user_quotas (line 687) | def get_user_quotas(self):
method list_quotas (line 712) | def list_quotas(self, context):
method add_trap_config (line 723) | def add_trap_config(self, context, trap_config):
method remove_trap_config (line 726) | def remove_trap_config(self, context, trap_config):
method parse_alert (line 730) | def parse_alert(context, alert):
method clear_alert (line 733) | def clear_alert(self, context, alert):
method get_access_url (line 737) | def get_access_url():
method list_storage_host_initiators (line 740) | def list_storage_host_initiators(self, context):
method list_storage_hosts (line 779) | def list_storage_hosts(self, context):
method list_masking_views (line 836) | def list_masking_views(self, context):
method get_metrics_loop (line 865) | def get_metrics_loop(self, target, start_time,
method get_history_metrics (line 886) | def get_history_metrics(self, resource_type, targets,
method get_metric_value (line 909) | def get_metric_value(target, start_time, end_time, metrics,
method count_total_perf (line 972) | def count_total_perf(metrics):
method package_metrics (line 1010) | def package_metrics(storage_id, resource_type, metrics, metrics_list):
method collect_perf_metrics (line 1037) | def collect_perf_metrics(self, context, storage_id,
method get_capabilities (line 1090) | def get_capabilities(context, filters=None):
method get_latest_perf_timestamp (line 1102) | def get_latest_perf_timestamp(self, context):
method get_virtual_disk (line 1131) | def get_virtual_disk(self):
FILE: delfin/drivers/dell_emc/vmax/alert_handler/oid_mapper.py
class OidMapper (line 16) | class OidMapper(object):
method __init__ (line 32) | def __init__(self):
method map_oids (line 36) | def map_oids(alert):
FILE: delfin/drivers/dell_emc/vmax/alert_handler/snmp_alerts.py
class AlertHandler (line 27) | class AlertHandler(object):
method parse_alert (line 54) | def parse_alert(context, alert):
method add_trap_config (line 107) | def add_trap_config(self, context, storage_id, trap_config):
method remove_trap_config (line 111) | def remove_trap_config(self, context, storage_id, trap_config):
method clear_alert (line 115) | def clear_alert(self, context, storage_id, alert):
FILE: delfin/drivers/dell_emc/vmax/alert_handler/unisphere_alerts.py
class AlertHandler (line 23) | class AlertHandler(object):
method __init__ (line 37) | def __init__(self):
method parse_queried_alerts (line 40) | def parse_queried_alerts(self, alert_list):
method add_trap_config (line 73) | def add_trap_config(self, context, storage_id, trap_config):
method remove_trap_config (line 77) | def remove_trap_config(self, context, storage_id, trap_config):
method clear_alert (line 81) | def clear_alert(self, context, storage_id, alert):
FILE: delfin/drivers/dell_emc/vmax/client.py
class VMAXClient (line 28) | class VMAXClient(object):
method __init__ (line 31) | def __init__(self, **kwargs):
method reset_connection (line 41) | def reset_connection(self, **kwargs):
method init_connection (line 46) | def init_connection(self, access_info):
method add_storage (line 70) | def add_storage(self, access_info):
method get_array_details (line 104) | def get_array_details(self, storage_id):
method get_storage_capacity (line 114) | def get_storage_capacity(self, storage_id):
method list_storage_pools (line 160) | def list_storage_pools(self, storage_id):
method list_volumes (line 208) | def list_volumes(self, storage_id):
method list_controllers (line 281) | def list_controllers(self, storage_id):
method list_ports (line 316) | def list_ports(self, storage_id):
method list_disks (line 397) | def list_disks(self, storage_id):
method list_storage_host_initiators (line 423) | def list_storage_host_initiators(self, storage_id):
method list_storage_hosts (line 461) | def list_storage_hosts(self, storage_id):
method list_storage_host_groups (line 485) | def list_storage_host_groups(self, storage_id):
method list_port_groups (line 522) | def list_port_groups(self, storage_id):
method list_volume_groups (line 557) | def list_volume_groups(self, storage_id):
method list_masking_views (line 600) | def list_masking_views(self, storage_id):
method list_alerts (line 627) | def list_alerts(self, storage_id, query_para):
method clear_alert (line 632) | def clear_alert(self, storage_id, sequence_number):
method get_storage_metrics (line 638) | def get_storage_metrics(self, storage_id, metrics, start_time, end_time):
method get_pool_metrics (line 652) | def get_pool_metrics(self, storage_id, metrics, start_time, end_time):
method get_port_metrics (line 666) | def get_port_metrics(self, storage_id, metrics, start_time, end_time):
method get_controller_metrics (line 693) | def get_controller_metrics(self, storage_id,
method get_disk_metrics (line 722) | def get_disk_metrics(self, storage_id, metrics, start_time, end_time):
FILE: delfin/drivers/dell_emc/vmax/perf_utils.py
function parse_performance_data (line 18) | def parse_performance_data(metrics):
function construct_metrics (line 32) | def construct_metrics(storage_id, resource_metrics, unit_map, perf_list):
FILE: delfin/drivers/dell_emc/vmax/rest.py
class VMaxRest (line 59) | class VMaxRest(object):
method __init__ (line 62) | def __init__(self):
method set_rest_credentials (line 70) | def set_rest_credentials(self, array_info):
method establish_rest_session (line 82) | def establish_rest_session(self):
method request (line 108) | def request(self, target_uri, method, params=None, request_object=None,
method check_status_code_success (line 192) | def check_status_code_success(operation, status_code, message):
method build_uri (line 209) | def build_uri(self, *args, **kwargs):
method _build_uri_legacy_args (line 225) | def _build_uri_legacy_args(*args, **kwargs):
method _build_uri_kwargs (line 264) | def _build_uri_kwargs(**kwargs):
method get_request (line 329) | def get_request(self, target_uri, resource_type, params=None):
method get_alert_request (line 349) | def get_alert_request(self, target_uri):
method get_resource (line 361) | def get_resource(self, array, category, resource_type,
method get_resource_kwargs (line 379) | def get_resource_kwargs(self, *args, **kwargs):
method get_array_detail (line 406) | def get_array_detail(self, version=U4V_VERSION, array=''):
method get_uni_version (line 419) | def get_uni_version(self):
method get_unisphere_version (line 431) | def get_unisphere_version(self):
method get_srp_by_name (line 451) | def get_srp_by_name(self, array, version, srp=None):
method get_vmax_array_details (line 465) | def get_vmax_array_details(self, version=U4V_VERSION, array=''):
method get_array_model_info (line 480) | def get_array_model_info(self, version=U4V_VERSION, array=''):
method get_storage_group (line 494) | def get_storage_group(self, array, version, storage_group_name):
method get_system_capacity (line 506) | def get_system_capacity(self, array, version):
method get_default_srps (line 514) | def get_default_srps(self, array, version=U4V_VERSION):
method get_volume (line 527) | def get_volume(self, array, version, device_id):
method get_volume_list (line 545) | def get_volume_list(self, array, version, params):
method get_director (line 565) | def get_director(self, array, version, device_id):
method get_director_list (line 597) | def get_director_list(self, array, version, params=None):
method get_port (line 629) | def get_port(self, array, version, director_id, port_id):
method get_port_list (line 666) | def get_port_list(self, array, version, director_id, params=None):
method get_disk (line 705) | def get_disk(self, array, version, device_id):
method get_disk_list (line 723) | def get_disk_list(self, array, version, params=None):
method get_initiator (line 736) | def get_initiator(self, array, version, initiator_id):
method get_initiator_list (line 754) | def get_initiator_list(self, array, version, params=None):
method get_host (line 768) | def get_host(self, array, version, host_id):
method get_host_list (line 787) | def get_host_list(self, array, version, params=None):
method get_host_group (line 801) | def get_host_group(self, array, version, host_group_id):
method get_host_group_list (line 820) | def get_host_group_list(self, array, version, params=None):
method get_port_group (line 834) | def get_port_group(self, array, version, port_group_id):
method get_port_group_list (line 853) | def get_port_group_list(self, array, version, params=None):
method get_volume_group (line 867) | def get_volume_group(self, array, version, storage_group_id):
method get_volume_group_list (line 886) | def get_volume_group_list(self, array, version, params=None):
method get_masking_view (line 900) | def get_masking_view(self, array, version, masking_view_id):
method get_masking_view_list (line 919) | def get_masking_view_list(self, array, version, params=None):
method post_request (line 933) | def post_request(self, target_uri, payload):
method get_array_keys (line 951) | def get_array_keys(self, array):
method get_resource_keys (line 962) | def get_resource_keys(self, array, resource, payload=None):
method get_resource_metrics (line 976) | def get_resource_metrics(self, array, start_time,
method get_storage_metrics (line 997) | def get_storage_metrics(self, array, metrics, start_time, end_time):
method get_pool_metrics (line 1033) | def get_pool_metrics(self, array, metrics, start_time, end_time):
method get_fedirector_metrics (line 1069) | def get_fedirector_metrics(self, array, metrics, start_time, end_time):
method get_bedirector_metrics (line 1106) | def get_bedirector_metrics(self, array, metrics, start_time, end_time):
method get_rdfdirector_metrics (line 1143) | def get_rdfdirector_metrics(self, array, metrics, start_time, end_time):
method get_controller_metrics (line 1180) | def get_controller_metrics(self, array, metrics, start_time, end_time):
method get_feport_metrics (line 1197) | def get_feport_metrics(self, array, metrics, start_time, end_time):
method get_beport_metrics (line 1242) | def get_beport_metrics(self, array, metrics, start_time, end_time):
method get_rdfport_metrics (line 1288) | def get_rdfport_metrics(self, array, metrics, start_time, end_time):
method get_port_metrics (line 1333) | def get_port_metrics(self, array, metrics, start_time, end_time):
method get_disk_metrics (line 1350) | def get_disk_metrics(self, array, metrics, start_time, end_time):
method list_pagination (line 1386) | def list_pagination(self, list_info):
method get_iterator_page_list (line 1417) | def get_iterator_page_list(self, iterator_id, result_count, start_posi...
method get_alerts (line 1449) | def get_alerts(self, query_para, array, version):
method clear_alert (line 1479) | def clear_alert(self, sequence_number, array, version):
FILE: delfin/drivers/dell_emc/vmax/vmax.py
class VMAXStorageDriver (line 27) | class VMAXStorageDriver(driver.StorageDriver):
method __init__ (line 31) | def __init__(self, **kwargs):
method delete_storage (line 37) | def delete_storage(self, context):
method add_storage (line 40) | def add_storage(self, kwargs):
method reset_connection (line 43) | def reset_connection(self, context, **kwargs):
method get_storage (line 46) | def get_storage(self, context):
method list_storage_pools (line 79) | def list_storage_pools(self, context):
method list_volumes (line 82) | def list_volumes(self, context):
method list_controllers (line 85) | def list_controllers(self, context):
method list_ports (line 88) | def list_ports(self, context):
method list_disks (line 91) | def list_disks(self, context):
method list_storage_host_initiators (line 94) | def list_storage_host_initiators(self, context):
method list_storage_hosts (line 97) | def list_storage_hosts(self, context):
method list_storage_host_groups (line 100) | def list_storage_host_groups(self, context):
method list_port_groups (line 103) | def list_port_groups(self, context):
method list_volume_groups (line 106) | def list_volume_groups(self, context):
method list_masking_views (line 109) | def list_masking_views(self, context):
method add_trap_config (line 112) | def add_trap_config(self, context, trap_config):
method remove_trap_config (line 115) | def remove_trap_config(self, context, trap_config):
method parse_alert (line 119) | def parse_alert(context, alert):
method clear_alert (line 122) | def clear_alert(self, context, sequence_number):
method list_alerts (line 125) | def list_alerts(self, context, query_para):
method collect_perf_metrics (line 133) | def collect_perf_metrics(self, context, storage_id,
method get_capabilities (line 185) | def get_capabilities(context, filters=None):
FILE: delfin/drivers/dell_emc/vnx/vnx_block/alert_handler.py
class AlertHandler (line 26) | class AlertHandler(object):
method parse_alert (line 29) | def parse_alert(alert):
method check_event_code (line 53) | def check_event_code(event_code):
FILE: delfin/drivers/dell_emc/vnx/vnx_block/component_handler.py
class ComponentHandler (line 32) | class ComponentHandler(object):
method __init__ (line 34) | def __init__(self, navi_handler):
method get_storage (line 37) | def get_storage(self):
method list_storage_pools (line 65) | def list_storage_pools(self, storage_id):
method handle_raid_groups (line 100) | def handle_raid_groups(self, storage_id):
method handle_volume_from_pool (line 129) | def handle_volume_from_pool(self, volumes, pool_ids, storage_id):
method handle_volume_from_raid_group (line 167) | def handle_volume_from_raid_group(self, storage_id):
method list_volumes (line 204) | def list_volumes(self, storage_id):
method handle_disk_capacity (line 219) | def handle_disk_capacity(self):
method handle_pool_capacity (line 229) | def handle_pool_capacity(self):
method list_disks (line 247) | def list_disks(self, storage_id):
method analyse_speed (line 284) | def analyse_speed(self, speed_value):
method list_controllers (line 301) | def list_controllers(self, storage_id):
method list_ports (line 329) | def list_ports(self, storage_id):
method get_ports (line 339) | def get_ports(self, storage_id, io_configs, iscsi_port_map):
method get_bus_ports (line 395) | def get_bus_ports(self, storage_id, io_configs):
method get_iscsi_ports (line 449) | def get_iscsi_ports(self):
method list_masking_views (line 457) | def list_masking_views(self, storage_id):
method list_storage_host_initiators (line 495) | def list_storage_host_initiators(self, storage_id):
method list_storage_hosts (line 536) | def list_storage_hosts(self, storage_id):
method collect_perf_metrics (line 578) | def collect_perf_metrics(self, storage_id, resource_metrics,
method create_metrics (line 620) | def create_metrics(self, storage_id, resource_metrics, resources_map,
method _get__archive_file (line 645) | def _get__archive_file(self, start_time, end_time):
method _get_metric_model (line 658) | def _get_metric_model(self, metric_list, labels, metric_values, obj_cap,
method _get_resources_map (line 693) | def _get_resources_map(self, resource_metrics):
method _get_controllers_map (line 716) | def _get_controllers_map(self):
method _get_ports_map (line 727) | def _get_ports_map(self):
method _get_disks_map (line 740) | def _get_disks_map(self):
method _get_volumes_map (line 751) | def _get_volumes_map(self):
method _filter_performance_data (line 764) | def _filter_performance_data(self, archive_file_list, resources_map,
method _package_performance_data (line 790) | def _package_performance_data(self, row, resources_map, start_time,
method _package_resource_obj_name (line 804) | def _package_resource_obj_name(self, source_name):
method _remove_archive_file (line 812) | def _remove_archive_file(self, archive_file_list):
method get_latest_perf_timestamp (line 835) | def get_latest_perf_timestamp(self, storage_id):
method get_data_latest_timestamp (line 858) | def get_data_latest_timestamp(self, storage_id):
method check_latest_timestamp (line 890) | def check_latest_timestamp(self, storage_id):
FILE: delfin/drivers/dell_emc/vnx/vnx_block/navi_handler.py
class NaviHandler (line 33) | class NaviHandler(object):
method __init__ (line 36) | def __init__(self, **kwargs):
method get_cli_command_str (line 49) | def get_cli_command_str(self, host_ip=None, sub_command=None,
method login (line 64) | def login(self, host_ip=None):
method remove_cer (line 88) | def remove_cer(self, host_ip=None):
method get_agent (line 100) | def get_agent(self):
method get_domain (line 104) | def get_domain(self):
method get_pools (line 108) | def get_pools(self):
method get_disks (line 112) | def get_disks(self):
method get_raid_group (line 116) | def get_raid_group(self):
method get_pool_lun (line 120) | def get_pool_lun(self):
method get_all_lun (line 124) | def get_all_lun(self):
method get_controllers (line 128) | def get_controllers(self):
method get_cpus (line 132) | def get_cpus(self):
method get_ports (line 136) | def get_ports(self):
method get_bus_ports (line 140) | def get_bus_ports(self):
method get_bus_port_state (line 144) | def get_bus_port_state(self):
method get_iscsi_ports (line 148) | def get_iscsi_ports(self):
method get_io_configs (line 152) | def get_io_configs(self):
method get_resources_info (line 156) | def get_resources_info(self, sub_command, analyse_type):
method cli_res_to_dict (line 171) | def cli_res_to_dict(self, resource_info):
method cli_res_to_list (line 187) | def cli_res_to_list(self, resource_info):
method cli_raid_to_list (line 217) | def cli_raid_to_list(self, resource_info):
method cli_sp_to_list (line 243) | def cli_sp_to_list(self, resource_info):
method cli_port_to_list (line 268) | def cli_port_to_list(self, resource_info):
method cli_bus_port_to_list (line 305) | def cli_bus_port_to_list(self, resource_info):
method cli_bus_port_state_to_dict (line 347) | def cli_bus_port_state_to_dict(self, resource_info):
method cli_iscsi_port_to_list (line 371) | def cli_iscsi_port_to_list(self, resource_info):
method cli_io_config_to_dict (line 391) | def cli_io_config_to_dict(self, resource_info):
method cli_cpu_to_dict (line 417) | def cli_cpu_to_dict(self, resource_info):
method cli_disk_to_list (line 443) | def cli_disk_to_list(self, resource_info):
method cli_domain_to_dict (line 472) | def cli_domain_to_dict(self, resource_info):
method cli_lun_to_list (line 504) | def cli_lun_to_list(self, resource_info):
method analyse_cer (line 532) | def analyse_cer(self, resource_info, host_ip=None):
method split_str_by_colon (line 554) | def split_str_by_colon(self, str_line):
method str_info_to_model (line 568) | def str_info_to_model(self, str_info, obj_model):
method add_model_to_list (line 585) | def add_model_to_list(self, obj_model, obj_list):
method navi_exe (line 590) | def navi_exe(self, command_str, host_ip=None):
method list_masking_views (line 616) | def list_masking_views(self):
method cli_sg_to_list (line 620) | def cli_sg_to_list(self, resource_info):
method list_hbas (line 664) | def list_hbas(self):
method cli_hba_to_list (line 668) | def cli_hba_to_list(self, resource_info):
method get_archives (line 709) | def get_archives(self):
method cli_archives_to_list (line 713) | def cli_archives_to_list(self, resource_info):
method download_archives (line 733) | def download_archives(self, archive_name):
method get_local_file_path (line 743) | def get_local_file_path(self):
method get_sp_time (line 750) | def get_sp_time(self):
method analysis_sp_time (line 754) | def analysis_sp_time(self, resource_info):
method get_nar_interval (line 771) | def get_nar_interval(self):
method analysis_nar_interval (line 775) | def analysis_nar_interval(self, resource_info):
method get_archive_file_name (line 787) | def get_archive_file_name(self, storage_id):
method create_archives (line 795) | def create_archives(self, storage_id):
FILE: delfin/drivers/dell_emc/vnx/vnx_block/navicli_client.py
class NaviClient (line 25) | class NaviClient(object):
method exec (line 28) | def exec(command_str, stdin_value=None):
FILE: delfin/drivers/dell_emc/vnx/vnx_block/vnx_block.py
class VnxBlockStorDriver (line 27) | class VnxBlockStorDriver(driver.StorageDriver):
method __init__ (line 30) | def __init__(self, **kwargs):
method reset_connection (line 36) | def reset_connection(self, context, **kwargs):
method close_connection (line 41) | def close_connection(self):
method get_storage (line 44) | def get_storage(self, context):
method list_storage_pools (line 47) | def list_storage_pools(self, context):
method list_volumes (line 50) | def list_volumes(self, context):
method list_alerts (line 53) | def list_alerts(self, context, query_para=None):
method list_controllers (line 57) | def list_controllers(self, context):
method list_ports (line 60) | def list_ports(self, context):
method list_disks (line 63) | def list_disks(self, context):
method add_trap_config (line 66) | def add_trap_config(self, context, trap_config):
method remove_trap_config (line 69) | def remove_trap_config(self, context, trap_config):
method parse_alert (line 73) | def parse_alert(context, alert):
method clear_alert (line 76) | def clear_alert(self, context, sequence_number):
method get_access_url (line 80) | def get_access_url():
method list_storage_host_initiators (line 83) | def list_storage_host_initiators(self, context):
method list_storage_hosts (line 86) | def list_storage_hosts(self, context):
method list_masking_views (line 89) | def list_masking_views(self, context):
method collect_perf_metrics (line 92) | def collect_perf_metrics(self, context, storage_id, resource_metrics,
method get_capabilities (line 99) | def get_capabilities(context, filters=None):
method get_latest_perf_timestamp (line 111) | def get_latest_perf_timestamp(self, context):
FILE: delfin/drivers/dell_emc/vplex/alert_handler.py
class AlertHandler (line 25) | class AlertHandler(object):
method parse_alert (line 40) | def parse_alert(context, alert):
FILE: delfin/drivers/dell_emc/vplex/rest_handler.py
class RestHandler (line 25) | class RestHandler(RestClient):
method __init__ (line 27) | def __init__(self, **kwargs):
method login (line 30) | def login(self):
method get_rest_info (line 51) | def get_rest_info(self, url, data=None, method='GET'):
method get_virtual_volume_by_name_resp (line 59) | def get_virtual_volume_by_name_resp(self, cluster_name,
method get_virtual_volume_resp (line 66) | def get_virtual_volume_resp(self, cluster_name):
method get_cluster_resp (line 72) | def get_cluster_resp(self):
method get_devcie_resp (line 77) | def get_devcie_resp(self, cluster_name):
method get_device_by_name_resp (line 82) | def get_device_by_name_resp(self, cluster_name, device_name):
method get_health_check_resp (line 88) | def get_health_check_resp(self):
method get_cluster_by_name_resp (line 94) | def get_cluster_by_name_resp(self, cluster_name):
method get_storage_volume_summary_resp (line 99) | def get_storage_volume_summary_resp(self, cluster_name):
method get_device_summary_resp (line 106) | def get_device_summary_resp(self, cluster_name):
method get_virtual_volume_summary_resp (line 113) | def get_virtual_volume_summary_resp(self, cluster_name):
method logout (line 120) | def logout(self):
method get_engine_director_resp (line 129) | def get_engine_director_resp(self):
method get_version_verbose (line 134) | def get_version_verbose(self):
method get_cluster_export_port_resp (line 141) | def get_cluster_export_port_resp(self):
method get_engine_director_hardware_port_resp (line 146) | def get_engine_director_hardware_port_resp(self):
method get_initiators_resp (line 151) | def get_initiators_resp(self):
method get_storage_views (line 156) | def get_storage_views(self):
FILE: delfin/drivers/dell_emc/vplex/vplex_stor.py
class VplexStorageDriver (line 30) | class VplexStorageDriver(driver.StorageDriver):
method __init__ (line 33) | def __init__(self, **kwargs):
method reset_connection (line 38) | def reset_connection(self, context, **kwargs):
method get_storage (line 43) | def get_storage(self, context):
method list_storage_pools (line 89) | def list_storage_pools(self, context):
method list_volumes (line 131) | def list_volumes(self, context):
method add_trap_config (line 176) | def add_trap_config(self, context, trap_config):
method remove_trap_config (line 179) | def remove_trap_config(self, context, trap_config):
method parse_alert (line 183) | def parse_alert(context, alert):
method list_alerts (line 186) | def list_alerts(self, context, query_para=None):
method clear_alert (line 191) | def clear_alert(self, context, alert):
method get_access_url (line 195) | def get_access_url():
method get_attribute_map (line 199) | def get_attribute_map(response):
method analyse_capacity (line 212) | def analyse_capacity(capacity_str):
method analyse_status (line 219) | def analyse_status(operational_status, health_status):
method analyse_storage_status (line 231) | def analyse_storage_status(operational_status, health_status):
method analyse_vv_type (line 245) | def analyse_vv_type(thin_enabled):
method get_children_map (line 252) | def get_children_map(response):
method get_resource_names (line 265) | def get_resource_names(response):
method handle_detail (line 277) | def handle_detail(detail_info, detail_map, split):
method get_cluster_raw_capacity (line 288) | def get_cluster_raw_capacity(self, cluster_name):
method get_cluster_total_capacity (line 305) | def get_cluster_total_capacity(self, cluster_name):
method get_cluster_used_capacity (line 322) | def get_cluster_used_capacity(self, cluster_name):
method list_controllers (line 339) | def list_controllers(self, context):
method list_ports (line 367) | def list_ports(self, context):
method get_context_list (line 412) | def get_context_list(response):
method analyse_director_version (line 433) | def analyse_director_version(version_resp, director_version_map):
method analyse_director_status (line 466) | def analyse_director_status(status):
method get_director_specified_version (line 470) | def get_director_specified_version(self, version_map, director_name,
method get_value_from_nest_map (line 479) | def get_value_from_nest_map(self, nest_map, first_key, second_key):
method get_hardware_port_info (line 487) | def get_hardware_port_info(self, nest_map, first_key, second_key):
method analyse_hardware_port (line 509) | def analyse_hardware_port(resp, hardware_port_map):
method analyse_port_type (line 519) | def analyse_port_type(protocols):
method analyse_port_logical_type (line 530) | def analyse_port_logical_type(role):
method analyse_port_connect_status (line 535) | def analyse_port_connect_status(status):
method analyse_port_health_status (line 540) | def analyse_port_health_status(status):
method analyse_speed (line 545) | def analyse_speed(speed_value):
method list_masking_views (line 560) | def list_masking_views(self, content):
method list_storage_host_initiators (line 607) | def list_storage_host_initiators(self, content):
method list_storage_hosts (line 637) | def list_storage_hosts(self, content):
method list_port_groups (line 658) | def list_port_groups(self, context):
method get_attributes_from_response (line 699) | def get_attributes_from_response(response):
function handle_detail_list (line 717) | def handle_detail_list(detail_info, detail_map, split):
FILE: delfin/drivers/driver.py
class StorageDriver (line 20) | class StorageDriver(object):
method __init__ (line 22) | def __init__(self, **kwargs):
method delete_storage (line 31) | def delete_storage(self, context):
method add_storage (line 35) | def add_storage(self, kwargs):
method reset_connection (line 40) | def reset_connection(self, context, **kwargs):
method get_storage (line 45) | def get_storage(self, context):
method list_storage_pools (line 50) | def list_storage_pools(self, context):
method list_volumes (line 55) | def list_volumes(self, context):
method list_controllers (line 59) | def list_controllers(self, context):
method list_ports (line 64) | def list_ports(self, context):
method list_disks (line 69) | def list_disks(self, context):
method add_trap_config (line 75) | def add_trap_config(self, context, trap_config):
method remove_trap_config (line 80) | def remove_trap_config(self, context, trap_config):
method parse_alert (line 85) | def parse_alert(context, alert):
method list_alerts (line 113) | def list_alerts(self, context, query_para=None):
method clear_alert (line 123) | def clear_alert(self, context, sequence_number):
method collect_perf_metrics (line 127) | def collect_perf_metrics(self, context, storage_id,
method list_quotas (line 165) | def list_quotas(self, context):
method list_filesystems (line 170) | def list_filesystems(self, context):
method list_qtrees (line 175) | def list_qtrees(self, context):
method list_shares (line 180) | def list_shares(self, context):
method get_capabilities (line 186) | def get_capabilities(context, filters=None):
method list_storage_host_initiators (line 220) | def list_storage_host_initiators(self, context):
method list_storage_hosts (line 237) | def list_storage_hosts(self, context):
method list_storage_host_groups (line 252) | def list_storage_host_groups(self, context):
method list_port_groups (line 270) | def list_port_groups(self, context):
method list_volume_groups (line 287) | def list_volume_groups(self, context):
method list_masking_views (line 305) | def list_masking_views(self, context):
method get_alert_sources (line 338) | def get_alert_sources(self, context):
method get_latest_perf_timestamp (line 341) | def get_latest_perf_timestamp(self, context):
FILE: delfin/drivers/fake_storage/__init__.py
function get_range_val (line 92) | def get_range_val(range_str, t):
function wait_random (line 105) | def wait_random(low, high):
class FakeStorageDriver (line 116) | class FakeStorageDriver(driver.StorageDriver):
method __init__ (line 121) | def __init__(self, **kwargs):
method _get_random_capacity (line 137) | def _get_random_capacity(self):
method reset_connection (line 143) | def reset_connection(self, context, **kwargs):
method get_storage (line 147) | def get_storage(self, context):
method list_storage_pools (line 180) | def list_storage_pools(self, ctx):
method list_volumes (line 200) | def list_volumes(self, ctx):
method list_controllers (line 216) | def list_controllers(self, ctx):
method list_ports (line 239) | def list_ports(self, ctx):
method list_disks (line 280) | def list_disks(self, ctx):
method list_quotas (line 315) | def list_quotas(self, ctx):
method list_filesystems (line 349) | def list_filesystems(self, ctx):
method list_qtrees (line 383) | def list_qtrees(self, ctx):
method list_shares (line 405) | def list_shares(self, ctx):
method add_trap_config (line 427) | def add_trap_config(self, context, trap_config):
method remove_trap_config (line 430) | def remove_trap_config(self, context, trap_config):
method parse_alert (line 434) | def parse_alert(context, alert):
method clear_alert (line 437) | def clear_alert(self, context, alert):
method list_alerts (line 440) | def list_alerts(self, context, query_para=None):
method _get_volume_range (line 493) | def _get_volume_range(self, start, end):
method _get_random_performance (line 512) | def _get_random_performance(self, metric_list, start_time, end_time):
method get_resource_perf_metrics (line 530) | def get_resource_perf_metrics(self, storage_id, start_time, end_time,
method collect_perf_metrics (line 552) | def collect_perf_metrics(self, context, storage_id,
method get_capabilities (line 566) | def get_capabilities(context, filters=None):
method list_storage_host_initiators (line 871) | def list_storage_host_initiators(self, ctx):
method list_storage_hosts (line 892) | def list_storage_hosts(self, ctx):
method list_storage_host_groups (line 910) | def list_storage_host_groups(self, ctx):
method list_port_groups (line 969) | def list_port_groups(self, ctx):
method list_volume_groups (line 1025) | def list_volume_groups(self, ctx):
method list_masking_views (line 1080) | def list_masking_views(self, ctx):
FILE: delfin/drivers/fujitsu/eternus/cli_handler.py
class CliHandler (line 33) | class CliHandler(object):
method __init__ (line 36) | def __init__(self, **kwargs):
method login (line 41) | def login(self):
method exec_command (line 50) | def exec_command(self, command, exe_time=consts.DEFAULT_EXE_TIME):
method common_data_encapsulation (line 66) | def common_data_encapsulation(self, command):
method get_controllers (line 81) | def get_controllers(self):
method analysis_data_to_map (line 111) | def analysis_data_to_map(self, source_info, pattern_str, obj_map):
method get_volumes_type (line 125) | def get_volumes_type(self, volume_id_dict=None, command=None):
method get_alerts (line 158) | def get_alerts(self, command, query_para, list_alert=None):
method get_event (line 186) | def get_event(events_error_str, query_para):
method format_data (line 222) | def format_data(self, command, storage_id, method, is_port=False):
method format_fc_ports (line 257) | def format_fc_ports(port_map, storage_id):
method format_disks (line 279) | def format_disks(disk_map, storage_id):
method get_volumes_or_pool (line 325) | def get_volumes_or_pool(self, command, str_pattern):
method get_ports_status (line 357) | def get_ports_status(self):
FILE: delfin/drivers/fujitsu/eternus/consts.py
class DIGITAL_CONSTANT (line 111) | class DIGITAL_CONSTANT(object):
FILE: delfin/drivers/fujitsu/eternus/eternus_ssh_client.py
function override_check_dsa_parameters (line 30) | def override_check_dsa_parameters(parameters):
class EternusSSHPool (line 45) | class EternusSSHPool(SSHPool):
method create (line 46) | def create(self):
method do_exec_shell (line 89) | def do_exec_shell(self, command_list, exe_time):
FILE: delfin/drivers/fujitsu/eternus/eternus_stor.py
class EternusDriver (line 32) | class EternusDriver(driver.StorageDriver):
method __init__ (line 34) | def __init__(self, **kwargs):
method list_volumes (line 39) | def list_volumes(self, context):
method get_volumes_model (line 45) | def get_volumes_model(self):
method get_volumes_old (line 99) | def get_volumes_old(self):
method add_trap_config (line 134) | def add_trap_config(self, context, trap_config):
method clear_alert (line 137) | def clear_alert(self, context, alert):
method get_storage (line 140) | def get_storage(self, context):
method list_controllers (line 189) | def list_controllers(self, context):
method list_disks (line 217) | def list_disks(self, context):
method list_ports (line 231) | def list_ports(self, context):
method list_storage_pools (line 274) | def list_storage_pools(self, context):
method get_list_pools_old (line 280) | def get_list_pools_old(self, pool_list):
method get_list_pools (line 319) | def get_list_pools(self):
method remove_trap_config (line 345) | def remove_trap_config(self, context, trap_config):
method reset_connection (line 348) | def reset_connection(self, context, **kwargs):
method list_alerts (line 351) | def list_alerts(self, context, query_para=None):
method parse_alert (line 364) | def parse_alert(context, alert):
method get_access_url (line 393) | def get_access_url():
method list_storage_host_initiators (line 396) | def list_storage_host_initiators(self, ctx):
method get_fc_sas_initiator (line 414) | def get_fc_sas_initiator(self, host_status, initiator_list, command,
method initiator_dict (line 428) | def initiator_dict(self, wwn, host_id, state, initiator_type):
method get_iscsi_initiator (line 443) | def get_iscsi_initiator(self, host_status, initiator_list):
method list_storage_hosts (line 454) | def list_storage_hosts(self, ctx):
method get_fc_sas_host (line 467) | def get_fc_sas_host(self, host_list, host_status, command,
method get_iscsi_host (line 490) | def get_iscsi_host(self, host_list, host_status):
method get_data (line 512) | def get_data(self, command):
method get_iscsi_host_data (line 541) | def get_iscsi_host_data(self):
method get_iscsi_details (line 575) | def get_iscsi_details(self, number):
method get_host_status (line 593) | def get_host_status(self):
method list_storage_host_groups (line 604) | def list_storage_host_groups(self, ctx):
method get_storage_hosts (line 661) | def get_storage_hosts(host_group_arr):
method list_volume_groups (line 683) | def list_volume_groups(self, ctx):
method get_lun_group_details (line 718) | def get_lun_group_details(self, lun_groups_id):
method list_port_groups (line 743) | def list_port_groups(self, ctx):
method list_masking_views (line 812) | def list_masking_views(self, ctx):
method get_host_views (line 828) | def get_host_views(self, list_masking_views,
method get_host_group_views (line 869) | def get_host_group_views(self, view_id_dict, list_masking_views,
method get_group_key (line 911) | def get_group_key(views_group_row, regular_str, key):
FILE: delfin/drivers/h3c/unistor_cf/unistor_cf.py
class H3cUniStorCfDriver (line 18) | class H3cUniStorCfDriver(Hpe3parStorDriver):
method get_storage (line 19) | def get_storage(self, context):
FILE: delfin/drivers/helper.py
function encrypt_password (line 26) | def encrypt_password(context, access_info):
function check_storage_repetition (line 33) | def check_storage_repetition(context, storage):
function check_storage_consistency (line 50) | def check_storage_consistency(context, storage_id, storage_new):
FILE: delfin/drivers/hitachi/hnas/hds_nas.py
class HitachiHNasDriver (line 19) | class HitachiHNasDriver(driver.StorageDriver):
method __init__ (line 21) | def __init__(self, **kwargs):
method reset_connection (line 26) | def reset_connection(self, context, **kwargs):
method get_storage (line 29) | def get_storage(self, context):
method list_storage_pools (line 32) | def list_storage_pools(self, context):
method list_volumes (line 35) | def list_volumes(self, context):
method list_controllers (line 38) | def list_controllers(self, context):
method list_ports (line 41) | def list_ports(self, context):
method list_disks (line 44) | def list_disks(self, context):
method list_alerts (line 47) | def list_alerts(self, context, query_para=None):
method list_qtrees (line 50) | def list_qtrees(self, context):
method list_quotas (line 53) | def list_quotas(self, context):
method list_filesystems (line 56) | def list_filesystems(self, context):
method list_shares (line 59) | def list_shares(self, context):
method add_trap_config (line 62) | def add_trap_config(self, context, trap_config):
method remove_trap_config (line 65) | def remove_trap_config(self, context, trap_config):
method parse_alert (line 69) | def parse_alert(context, alert):
method clear_alert (line 72) | def clear_alert(self, context, alert):
method get_access_url (line 76) | def get_access_url():
FILE: delfin/drivers/hitachi/hnas/nas_handler.py
class NasHandler (line 33) | class NasHandler(object):
method __init__ (line 35) | def __init__(self, **kwargs):
method ssh_do_exec (line 39) | def ssh_do_exec(self, command_list):
method login (line 53) | def login(self):
method format_data_to_map (line 64) | def format_data_to_map(
method get_table_data (line 101) | def get_table_data(values, is_alert=False):
method format_storage_info (line 112) | def format_storage_info(self, storage_map_list,
method get_storage (line 156) | def get_storage(self):
method get_disk (line 188) | def get_disk(self, storage_id):
method get_pool_size (line 242) | def get_pool_size(self):
method get_pool (line 258) | def get_pool(self, storage_id):
method list_controllers (line 303) | def list_controllers(self, storage_id):
method format_alert_list (line 337) | def format_alert_list(alert_array, query_para):
method list_alerts (line 390) | def list_alerts(self, query_para):
method parse_alert (line 416) | def parse_alert(alert):
method list_ports (line 454) | def list_ports(self, storage_id):
method get_fc_port (line 469) | def get_fc_port(self, storage_id):
method list_filesystems (line 521) | def list_filesystems(self, storage_id):
method get_fs_evs (line 581) | def get_fs_evs(self):
method list_quotas (line 591) | def list_quotas(self, storage_id):
method list_qtrees (line 664) | def list_qtrees(self, storage_id):
method get_qtree (line 679) | def get_qtree(self, evs_list, storage_id):
method get_cifs_share (line 704) | def get_cifs_share(self, evs_list, storage_id):
method get_nfs_share (line 744) | def get_nfs_share(self, evs_list, storage_id):
method list_shares (line 785) | def list_shares(self, storage_id):
FILE: delfin/drivers/hitachi/vsp/rest_handler.py
class RestHandler (line 30) | class RestHandler(RestClient):
method __init__ (line 36) | def __init__(self, **kwargs):
method call (line 44) | def call(self, url, data=None, method=None,
method call_with_token (line 71) | def call_with_token(self, url, data, method, calltimeout):
method get_rest_info (line 84) | def get_rest_info(self, url, timeout=consts.SOCKET_TIMEOUT, data=None):
method get_token (line 95) | def get_token(self):
method login (line 140) | def login(self):
method logout (line 147) | def logout(self):
method get_device_id (line 170) | def get_device_id(self):
method get_firmware_version (line 201) | def get_firmware_version(self):
method get_capacity (line 211) | def get_capacity(self):
method get_all_pools (line 217) | def get_all_pools(self):
method get_volumes (line 223) | def get_volumes(self, head_id,
method get_system_info (line 231) | def get_system_info(self):
method get_controllers (line 236) | def get_controllers(self):
method get_disks (line 242) | def get_disks(self):
method get_all_ports (line 248) | def get_all_ports(self):
method get_detail_ports (line 254) | def get_detail_ports(self, port_id):
method get_alerts (line 260) | def get_alerts(self, param, start, end):
method get_all_host_groups (line 267) | def get_all_host_groups(self):
method get_specific_host_group (line 273) | def get_specific_host_group(self, port_id):
method get_host_wwn (line 279) | def get_host_wwn(self, port_id, group_number):
method get_iscsi_name (line 286) | def get_iscsi_name(self, port_id, group_number):
method get_lun_path (line 293) | def get_lun_path(self, port_id, group_number):
method get_volumes_with_defined (line 301) | def get_volumes_with_defined(self):
FILE: delfin/drivers/hitachi/vsp/vsp_stor.py
class HitachiVspDriver (line 31) | class HitachiVspDriver(driver.StorageDriver):
method __init__ (line 103) | def __init__(self, **kwargs):
method reset_connection (line 108) | def reset_connection(self, context, **kwargs):
method close_connection (line 113) | def close_connection(self):
method get_storage (line 116) | def get_storage(self, context):
method list_storage_pools (line 162) | def list_storage_pools(self, context):
method to_vsp_lun_id_format (line 204) | def to_vsp_lun_id_format(lun_id):
method list_volumes (line 217) | def list_volumes(self, context):
method parse_volumes (line 244) | def parse_volumes(self, volumes):
method list_controllers (line 310) | def list_controllers(self, context):
method list_ports (line 335) | def list_ports(self, context):
method list_disks (line 392) | def list_disks(self, context):
method parse_queried_alerts (line 437) | def parse_queried_alerts(alerts, alert_list, query_para=None):
method list_alerts (line 465) | def list_alerts(self, context, query_para=None):
method add_trap_config (line 491) | def add_trap_config(self, context, trap_config):
method remove_trap_config (line 494) | def remove_trap_config(self, context, trap_config):
method parse_alert (line 498) | def parse_alert(context, alert):
method clear_alert (line 530) | def clear_alert(self, context, alert):
method handle_group_with_port (line 534) | def handle_group_with_port(group_info):
method get_host_info (line 550) | def get_host_info(data, storage_id, host_list, type, os_type):
method list_storage_hosts (line 576) | def list_storage_hosts(self, context):
method get_initiator_from_host (line 597) | def get_initiator_from_host(data, storage_id, initiator_list, type):
method list_storage_host_initiators (line 627) | def list_storage_host_initiators(self, context):
method get_host_ids (line 648) | def get_host_ids(data, target, host_ids, host_grp_relation_list,
method list_storage_host_groups (line 665) | def list_storage_host_groups(self, context):
method handle_lun_path (line 691) | def handle_lun_path(self, **kwargs):
method list_masking_views (line 714) | def list_masking_views(self, context):
method handle_san_info (line 733) | def handle_san_info(self, **kwargs):
FILE: delfin/drivers/hpe/hpe_3par/alert_handler.py
class AlertHandler (line 27) | class AlertHandler(object):
method __init__ (line 88) | def __init__(self, rest_handler=None, ssh_handler=None):
method parse_alert (line 93) | def parse_alert(context, alert):
method add_trap_config (line 132) | def add_trap_config(self, context, storage_id, trap_config):
method remove_trap_config (line 137) | def remove_trap_config(self, context, storage_id, trap_config):
method clear_alert (line 142) | def clear_alert(self, context, alert):
method judge_alert_time (line 160) | def judge_alert_time(map, query_para):
method handle_alters (line 178) | def handle_alters(self, alertlist, query_para):
method list_alerts (line 212) | def list_alerts(self, context, query_para):
method get_time_stamp (line 236) | def get_time_stamp(time_str):
method get_alert_type (line 254) | def get_alert_type(message_code):
FILE: delfin/drivers/hpe/hpe_3par/component_handler.py
class ComponentHandler (line 30) | class ComponentHandler():
method __init__ (line 50) | def __init__(self, rest_handler=None, ssh_handler=None):
method set_storage_id (line 54) | def set_storage_id(self, storage_id):
method get_storage (line 57) | def get_storage(self, context):
method list_storage_pools (line 98) | def list_storage_pools(self, context):
method handler_volume (line 153) | def handler_volume(self, volumes, pool_ids):
method list_volumes (line 200) | def list_volumes(self, context):
method list_controllers (line 224) | def list_controllers(self, storage_id):
method list_disks (line 266) | def list_disks(self, storage_id):
method list_ports (line 318) | def list_ports(self, storage_id):
method parse_speed (line 409) | def parse_speed(self, speed_value):
method collect_perf_metrics (line 428) | def collect_perf_metrics(self, storage_id, resource_metrics,
method get_pool_metrics (line 476) | def get_pool_metrics(self, storage_id, metric_list,
method _get_metric_model (line 509) | def _get_metric_model(self, metric_list, labels, metric_values, obj_cap):
method get_port_metrics (line 528) | def get_port_metrics(self, storage_id, metric_list,
method get_disk_metrics (line 552) | def get_disk_metrics(self, storage_id, metric_list,
method get_volume_metrics (line 576) | def get_volume_metrics(self, storage_id, metric_list,
method ssh_format_metrics_data (line 606) | def ssh_format_metrics_data(self, start_time, end_time, get_obj_metrics,
method rest_format_metrics_data (line 666) | def rest_format_metrics_data(self, start_time, end_time, get_obj_metrics,
method get_latest_perf_timestamp (line 730) | def get_latest_perf_timestamp(self):
method convert_to_system_time (line 739) | def convert_to_system_time(self, occur_time):
method list_storage_host_initiators (line 750) | def list_storage_host_initiators(self, storage_id):
method list_storage_hosts (line 779) | def list_storage_hosts(self, storage_id):
method list_storage_host_groups (line 807) | def list_storage_host_groups(self, storage_id):
method list_port_groups (line 854) | def list_port_groups(self, storage_id):
method list_volume_groups (line 893) | def list_volume_groups(self, storage_id):
method list_masking_views (line 938) | def list_masking_views(self, storage_id):
FILE: delfin/drivers/hpe/hpe_3par/hpe_3parstor.py
class Hpe3parStorDriver (line 31) | class Hpe3parStorDriver(driver.StorageDriver):
method __init__ (line 35) | def __init__(self, **kwargs):
method reset_connection (line 52) | def reset_connection(self, context, **kwargs):
method close_connection (line 61) | def close_connection(self):
method get_storage (line 64) | def get_storage(self, context):
method list_storage_pools (line 67) | def list_storage_pools(self, context):
method list_volumes (line 71) | def list_volumes(self, context):
method list_controllers (line 75) | def list_controllers(self, context):
method list_ports (line 78) | def list_ports(self, context):
method list_disks (line 81) | def list_disks(self, context):
method list_alerts (line 84) | def list_alerts(self, context, query_para=None):
method add_trap_config (line 87) | def add_trap_config(self, context, trap_config):
method remove_trap_config (line 90) | def remove_trap_config(self, context, trap_config):
method parse_alert (line 94) | def parse_alert(context, alert):
method clear_alert (line 97) | def clear_alert(self, context, alert):
method list_storage_host_initiators (line 100) | def list_storage_host_initiators(self, context):
method list_storage_hosts (line 103) | def list_storage_hosts(self, context):
method collect_perf_metrics (line 106) | def collect_perf_metrics(self, context, storage_id, resource_metrics,
method get_capabilities (line 113) | def get_capabilities(context, filters=None):
method get_latest_perf_timestamp (line 125) | def get_latest_perf_timestamp(self, context):
method list_storage_host_groups (line 128) | def list_storage_host_groups(self, context):
method list_port_groups (line 131) | def list_port_groups(self, context):
method list_volume_groups (line 134) | def list_volume_groups(self, context):
method list_masking_views (line 137) | def list_masking_views(self, context):
FILE: delfin/drivers/hpe/hpe_3par/rest_handler.py
class RestHandler (line 29) | class RestHandler(object):
method __init__ (line 52) | def __init__(self, rest_client):
method call (line 56) | def call(self, url, data=None, method=None):
method get_resinfo_call (line 107) | def get_resinfo_call(self, url, data=None, method=None):
method login (line 120) | def login(self):
method logout (line 174) | def logout(self):
method call_with_token (line 195) | def call_with_token(self, url, data=None, method='GET',
method get_storage (line 211) | def get_storage(self):
method get_capacity (line 216) | def get_capacity(self):
method get_all_pools (line 221) | def get_all_pools(self):
method get_all_volumes (line 226) | def get_all_volumes(self):
method get_pool_metrics (line 231) | def get_pool_metrics(self, start_time, end_time):
method list_storage_host (line 241) | def list_storage_host(self):
FILE: delfin/drivers/hpe/hpe_3par/ssh_handler.py
class SSHHandler (line 32) | class SSHHandler(object):
method __init__ (line 67) | def __init__(self, **kwargs):
method login (line 71) | def login(self, context):
method get_version (line 83) | def get_version(self, wsapi_infos):
method get_health_state (line 96) | def get_health_state(self):
method get_all_alerts (line 104) | def get_all_alerts(self):
method remove_alerts (line 107) | def remove_alerts(self, alert_id):
method get_controllers (line 119) | def get_controllers(self):
method get_controllers_cpu (line 128) | def get_controllers_cpu(self):
method get_controllers_version (line 137) | def get_controllers_version(self):
method parse_node_version (line 142) | def parse_node_version(self, resource_info, pattern_str, para_map=None):
method split_str_by_colon (line 168) | def split_str_by_colon(self, str_line):
method get_disks (line 182) | def get_disks(self):
method get_disks_inventory (line 187) | def get_disks_inventory(self):
method get_ports (line 200) | def get_ports(self):
method get_ports_inventory (line 205) | def get_ports_inventory(self):
method get_ports_config (line 215) | def get_ports_config(self):
method get_ports_iscsi (line 225) | def get_ports_iscsi(self):
method get_ports_connected (line 235) | def get_ports_connected(self):
method get_ports_rcip (line 245) | def get_ports_rcip(self):
method get_ports_fs (line 255) | def get_ports_fs(self):
method get_ports_fcoe (line 265) | def get_ports_fcoe(self):
method parse_datas_to_list (line 275) | def parse_datas_to_list(self, resource_info, pattern_str, para_map=None):
method parse_datas_to_map (line 355) | def parse_datas_to_map(self, resource_info, pattern_str, para_map=None):
method parse_disk_table (line 393) | def parse_disk_table(self, cols_size, titles_size, str_info,
method parse_node_table (line 408) | def parse_node_table(self, cols_size, titles_size, str_info, obj_list,
method parse_node_cpu (line 425) | def parse_node_cpu(self, cols_size, titles_size, str_info, obj_map,
method parse_metric_table (line 440) | def parse_metric_table(self, cols_size, titles_size, str_info,
method get_index_of_key (line 459) | def get_index_of_key(self, titles_list, key):
method get_resources_info (line 466) | def get_resources_info(self, command, parse_type, pattern_str=None,
method exec_command (line 480) | def exec_command(self, command):
method get_volumes (line 491) | def get_volumes(self):
method get_port_metrics (line 496) | def get_port_metrics(self, start_time, end_time):
method get_disk_metrics (line 505) | def get_disk_metrics(self, start_time, end_time):
method get_volume_metrics (line 516) | def get_volume_metrics(self, start_time, end_time):
method list_storage_host_groups (line 525) | def list_storage_host_groups(self):
method list_volume_groups (line 535) | def list_volume_groups(self):
method parse_set_groups_table (line 545) | def parse_set_groups_table(self, cols_size, titles_size, str_info,
method parse_view_table (line 571) | def parse_view_table(self, cols_size, titles_size, str_info, obj_list,
method get_resources_ids (line 582) | def get_resources_ids(self, command, pattern_str, para_map=None):
method list_storage_host_initiators (line 593) | def list_storage_host_initiators(self):
method list_masking_views (line 599) | def list_masking_views(self):
FILE: delfin/drivers/hpe/hpe_msa/consts.py
class AlertOIDNumber (line 4) | class AlertOIDNumber(object):
class StorageVendor (line 13) | class StorageVendor(object):
class TrapSeverity (line 17) | class TrapSeverity(object):
class SecondsNumber (line 38) | class SecondsNumber(object):
class RpmSpeed (line 42) | class RpmSpeed(object):
class DiskPhysicalType (line 46) | class DiskPhysicalType(object):
class InitiatorType (line 53) | class InitiatorType(object):
class HostOSTypes (line 61) | class HostOSTypes(object):
FILE: delfin/drivers/hpe/hpe_msa/hpe_msastor.py
class HpeMsaStorDriver (line 6) | class HpeMsaStorDriver(driver.StorageDriver):
method __init__ (line 8) | def __init__(self, **kwargs):
method reset_connection (line 12) | def reset_connection(self, context, **kwargs):
method get_storage (line 15) | def get_storage(self, context):
method list_storage_pools (line 18) | def list_storage_pools(self, context):
method list_volumes (line 21) | def list_volumes(self, context):
method list_controllers (line 24) | def list_controllers(self, context):
method list_ports (line 28) | def list_ports(self, context):
method list_disks (line 31) | def list_disks(self, context):
method list_alerts (line 34) | def list_alerts(self, context, query_para=None):
method add_trap_config (line 37) | def add_trap_config(self, context, trap_config):
method remove_trap_config (line 40) | def remove_trap_config(self, context, trap_config):
method parse_alert (line 44) | def parse_alert(context, alert):
method clear_alert (line 47) | def clear_alert(self, context, alert):
method list_storage_host_initiators (line 50) | def list_storage_host_initiators(self, context):
method list_storage_hosts (line 53) | def list_storage_hosts(self, context):
method list_storage_host_groups (line 56) | def list_storage_host_groups(self, context):
method list_port_groups (line 59) | def list_port_groups(self, context):
method list_volume_groups (line 62) | def list_volume_groups(self, context):
method list_masking_views (line 65) | def list_masking_views(self, context):
method get_access_url (line 69) | def get_access_url():
FILE: delfin/drivers/hpe/hpe_msa/ssh_handler.py
class SSHHandler (line 22) | class SSHHandler(object):
method __init__ (line 24) | def __init__(self, **kwargs):
method login (line 27) | def login(self):
method get_storage (line 35) | def get_storage(self, storage_id):
method list_storage_disks (line 86) | def list_storage_disks(self, storage_id):
method list_storage_ports (line 125) | def list_storage_ports(self, storage_id):
method list_storage_controller (line 191) | def list_storage_controller(self, storage_id):
method list_storage_volume (line 230) | def list_storage_volume(self, storage_id):
method list_storage_pools (line 280) | def list_storage_pools(self, storage_id):
method parse_string_to_bytes (line 320) | def parse_string_to_bytes(value):
method handle_xml_to_json (line 335) | def handle_xml_to_json(detail_info, element):
method list_alerts (line 350) | def list_alerts(self, query_para):
method get_last_alert_data (line 406) | def get_last_alert_data(alert_json):
method parse_alert (line 416) | def parse_alert(alert):
method split_by_char_and_number (line 460) | def split_by_char_and_number(split_str, split_char, arr_number):
method handle_xml_to_dict (line 471) | def handle_xml_to_dict(xml_info, element):
method list_storage_host_initiators (line 484) | def list_storage_host_initiators(self, storage_id):
method list_storage_hosts (line 518) | def list_storage_hosts(self, storage_id):
method list_storage_host_groups (line 548) | def list_storage_host_groups(self, storage_id):
method list_volume_groups (line 594) | def list_volume_groups(self, storage_id):
method list_port_groups (line 637) | def list_port_groups(self, storage_id):
method get_port_group_id_and_name (line 688) | def get_port_group_id_and_name(port_number, storage_port_list):
method list_masking_views (line 706) | def list_masking_views(self, storage_id):
method get_storage_view_list (line 735) | def get_storage_view_list(self, storage_view_list, vol_type, storage_id,
method get_storage_host_id (line 776) | def get_storage_host_id(host_list, mapped_id, initiators_list,
FILE: delfin/drivers/huawei/oceanstor/alert_handler.py
class AlertHandler (line 28) | class AlertHandler(object):
method parse_alert (line 78) | def parse_alert(context, alert):
method parse_queried_alerts (line 139) | def parse_queried_alerts(self, alert_list, query_para):
method add_trap_config (line 176) | def add_trap_config(self, context, storage_id, trap_config):
method remove_trap_config (line 181) | def remove_trap_config(self, context, storage_id, trap_config):
method clear_alert (line 186) | def clear_alert(self, context, storage_id, alert):
method _is_hex (line 192) | def _is_hex(value):
FILE: delfin/drivers/huawei/oceanstor/oceanstor.py
class OceanStorDriver (line 35) | class OceanStorDriver(driver.StorageDriver):
method __init__ (line 39) | def __init__(self, **kwargs):
method reset_connection (line 45) | def reset_connection(self, context, **kwargs):
method get_storage (line 48) | def get_storage(self, context):
method list_storage_pools (line 86) | def list_storage_pools(self, context):
method _get_orig_pool_id (line 129) | def _get_orig_pool_id(self, pools, volume):
method list_volumes (line 135) | def list_volumes(self, context):
method list_controllers (line 189) | def list_controllers(self, context):
method list_ports (line 220) | def list_ports(self, context):
method list_disks (line 291) | def list_disks(self, context):
method _list_quotas (line 339) | def _list_quotas(self, quotas, fs_id, qt_id):
method list_quotas (line 378) | def list_quotas(self, context):
method list_filesystems (line 404) | def list_filesystems(self, context):
method list_qtrees (line 463) | def list_qtrees(self, context):
method list_shares (line 495) | def list_shares(self, context):
method add_trap_config (line 527) | def add_trap_config(self, context, trap_config):
method remove_trap_config (line 530) | def remove_trap_config(self, context, trap_config):
method parse_alert (line 534) | def parse_alert(context, alert):
method clear_alert (line 537) | def clear_alert(self, context, sequence_number):
method list_alerts (line 540) | def list_alerts(self, context, query_para):
method collect_perf_metrics (line 547) | def collect_perf_metrics(self, context, storage_id,
method get_capabilities (line 604) | def get_capabilities(context, filters=None):
method list_storage_host_initiators (line 617) | def list_storage_host_initiators(self, ctx):
method list_storage_hosts (line 662) | def list_storage_hosts(self, ctx):
method list_storage_host_groups (line 693) | def list_storage_host_groups(self, ctx):
method list_port_groups (line 723) | def list_port_groups(self, ctx):
method list_volume_groups (line 753) | def list_volume_groups(self, ctx):
method list_masking_views (line 784) | def list_masking_views(self, ctx):
FILE: delfin/drivers/huawei/oceanstor/oid_mapper.py
class OidMapper (line 16) | class OidMapper(object):
method __init__ (line 34) | def __init__(self):
method map_oids (line 38) | def map_oids(alert):
FILE: delfin/drivers/huawei/oceanstor/rest_client.py
function _get_timestamp_values (line 35) | def _get_timestamp_values(metric, value):
function _get_selection (line 40) | def _get_selection(selection):
class RestClient (line 53) | class RestClient(object):
method __init__ (line 56) | def __init__(self, **kwargs):
method reset_connection (line 77) | def reset_connection(self, **kwargs):
method init_http_head (line 86) | def init_http_head(self):
method do_call (line 102) | def do_call(self, url, data, method,
method login (line 158) | def login(self):
method call (line 198) | def call(self, url, data=None, method=None, log_filter_flag=False):
method paginated_call (line 225) | def paginated_call(self, url, data=None, method=None,
method logout (line 253) | def logout(self):
method _assert_rest_result (line 260) | def _assert_rest_result(self, result, err_str):
method _assert_data_in_result (line 267) | def _assert_data_in_result(self, result, msg):
method get_storage (line 273) | def get_storage(self):
method get_all_controllers (line 283) | def get_all_controllers(self):
method get_all_ports (line 293) | def get_all_ports(self):
method get_all_volumes (line 321) | def get_all_volumes(self):
method get_all_disks (line 325) | def get_all_disks(self):
method get_all_pools (line 329) | def get_all_pools(self):
method get_all_filesystems (line 333) | def get_all_filesystems(self):
method get_all_qtrees (line 337) | def get_all_qtrees(self, filesystems):
method get_all_filesystem_quotas (line 347) | def get_all_filesystem_quotas(self, fs_id):
method get_all_qtree_quotas (line 353) | def get_all_qtree_quotas(self, qt_id):
method get_all_shares (line 359) | def get_all_shares(self):
method get_all_mapping_views (line 371) | def get_all_mapping_views(self):
method get_all_associate_resources (line 376) | def get_all_associate_resources(self, url, obj_type, obj_id):
method get_all_associate_mapping_views (line 382) | def get_all_associate_mapping_views(self, obj_type, obj_id):
method get_all_associate_hosts (line 386) | def get_all_associate_hosts(self, obj_type, obj_id):
method get_all_associate_volumes (line 390) | def get_all_associate_volumes(self, obj_type, obj_id):
method get_all_associate_ports (line 394) | def get_all_associate_ports(self, obj_type, obj_id):
method get_all_hosts (line 404) | def get_all_hosts(self):
method get_all_initiators (line 409) | def get_all_initiators(self):
method get_all_host_groups (line 418) | def get_all_host_groups(self):
method get_all_port_groups (line 423) | def get_all_port_groups(self):
method get_all_volume_groups (line 428) | def get_all_volume_groups(self):
method clear_alert (line 433) | def clear_alert(self, sequence_number):
method list_alerts (line 444) | def list_alerts(self):
method _get_performance_switch (line 452) | def _get_performance_switch(self):
method _set_performance_switch (line 461) | def _set_performance_switch(self, value):
method _get_performance_strategy (line 471) | def _get_performance_strategy(self):
method _set_performance_strategy (line 480) | def _set_performance_strategy(self, hist_enable=1, hist_duration=60,
method _get_metrics (line 497) | def _get_metrics(self, resource_type, resource_id, metrics_ids):
method enable_metrics_collection (line 505) | def enable_metrics_collection(self):
method disable_metrics_collection (line 508) | def disable_metrics_collection(self):
method configure_metrics_collection (line 511) | def configure_metrics_collection(self):
method get_pool_metrics (line 518) | def get_pool_metrics(self, storage_id, selection):
method get_volume_metrics (line 551) | def get_volume_metrics(self, storage_id, selection):
method get_controller_metrics (line 585) | def get_controller_metrics(self, storage_id, selection):
method get_port_metrics (line 620) | def get_port_metrics(self, storage_id, selection):
method get_disk_metrics (line 657) | def get_disk_metrics(self, storage_id, selection):
FILE: delfin/drivers/ibm/ds8k/alert_handler.py
class AlertHandler (line 26) | class AlertHandler(object):
method parse_queried_alerts (line 36) | def parse_queried_alerts(self, alert_model_list, alert_list, query_para):
FILE: delfin/drivers/ibm/ds8k/ds8k.py
class DS8KDriver (line 26) | class DS8KDriver(driver.StorageDriver):
method __init__ (line 43) | def __init__(self, **kwargs):
method reset_connection (line 48) | def reset_connection(self, context, **kwargs):
method close_connection (line 53) | def close_connection(self):
method get_storage (line 56) | def get_storage(self, context):
method list_storage_pools (line 113) | def list_storage_pools(self, context):
method list_volumes (line 141) | def list_volumes(self, context):
method list_alerts (line 179) | def list_alerts(self, context, query_para=None):
method division_port_wwn (line 188) | def division_port_wwn(original_wwn):
method list_ports (line 201) | def list_ports(self, context):
method list_controllers (line 232) | def list_controllers(self, context):
method add_trap_config (line 250) | def add_trap_config(self, context, trap_config):
method remove_trap_config (line 253) | def remove_trap_config(self, context, trap_config):
method parse_alert (line 257) | def parse_alert(context, alert):
method clear_alert (line 260) | def clear_alert(self, context, alert):
method get_access_url (line 264) | def get_access_url():
method list_storage_hosts (line 267) | def list_storage_hosts(self, context):
method list_masking_views (line 294) | def list_masking_views(self, context):
method list_storage_host_initiators (line 323) | def list_storage_host_initiators(self, context):
FILE: delfin/drivers/ibm/ds8k/rest_handler.py
class RestHandler (line 27) | class RestHandler(RestClient):
method __init__ (line 30) | def __init__(self, **kwargs):
method call_with_token (line 34) | def call_with_token(self, url, data, method):
method call (line 46) | def call(self, url, data=None, method=None):
method get_rest_info (line 62) | def get_rest_info(self, url, data=None, method='GET'):
method login (line 69) | def login(self):
method logout (line 102) | def logout(self):
FILE: delfin/drivers/ibm/storwize_svc/ssh_handler.py
class SSHHandler (line 34) | class SSHHandler(object):
method __init__ (line 147) | def __init__(self, **kwargs):
method handle_split (line 151) | def handle_split(split_str, split_char, arr_number):
method parse_alert (line 162) | def parse_alert(alert):
method login (line 201) | def login(self):
method do_exec (line 213) | def do_exec(command_str, ssh):
method exec_ssh_command (line 239) | def exec_ssh_command(self, command):
method change_capacity_to_bytes (line 249) | def change_capacity_to_bytes(self, unit):
method parse_string (line 263) | def parse_string(self, value):
method get_storage (line 274) | def get_storage(self):
method handle_detail (line 321) | def handle_detail(self, deltail_info, detail_map, split):
method list_storage_pools (line 332) | def list_storage_pools(self, storage_id):
method list_volumes (line 378) | def list_volumes(self, storage_id):
method list_alerts (line 435) | def list_alerts(self, query_para):
method fix_alert (line 487) | def fix_alert(self, alert):
method list_controllers (line 495) | def list_controllers(self, storage_id):
method list_disks (line 545) | def list_disks(self, storage_id):
method get_fc_port (line 585) | def get_fc_port(self, storage_id):
method get_iscsi_port (line 628) | def get_iscsi_port(self, storage_id):
method change_speed_to_bytes (line 681) | def change_speed_to_bytes(unit):
method handle_port_bps (line 695) | def handle_port_bps(self, value, port_type):
method list_ports (line 711) | def list_ports(self, storage_id):
method handle_stats_filename (line 723) | def handle_stats_filename(file_name, file_map):
method get_stats_filelist (line 735) | def get_stats_filelist(self, file_map):
method packege_data (line 749) | def packege_data(self, storage_id, resource_type, metrics, metric_map):
method count_metric_data (line 807) | def count_metric_data(last_data, now_data, interval, target, metric_type,
method count_difference (line 841) | def count_difference(now_value, last_value):
method handle_volume_cach_hit (line 845) | def handle_volume_cach_hit(now_data, last_data):
method get_date_from_each_file (line 861) | def get_date_from_each_file(self, file, metric_map, target_list,
method get_stats_from_file (line 912) | def get_stats_from_file(self, file_list, metric_map, target_list,
method package_xml_data (line 936) | def package_xml_data(file_data, file_time, resource_type):
method get_stats_file_data (line 991) | def get_stats_file_data(self, file_map, res_type, metrics, storage_id,
method collect_perf_metrics (line 1015) | def collect_perf_metrics(self, storage_id, resource_metrics,
method get_latest_perf_timestamp (line 1060) | def get_latest_perf_timestamp(self):
method list_storage_hosts (line 1080) | def list_storage_hosts(self, storage_id):
method list_masking_views (line 1110) | def list_masking_views(self, storage_id):
method list_storage_host_initiators (line 1137) | def list_storage_host_initiators(self, storage_id):
FILE: delfin/drivers/ibm/storwize_svc/storwize_svc.py
class StorwizeSVCDriver (line 20) | class StorwizeSVCDriver(driver.StorageDriver):
method __init__ (line 22) | def __init__(self, **kwargs):
method reset_connection (line 27) | def reset_connection(self, context, **kwargs):
method get_storage (line 30) | def get_storage(self, context):
method list_storage_pools (line 33) | def list_storage_pools(self, context):
method list_volumes (line 36) | def list_volumes(self, context):
method list_controllers (line 39) | def list_controllers(self, context):
method list_ports (line 42) | def list_ports(self, context):
method list_disks (line 45) | def list_disks(self, context):
method list_alerts (line 48) | def list_alerts(self, context, query_para=None):
method add_trap_config (line 51) | def add_trap_config(self, context, trap_config):
method remove_trap_config (line 54) | def remove_trap_config(self, context, trap_config):
method parse_alert (line 58) | def parse_alert(context, alert):
method clear_alert (line 61) | def clear_alert(self, context, alert):
method get_access_url (line 65) | def get_access_url():
method collect_perf_metrics (line 68) | def collect_perf_metrics(self, context, storage_id,
method get_capabilities (line 75) | def get_capabilities(context, filters=None):
method get_latest_perf_timestamp (line 87) | def get_latest_perf_timestamp(self, context):
method list_storage_hosts (line 90) | def list_storage_hosts(self, context):
method list_masking_views (line 93) | def list_masking_views(self, context):
method list_storage_host_initiators (line 96) | def list_storage_host_initiators(self, context):
FILE: delfin/drivers/inspur/as5500/as5500.py
class As5500Driver (line 18) | class As5500Driver(StorwizeSVCDriver):
method get_storage (line 19) | def get_storage(self, context):
FILE: delfin/drivers/macro_san/ms/consts.py
class digital_constant (line 114) | class digital_constant(object):
class POOL_STATUS_ABNORMAL (line 155) | class POOL_STATUS_ABNORMAL(object):
class POOL_STATUS_NORMAL (line 163) | class POOL_STATUS_NORMAL(object):
FILE: delfin/drivers/macro_san/ms/macro_ssh_client.py
class MacroSanSSHPool (line 29) | class MacroSanSSHPool(SSHPool):
method create (line 30) | def create(self):
method do_exec_shell (line 64) | def do_exec_shell(self, command_list, sleep_time=0.5):
FILE: delfin/drivers/macro_san/ms/ms_handler.py
class MsHandler (line 41) | class MsHandler(object):
method __init__ (line 43) | def __init__(self, **kwargs):
method login (line 49) | def login(self):
method get_storage (line 65) | def get_storage(self, storage_id):
method get_storage_model (line 99) | def get_storage_model(self, storage_id):
method analysis_model_file (line 113) | def analysis_model_file(local_path, storage_model):
method download_model_file (line 127) | def download_model_file(self, storage_id):
method get_firmware_version (line 154) | def get_firmware_version(self):
method get_storage_status (line 168) | def get_storage_status(self, storage_id):
method list_storage_pools (line 183) | def list_storage_pools(self, storage_id):
method get_pool_status (line 204) | def get_pool_status(self, pool_name):
method list_volumes (line 223) | def list_volumes(self, storage_id):
method get_used_capacity (line 253) | def get_used_capacity(thin_provisioning, total_capacity, volume):
method get_total_capacity (line 265) | def get_total_capacity(volume):
method list_controllers (line 275) | def list_controllers(self, storage_id):
method get_cup_information (line 308) | def get_cup_information(self):
method list_disks (line 339) | def list_disks(self, storage_id):
method list_ports (line 369) | def list_ports(self, storage_id):
method get_fc_port_encapsulation (line 374) | def get_fc_port_encapsulation(self, storage_id):
method parse_alert (line 402) | def parse_alert(alert):
method list_storage_host_initiators (line 437) | def list_storage_host_initiators(self, storage_id):
method list_storage_hosts_old (line 466) | def list_storage_hosts_old(self, storage_id):
method list_storage_hosts_new (line 490) | def list_storage_hosts_new(self, storage_id):
method list_storage_host_groups (line 511) | def list_storage_host_groups(self, storage_id):
method list_volume_groups (line 542) | def list_volume_groups(self, storage_id):
method list_masking_views_old (line 573) | def list_masking_views_old(self, storage_id):
method list_masking_views_new (line 594) | def list_masking_views_new(self, storage_id):
method do_exec (line 611) | def do_exec(self, command_str, sleep_time=0.5, mix_time=consts.TIME_LI...
method get_data_query (line 637) | def get_data_query(self, command):
method get_storage_version (line 651) | def get_storage_version(self):
method get_data_list (line 681) | def get_data_list(self, command, contains_fields, space=' ',
method get_volumes (line 703) | def get_volumes(self, storage_id):
method get_disks (line 718) | def get_disks(self):
method get_fc_port (line 739) | def get_fc_port(self):
method get_sas_port_data (line 770) | def get_sas_port_data(self, storage_id):
method get_sas_encapsulation_data (line 791) | def get_sas_encapsulation_data(self, sas_data_map, sas_list, storage_id):
method capacity_conversion (line 819) | def capacity_conversion(capacity_str):
method get_sas_data_list (line 829) | def get_sas_data_list(self, command, contains_fields):
method get_port_type (line 855) | def get_port_type(fc_port_id_lower):
method numbers_character (line 869) | def numbers_character(character_string):
method get_initiators_host_relation (line 874) | def get_initiators_host_relation(self):
method collect_perf_metrics (line 883) | def collect_perf_metrics(self, storage_id, resource_metrics, start_time,
method get_fc_port_metrics (line 935) | def get_fc_port_metrics(self, end_time, resource_disk, start_time,
method get_disk_metrics (line 957) | def get_disk_metrics(self, end_time, resource_disk, start_time,
method get_port_metrics (line 980) | def get_port_metrics(self, end_time, resource_port, start_time,
method get_volume_metrics (line 1000) | def get_volume_metrics(self, end_time, resource_volume, start_time,
method get_storage_metrics (line 1023) | def get_storage_metrics(self, end_time, resource_storage, start_time,
method get_storages (line 1046) | def get_storages(self):
method down_perf_file (line 1054) | def down_perf_file(self, folder, storage_id, pattern):
method get_identification (line 1087) | def get_identification(self):
method get_controller (line 1104) | def get_controller(self):
method get_volume_uuid (line 1115) | def get_volume_uuid(self):
method analysis_per_file (line 1130) | def analysis_per_file(self, local_path, start_time, end_time,
method get_resource_key (line 1162) | def get_resource_key(dir_name, resource_key, resource_type, uuid_map):
method get_perf_data (line 1181) | def get_perf_data(row, timestamp_s):
method storage_packaging_data (line 1223) | def storage_packaging_data(storage_id, metrics_data, resource_metrics,
method packaging_metrics (line 1247) | def packaging_metrics(storage_id, metrics_data, resource_metrics,
method get_timestamp_s (line 1273) | def get_timestamp_s(time_str):
method get_latest_perf_timestamp (line 1279) | def get_latest_perf_timestamp(self):
FILE: delfin/drivers/macro_san/ms/ms_stor.py
class MacroSanDriver (line 25) | class MacroSanDriver(driver.StorageDriver):
method __init__ (line 27) | def __init__(self, **kwargs):
method get_storage (line 32) | def get_storage(self, context):
method list_storage_pools (line 35) | def list_storage_pools(self, context):
method list_volumes (line 38) | def list_volumes(self, context):
method list_controllers (line 41) | def list_controllers(self, context):
method list_disks (line 44) | def list_disks(self, context):
method list_ports (line 47) | def list_ports(self, context):
method list_alerts (line 50) | def list_alerts(self, context, query_para=None):
method parse_alert (line 55) | def parse_alert(context, alert):
method clear_alert (line 58) | def clear_alert(self, context, alert):
method remove_trap_config (line 61) | def remove_trap_config(self, context, trap_config):
method add_trap_config (line 64) | def add_trap_config(self, context, trap_config):
method reset_connection (line 67) | def reset_connection(self, context, **kwargs):
method collect_perf_metrics (line 70) | def collect_perf_metrics(self, context, storage_id,
method get_capabilities (line 76) | def get_capabilities(context, filters=None):
method get_latest_perf_timestamp (line 87) | def get_latest_perf_timestamp(self, context):
method list_storage_host_initiators (line 90) | def list_storage_host_initiators(self, context):
method list_storage_hosts (line 93) | def list_storage_hosts(self, context):
method list_storage_host_groups (line 99) | def list_storage_host_groups(self, context):
method list_volume_groups (line 102) | def list_volume_groups(self, context):
method list_masking_views (line 105) | def list_masking_views(self, context):
FILE: delfin/drivers/manager.py
class DriverManager (line 32) | class DriverManager(stevedore.ExtensionManager):
method __init__ (line 36) | def __init__(self):
method get_driver (line 43) | def get_driver(self, context, invoke_on_load=True,
method update_driver (line 71) | def update_driver(self, storage_id, driver):
method remove_driver (line 74) | def remove_driver(self, storage_id):
method _get_driver_obj (line 78) | def _get_driver_obj(self, context, cache_on_load=True, **kwargs):
method _get_driver_cls (line 133) | def _get_driver_cls(self, **kwargs):
FILE: delfin/drivers/netapp/dataontap/cluster_mode.py
class NetAppCmodeDriver (line 20) | class NetAppCmodeDriver(driver.StorageDriver):
method __init__ (line 22) | def __init__(self, **kwargs):
method reset_connection (line 27) | def reset_connection(self, context, **kwargs):
method get_storage (line 30) | def get_storage(self, context):
method list_storage_pools (line 33) | def list_storage_pools(self, context):
method list_volumes (line 36) | def list_volumes(self, context):
method list_controllers (line 39) | def list_controllers(self, context):
method list_ports (line 42) | def list_ports(self, context):
method list_disks (line 45) | def list_disks(self, context):
method list_alerts (line 48) | def list_alerts(self, context, query_para=None):
method list_qtrees (line 51) | def list_qtrees(self, context):
method list_quotas (line 54) | def list_quotas(self, context):
method list_filesystems (line 57) | def list_filesystems(self, context):
method list_shares (line 60) | def list_shares(self, context):
method add_trap_config (line 63) | def add_trap_config(self, context, trap_config):
method remove_trap_config (line 66) | def remove_trap_config(self, context, trap_config):
method parse_alert (line 70) | def parse_alert(context, alert):
method clear_alert (line 73) | def clear_alert(self, context, alert):
method get_access_url (line 77) | def get_access_url():
method get_alert_sources (line 80) | def get_alert_sources(self, context):
method collect_perf_metrics (line 83) | def collect_perf_metrics(self, context, storage_id,
method get_capabilities (line 89) | def get_capabilities(context, filters=None):
method get_latest_perf_timestamp (line 92) | def get_latest_perf_timestamp(self, context):
method list_storage_host_initiators (line 95) | def list_storage_host_initiators(self, context):
method list_port_groups (line 99) | def list_port_groups(self, context):
method list_masking_views (line 102) | def list_masking_views(self, context):
method list_storage_hosts (line 105) | def list_storage_hosts(self, context):
FILE: delfin/drivers/netapp/dataontap/mapping_handler.py
class MappingHandler (line 19) | class MappingHandler(object):
method format_initiators (line 22) | def format_initiators(initiator_list, initiator_info, storage_id,
method duplicate_removal (line 41) | def duplicate_removal(initiator_list, initiator_model):
method get_iscsi_initiator (line 52) | def get_iscsi_initiator(initiator_list, initiator_map_list, storage_id):
method get_fc_initiator (line 72) | def get_fc_initiator(initiator_list, initiator_map_list, storage_id):
method get_initiator_type (line 92) | def get_initiator_type(protocol_type, initiator_name):
method format_initiator (line 103) | def format_initiator(data_map, initiator_id, storage_id):
method get_initiator_from_host (line 122) | def get_initiator_from_host(
method format_host (line 139) | def format_host(initiator_info, storage_id):
method format_port_group (line 161) | def format_port_group(port_set_info, lif_info, storage_id):
method format_mapping_view (line 208) | def format_mapping_view(mapping_info, volume_info, storage_id, host_li...
FILE: delfin/drivers/netapp/dataontap/netapp_handler.py
class NetAppHandler (line 39) | class NetAppHandler(object):
method __init__ (line 46) | def __init__(self, **kwargs):
method get_table_data (line 58) | def get_table_data(values):
method get_fs_id (line 67) | def get_fs_id(vserver, volume):
method get_qt_id (line 71) | def get_qt_id(vserver, volume, qtree):
method get_size (line 78) | def get_size(limit, is_calculate=False):
method parse_alert (line 86) | def parse_alert(alert):
method login (line 133) | def login(self):
method get_storage (line 148) | def get_storage(self):
method get_aggregate (line 216) | def get_aggregate(self, storage_id):
method get_pool (line 240) | def get_pool(self, storage_id):
method list_storage_pools (line 269) | def list_storage_pools(self, storage_id):
method list_volumes (line 285) | def list_volumes(self, storage_id):
method get_alerts (line 338) | def get_alerts(self, query_para):
method list_alerts (line 377) | def list_alerts(self, query_para):
method clear_alert (line 393) | def clear_alert(self, alert):
method get_disks (line 409) | def get_disks(self, storage_id):
method get_filesystems (line 466) | def get_filesystems(self, storage_id):
method list_controllers (line 524) | def list_controllers(self, storage_id):
method get_eth_port (line 576) | def get_eth_port(self, storage_id):
method get_fc_port (line 633) | def get_fc_port(self, storage_id):
method list_ports (line 690) | def list_ports(self, storage_id):
method list_disks (line 696) | def list_disks(self, storage_id):
method list_qtrees (line 711) | def list_qtrees(self, storage_id):
method get_nfs_shares (line 767) | def get_nfs_shares(self, storage_id, qtree_list, protocol_map):
method get_cifs_shares (line 831) | def get_cifs_shares(self, storage_id, vserver_name,
method list_shares (line 876) | def list_shares(self, storage_id):
method list_filesystems (line 911) | def list_filesystems(self, storage_id):
method list_quotas (line 926) | def list_quotas(self, storage_id):
method get_alert_sources (line 988) | def get_alert_sources(self):
method do_rest_call (line 1009) | def do_rest_call(self, url, data):
method collect_perf_metrics (line 1044) | def collect_perf_metrics(self, storage_id,
method get_storage_perf (line 1092) | def get_storage_perf(self, metrics, storage_id, start_time, end_time):
method get_pool_perf (line 1112) | def get_pool_perf(self, metrics, storage_id, start_time, end_time):
method get_volume_perf (line 1135) | def get_volume_perf(self, metrics, storage_id, start_time, end_time):
method get_fs_perf (line 1155) | def get_fs_perf(self, metrics, storage_id, start_time, end_time):
method get_port_perf (line 1174) | def get_port_perf(self, metrics, storage_id, start_time, end_time):
method get_storage_version (line 1204) | def get_storage_version(self):
method get_cap_by_version (line 1219) | def get_cap_by_version(version, capabilities):
method get_capabilities (line 1236) | def get_capabilities(filters):
method get_latest_perf_timestamp (line 1263) | def get_latest_perf_timestamp(self):
method list_storage_host_initiators (line 1293) | def list_storage_host_initiators(self, storage_id):
method list_storage_hosts (line 1323) | def list_storage_hosts(self, storage_id):
method list_port_groups (line 1338) | def list_port_groups(self, storage_id):
method list_masking_views (line 1358) | def list_masking_views(self, storage_id):
FILE: delfin/drivers/netapp/dataontap/performance_handler.py
class PerformanceHandler (line 25) | class PerformanceHandler(object):
method get_value (line 29) | def get_value(value, key):
method get_unit_size (line 42) | def get_unit_size(value, unit):
method get_perf_value (line 54) | def get_perf_value(metrics, storage_id, start_time, end_time,
FILE: delfin/drivers/pure/flasharray/pure_flasharray.py
class PureFlashArrayDriver (line 30) | class PureFlashArrayDriver(driver.StorageDriver):
method __init__ (line 32) | def __init__(self, **kwargs):
method list_volumes (line 37) | def list_volumes(self, context):
method add_trap_config (line 62) | def add_trap_config(self, context, trap_config):
method clear_alert (line 65) | def clear_alert(self, context, alert):
method get_storage (line 68) | def get_storage(self, context):
method list_alerts (line 121) | def list_alerts(self, context, query_para=None):
method get_time_difference (line 162) | def get_time_difference():
method parse_alert (line 168) | def parse_alert(context, alert):
method list_controllers (line 197) | def list_controllers(self, context):
method list_disks (line 217) | def list_disks(self, context):
method get_hardware (line 252) | def get_hardware(self):
method list_ports (line 266) | def list_ports(self, context):
method get_network (line 315) | def get_network(self):
method get_ports (line 335) | def get_ports(self):
method get_splice_wwn (line 349) | def get_splice_wwn(wwn):
method list_storage_pools (line 358) | def list_storage_pools(self, context):
method remove_trap_config (line 361) | def remove_trap_config(self, context, trap_config):
method reset_connection (line 364) | def reset_connection(self, context, **kwargs):
method get_access_url (line 369) | def get_access_url():
method collect_perf_metrics (line 372) | def collect_perf_metrics(self, context, storage_id, resource_metrics,
method get_storage_metrics (line 400) | def get_storage_metrics(self, storage_id, resource_metrics, start_time,
method get_packaging_storage_data (line 428) | def get_packaging_storage_data(self, end_time, start_time, resource_ty...
method checkout_data (line 444) | def checkout_data(self, storage_metrics, start_time, end_time,
method get_volume_metrics (line 462) | def get_volume_metrics(self, storage_id, resource_metrics, start_time,
method get_packaging_volume_data (line 488) | def get_packaging_volume_data(self, end_time, resource_type, start_time):
method get_timestamp_s (line 509) | def get_timestamp_s(self, opened):
method get_duplicate_value (line 517) | def get_duplicate_value(about_timestamp, resource_type, storage_metrics):
method get_metrics_data (line 527) | def get_metrics_data(metrics, about_timestamp):
method get_array (line 547) | def get_array(self):
method get_capabilities (line 558) | def get_capabilities(context, filters=None):
method get_latest_perf_timestamp (line 567) | def get_latest_perf_timestamp(self, context):
method list_storage_host_initiators (line 576) | def list_storage_host_initiators(self, context):
method get_initiator (line 590) | def get_initiator(self, initiator, list_initiators, host_id, protocol,
method list_storage_hosts (line 609) | def list_storage_hosts(self, ctx):
method list_storage_host_groups (line 628) | def list_storage_host_groups(self, context):
method list_volume_groups (line 654) | def list_volume_groups(self, context):
method list_masking_views (line 680) | def list_masking_views(self, context):
FILE: delfin/drivers/pure/flasharray/rest_handler.py
class RestHandler (line 24) | class RestHandler(RestClient):
method __init__ (line 48) | def __init__(self, **kwargs):
method login (line 51) | def login(self):
method logout (line 87) | def logout(self):
method rest_call (line 96) | def rest_call(self, url, data=None, method='GET'):
method get_volumes (line 108) | def get_volumes(self, url=REST_VOLUME_URL, data=None, volume_list=None,
FILE: delfin/drivers/utils/rest_client.py
class RestClient (line 32) | class RestClient(object):
method __init__ (line 34) | def __init__(self, **kwargs):
method init_http_head (line 50) | def init_http_head(self):
method do_call (line 68) | def do_call(self, url, data, method,
FILE: delfin/drivers/utils/ssh_client.py
class SSHClient (line 30) | class SSHClient(object):
method __init__ (line 33) | def __init__(self, **kwargs):
method connect (line 47) | def connect(self):
method set_host_key (line 62) | def set_host_key(self, host_key):
method exec_command (line 83) | def exec_command(self, command_str):
method close (line 97) | def close(self):
method do_exec (line 106) | def do_exec(self, command_str):
class SSHPool (line 135) | class SSHPool(pools.Pool):
method __init__ (line 138) | def __init__(self, **kwargs):
method set_host_key (line 153) | def set_host_key(self, host_key, ssh):
method create (line 174) | def create(self):
method get (line 207) | def get(self):
method remove (line 233) | def remove(self, ssh):
method put (line 241) | def put(self, conn):
method do_exec (line 248) | def do_exec(self, command_str):
method do_exec_shell (line 282) | def do_exec_shell(self, command_list, sleep_time=0.5):
FILE: delfin/drivers/utils/tools.py
class Tools (line 34) | class Tools(object):
method time_str_to_timestamp (line 36) | def time_str_to_timestamp(self, time_str, time_pattern):
method timestamp_to_time_str (line 45) | def timestamp_to_time_str(self, time_stamp, time_pattern):
method timestamp_to_utc_time_str (line 56) | def timestamp_to_utc_time_str(time_stamp, time_pattern):
method change_capacity_to_bytes (line 67) | def change_capacity_to_bytes(unit):
method get_capacity_size (line 82) | def get_capacity_size(value):
method split_value_map_list (line 94) | def split_value_map_list(value_info, map_list, is_mapping=False,
method get_numbers_in_brackets (line 125) | def get_numbers_in_brackets(source_info, pattern_str):
method remove_file_with_same_type (line 137) | def remove_file_with_same_type(file_name, file_path):
method get_remote_file_to_xml (line 148) | def get_remote_file_to_xml(ssh, file, local_path, remote_path):
FILE: delfin/exception.py
class ConvertedException (line 36) | class ConvertedException(webob.exc.WSGIHTTPException):
method __init__ (line 37) | def __init__(self, exception):
class DelfinException (line 46) | class DelfinException(Exception):
method __init__ (line 57) | def __init__(self, *args, **kwargs):
method error_code (line 72) | def error_code(self):
class NotAuthorized (line 76) | class NotAuthorized(DelfinException):
class Invalid (line 81) | class Invalid(DelfinException):
class BadRequest (line 86) | class BadRequest(Invalid):
class MalformedRequestBody (line 92) | class MalformedRequestBody(Invalid):
class MalformedRequestUrl (line 96) | class MalformedRequestUrl(Invalid):
class InvalidCredential (line 100) | class InvalidCredential(Invalid):
class InvalidResults (line 104) | class InvalidResults(Invalid):
class InvalidInput (line 108) | class InvalidInput(Invalid):
class InvalidName (line 112) | class InvalidName(Invalid):
class InvalidContentType (line 116) | class InvalidContentType(Invalid):
class StorageSerialNumberMismatch (line 120) | class StorageSerialNumberMismatch(Invalid):
class StorageAlreadyExists (line 124) | class StorageAlreadyExists(Invalid):
class InvalidSNMPConfig (line 128) | class InvalidSNMPConfig(Invalid):
class NotFound (line 132) | class NotFound(DelfinException):
class NoSuchAction (line 137) | class NoSuchAction(NotFound):
class AccessInfoNotFound (line 141) | class AccessInfoNotFound(NotFound):
class AlertSourceNotFound (line 145) | class AlertSourceNotFound(NotFound):
class AlertSourceNotFoundWithHost (line 149) | class AlertSourceNotFoundWithHost(NotFound):
class SNMPConnectionFailed (line 153) | class SNMPConnectionFailed(BadRequest):
class StorageNotFound (line 157) | class StorageNotFound(NotFound):
class StorageBackendNotFound (line 161) | class StorageBackendNotFound(NotFound):
class StoragePoolNotFound (line 165) | class StoragePoolNotFound(NotFound):
class VolumeNotFound (line 169) | class VolumeNotFound(NotFound):
class StorageHostInitiatorNotFound (line 173) | class StorageHostInitiatorNotFound(NotFound):
class StorageHostNotFound (line 177) | class StorageHostNotFound(NotFound):
class StorageHostGroupNotFound (line 181) | class StorageHostGroupNotFound(NotFound):
class PortGroupNotFound (line 185) | class PortGroupNotFound(NotFound):
class VolumeGroupNotFound (line 189) | class VolumeGroupNotFound(NotFound):
class MaskingViewNotFound (line 193) | class MaskingViewNotFound(NotFound):
class StorageHostGrpHostRelNotFound (line 197) | class StorageHostGrpHostRelNotFound(NotFound):
class PortGrpPortRelNotFound (line 201) | class PortGrpPortRelNotFound(NotFound):
class VolGrpVolRelationNotFound (line 205) | class VolGrpVolRelationNotFound(NotFound):
class ControllerNotFound (line 209) | class ControllerNotFound(NotFound):
class ControllerListNotFound (line 213) | class ControllerListNotFound(NotFound):
class PortNotFound (line 217) | class PortNotFound(NotFound):
class PortListNotFound (line 221) | class PortListNotFound(NotFound):
class DiskNotFound (line 225) | class DiskNotFound(NotFound):
class FilesystemNotFound (line 229) | class FilesystemNotFound(NotFound):
class QtreeNotFound (line 233) | class QtreeNotFound(NotFound):
class QuotaNotFound (line 237) | class QuotaNotFound(NotFound):
class ShareNotFound (line 241) | class ShareNotFound(NotFound):
class StorageDriverNotFound (line 245) | class StorageDriverNotFound(NotFound):
class TaskNotFound (line 249) | class TaskNotFound(NotFound):
class FailedTaskNotFound (line 253) | class FailedTaskNotFound(NotFound):
class ConfigNotFound (line 257) | class ConfigNotFound(NotFound):
class PasteAppNotFound (line 261) | class PasteAppNotFound(NotFound):
class StorageBackendException (line 265) | class StorageBackendException(DelfinException):
class SSHException (line 269) | class SSHException(DelfinException):
class SSHInjectionThreat (line 273) | class SSHInjectionThreat(DelfinException):
class LockCreationFailed (line 278) | class LockCreationFailed(DelfinException):
class LockAcquisitionFailed (line 282) | class LockAcquisitionFailed(DelfinException):
class DuplicateExtension (line 286) | class DuplicateExtension(DelfinException):
class ImproperIPVersion (line 290) | class ImproperIPVersion(DelfinException):
class ConnectTimeout (line 294) | class ConnectTimeout(DelfinException):
class InvalidUsernameOrPassword (line 299) | class InvalidUsernameOrPassword(DelfinException):
class BadResponse (line 304) | class BadResponse(Invalid):
class InvalidPrivateKey (line 309) | class InvalidPrivateKey(DelfinException):
class SSHConnectTimeout (line 314) | class SSHConnectTimeout(DelfinException):
class SSHNotFoundKnownHosts (line 319) | class SSHNotFoundKnownHosts(NotFound):
class StorageClearAlertFailed (line 324) | class StorageClearAlertFailed(DelfinException):
class StorageListAlertFailed (line 328) | class StorageListAlertFailed(DelfinException):
class HTTPConnectionTimeout (line 332) | class HTTPConnectionTimeout(DelfinException):
class InvalidCAPath (line 336) | class InvalidCAPath(DelfinException):
class StoragePerformanceCollectionFailed (line 340) | class StoragePerformanceCollectionFailed(DelfinException):
class SSLCertificateFailed (line 344) | class SSLCertificateFailed(Invalid):
class SSLHandshakeFailed (line 349) | class SSLHandshakeFailed(Invalid):
class StorageIsSyncing (line 353) | class StorageIsSyncing(Invalid):
class InvalidIpOrPort (line 357) | class InvalidIpOrPort(DelfinException):
class InvalidStorageCapability (line 362) | class InvalidStorageCapability(Invalid):
class StorageCapabilityNotSupported (line 367) | class StorageCapabilityNotSupported(Invalid):
class EmptyResourceMetrics (line 372) | class EmptyResourceMetrics(DelfinException):
class TelemetryTaskExecError (line 377) | class TelemetryTaskExecError(DelfinException):
class ComponentNotFound (line 381) | class ComponentNotFound(NotFound):
class IncompleteTrapInformation (line 385) | class IncompleteTrapInformation(DelfinException):
class StorageMaxUserCountException (line 390) | class StorageMaxUserCountException(DelfinException):
FILE: delfin/exporter/base_exporter.py
class BaseExporter (line 39) | class BaseExporter(object):
method dispatch (line 42) | def dispatch(self, ctxt, data):
class BaseManager (line 51) | class BaseManager(BaseExporter):
method __init__ (line 52) | def __init__(self, namespace):
method dispatch (line 56) | def dispatch(self, ctxt, data):
method _get_exporters (line 69) | def _get_exporters(self):
method _get_supported_exporters (line 78) | def _get_supported_exporters(self):
method _get_configured_exporters (line 82) | def _get_configured_exporters(self):
class AlertExporterManager (line 87) | class AlertExporterManager(BaseManager):
method __init__ (line 90) | def __init__(self):
method _get_configured_exporters (line 93) | def _get_configured_exporters(self):
class PerformanceExporterManager (line 97) | class PerformanceExporterManager(BaseManager):
method __init__ (line 100) | def __init__(self):
method _get_configured_exporters (line 103) | def _get_configured_exporters(self):
FILE: delfin/exporter/example.py
class AlertExporterExample (line 21) | class AlertExporterExample(base_exporter.BaseExporter):
method dispatch (line 22) | def dispatch(self, ctxt, data):
class PerformanceExporterExample (line 26) | class PerformanceExporterExample(base_exporter.BaseExporter):
method dispatch (line 27) | def dispatch(self, ctxt, data):
FILE: delfin/exporter/kafka/exporter.py
class AlertExporterKafka (line 19) | class AlertExporterKafka(base_exporter.BaseExporter):
method dispatch (line 20) | def dispatch(self, ctxt, data):
class PerformanceExporterKafka (line 24) | class PerformanceExporterKafka(base_exporter.BaseExporter):
method dispatch (line 25) | def dispatch(self, ctxt, data):
FILE: delfin/exporter/kafka/kafka.py
class KafkaExporter (line 60) | class KafkaExporter(object):
method push_to_kafka (line 62) | def push_to_kafka(self, data):
FILE: delfin/exporter/prometheus/alert_manager.py
class PrometheusAlertExporter (line 32) | class PrometheusAlertExporter(object):
method push_prometheus_alert (line 39) | def push_prometheus_alert(self, alerts):
FILE: delfin/exporter/prometheus/exporter.py
class AlertExporterPrometheus (line 22) | class AlertExporterPrometheus(base_exporter.BaseExporter):
method dispatch (line 23) | def dispatch(self, ctxt, data):
class PerformanceExporterPrometheus (line 28) | class PerformanceExporterPrometheus(base_exporter.BaseExporter):
method dispatch (line 29) | def dispatch(self, ctxt, data):
FILE: delfin/exporter/prometheus/exporter_server.py
function getfile (line 43) | def getfile():
FILE: delfin/exporter/prometheus/prometheus.py
class PrometheusExporter (line 56) | class PrometheusExporter(object):
method __init__ (line 58) | def __init__(self):
method check_metrics_dir_exists (line 61) | def check_metrics_dir_exists(self, directory):
method _write_to_prometheus_format (line 73) | def _write_to_prometheus_format(self, f, metric,
method get_file_age (line 84) | def get_file_age(self, path):
method clean_old_metric_files (line 91) | def clean_old_metric_files(self, metrics_dir):
method push_to_prometheus (line 102) | def push_to_prometheus(self, storage_metrics):
FILE: delfin/i18n.py
function translate (line 31) | def translate(value, user_locale):
function get_available_languages (line 35) | def get_available_languages():
FILE: delfin/leader_election/distributor/perf_job_manager.py
class PerfJobManager (line 22) | class PerfJobManager(manager.Manager):
method __init__ (line 27) | def __init__(self, service_name=None, *args, **kwargs):
method add_new_job (line 30) | def add_new_job(self, context, task_id):
FILE: delfin/leader_election/distributor/task_distributor.py
class TaskDistributor (line 28) | class TaskDistributor(object):
method __init__ (line 29) | def __init__(self, ctx):
method distribute_new_job (line 33) | def distribute_new_job(self, task_id):
method distribute_failed_job (line 46) | def distribute_failed_job(self, failed_task_id, executor):
FILE: delfin/leader_election/factory.py
class LeaderElectionFactory (line 22) | class LeaderElectionFactory:
method construct_elector (line 25) | def construct_elector(plugin, leader_key=None):
FILE: delfin/leader_election/interface.py
class LeaderCallback (line 22) | class LeaderCallback:
method __init__ (line 24) | def __init__(self):
method on_started_leading (line 32) | def on_started_leading(self, *args, **kwargs):
method on_stopped_leading (line 36) | def on_stopped_leading(self, *args, **kwargs):
method register (line 40) | def register(cls, on_leading_callback, on_stop_callback):
class LeaderElector (line 48) | class LeaderElector:
method __init__ (line 50) | def __init__(self, callbacks, election_key):
method run (line 55) | def run(self):
method cleanup (line 65) | def cleanup(self):
FILE: delfin/leader_election/tooz/callback.py
class ToozLeaderElectionCallback (line 18) | class ToozLeaderElectionCallback(LeaderCallback):
method on_started_leading (line 20) | def on_started_leading(self, *args, **kwargs):
method on_stopped_leading (line 23) | def on_stopped_leading(self, *args, **kwargs):
FILE: delfin/leader_election/tooz/leader_elector.py
class Elector (line 28) | class Elector(LeaderElector):
method __init__ (line 30) | def __init__(self, callbacks, leader_election_key):
method run (line 39) | def run(self):
method set_leader_callback (line 92) | def set_leader_callback(self, *args, **kwargs):
method cleanup (line 95) | def cleanup(self):
method on_stopped_leading (line 107) | def on_stopped_leading(self):
FILE: delfin/manager.py
class PeriodicTasks (line 66) | class PeriodicTasks(periodic_task.PeriodicTasks):
method __init__ (line 67) | def __init__(self):
class Manager (line 71) | class Manager(base.Base, PeriodicTasks):
method RPC_API_VERSION (line 74) | def RPC_API_VERSION(self):
method target (line 79) | def target(self):
method __init__ (line 89) | def __init__(self, host=None, db_driver=None):
method periodic_tasks (line 96) | def periodic_tasks(self, context, raise_on_error=False):
method init_host (line 100) | def init_host(self):
method service_version (line 108) | def service_version(self, context):
method service_config (line 111) | def service_config(self, context):
method is_service_ready (line 117) | def is_service_ready(self):
FILE: delfin/rpc.py
function init (line 48) | def init(conf):
function initialized (line 66) | def initialized():
function cleanup (line 70) | def cleanup():
function set_defaults (line 80) | def set_defaults(control_exchange):
function add_extra_exmods (line 84) | def add_extra_exmods(*args):
function clear_extra_exmods (line 88) | def clear_extra_exmods():
function get_allowed_exmods (line 92) | def get_allowed_exmods():
class JsonPayloadSerializer (line 96) | class JsonPayloadSerializer(messaging.NoOpSerializer):
method serialize_entity (line 98) | def serialize_entity(context, entity):
class RequestContextSerializer (line 102) | class RequestContextSerializer(messaging.Serializer):
method __init__ (line 104) | def __init__(self, base):
method serialize_entity (line 107) | def serialize_entity(self, context, entity):
method deserialize_entity (line 112) | def deserialize_entity(self, context, entity):
method serialize_context (line 117) | def serialize_context(self, context):
method deserialize_context (line 120) | def deserialize_context(self, context):
function get_transport_url (line 124) | def get_transport_url(url_str=None):
function get_client (line 128) | def get_client(target, version_cap=None, serializer=None):
function get_server (line 137) | def get_server(target, endpoints, serializer=None):
function get_notifier (line 150) | def get_notifier(service=None, host=None, publisher_id=None):
FILE: delfin/service.py
class Service (line 85) | class Service(service.Service):
method __init__ (line 93) | def __init__(self, host, binary, topic, manager, periodic_enable=None,
method start (line 114) | def start(self):
method __getattr__ (lin
Condensed preview — 416 files, each showing path, character count, and a content snippet. Download the .json file or copy for the full structured content (3,963K chars).
[
{
"path": ".coveragerc",
"chars": 58,
"preview": "[run]\nbranch = true\nsource = delfin\nomit = delfin/tests/*\n"
},
{
"path": ".github/ISSUE_TEMPLATE.md",
"chars": 488,
"preview": "<!-- This form is for bug reports and feature requests! -->\n\n**Is this a BUG REPORT or FEATURE REQUEST?**:\n\n> Uncomment "
},
{
"path": ".github/PULL_REQUEST_TEMPLATE.md",
"chars": 621,
"preview": "<!-- Thanks for sending a pull request! -->\n\n**What this PR does / why we need it**:\n\n**Which issue this PR fixes** *(op"
},
{
"path": ".github/workflows/delfin_ci.yml",
"chars": 778,
"preview": "name: Delfin CI\non: [push, pull_request, workflow_dispatch]\n\njobs:\n build:\n runs-on: ${{ matrix.platform }}\n stra"
},
{
"path": ".github/workflows/delfin_e2e_test.yml",
"chars": 2621,
"preview": "name: Delfin E2E Test\non: [push, pull_request, workflow_dispatch]\n\njobs:\n test:\n runs-on: ${{ matrix.platform }}\n "
},
{
"path": ".gitignore",
"chars": 1824,
"preview": "# IDE config file\n.idea\n\n# Byte-compiled / optimized / DLL files\n__pycache__/\n*.py[cod]\n*$py.class\n\n# C extensions\n*.so\n"
},
{
"path": "CHANGELOG/CHANGELOG-v1.0.0.md",
"chars": 12846,
"preview": "# Changelog\n\n## [v1.0.0](https://github.com/sodafoundation/delfin/tree/v1.0.0) (2020-09-29)\n\n[Full Changelog](https://gi"
},
{
"path": "CHANGELOG/CHANGELOG-v1.1.0.md",
"chars": 4327,
"preview": "# Changelog\n\n## [Unreleased](https://github.com/sodafoundation/delfin/tree/HEAD)\n\n[Full Changelog](https://github.com/so"
},
{
"path": "Dockerfile",
"chars": 941,
"preview": "# Copyright 2020 The SODA Authors.\n#\n# Licensed under the Apache License, Version 2.0 (the \"License\");\n# you may not use"
},
{
"path": "LICENSE",
"chars": 10143,
"preview": "\n Apache License\n Version 2.0, January 2004\n "
},
{
"path": "README.md",
"chars": 3550,
"preview": "# delfin : SODA Infrastructure Manager Project\n[;\n# you may not use"
},
{
"path": "delfin/alert_manager/constants.py",
"chars": 900,
"preview": "# Copyright 2020 The SODA Authors.\n#\n# Licensed under the Apache License, Version 2.0 (the \"License\");\n# you may not use"
},
{
"path": "delfin/alert_manager/rpcapi.py",
"chars": 1853,
"preview": "# Copyright 2012, Red Hat, Inc.\n#\n# Licensed under the Apache License, Version 2.0 (the \"License\"); you may\n# not "
},
{
"path": "delfin/alert_manager/snmp_validator.py",
"chars": 9804,
"preview": "# Copyright 2020 The SODA Authors.\n#\n# Licensed under the Apache License, Version 2.0 (the \"License\");\n# you may not use"
},
{
"path": "delfin/alert_manager/trap_receiver.py",
"chars": 15231,
"preview": "# Copyright 2020 The SODA Authors.\n#\n# Licensed under the Apache License, Version 2.0 (the \"License\");\n# you may not use"
},
{
"path": "delfin/api/__init__.py",
"chars": 885,
"preview": "# Copyright 2010 United States Government as represented by the\n# Administrator of the National Aeronautics and Space Ad"
},
{
"path": "delfin/api/api_utils.py",
"chars": 5960,
"preview": "# Copyright 2020 The SODA Authors.\n# Copyright 2010 OpenStack Foundation\n# All Rights Reserved.\n#\n# Licensed under th"
},
{
"path": "delfin/api/common/__init__.py",
"chars": 4801,
"preview": "# Copyright 2020 The SODA Authors.\n# Copyright (c) 2013 OpenStack, LLC.\n#\n# All Rights Reserved.\n#\n# Licensed under t"
},
{
"path": "delfin/api/common/wsgi.py",
"chars": 33295,
"preview": "# Copyright 2020 The SODA Authors.\n# Copyright 2011 OpenStack LLC.\n# All Rights Reserved.\n#\n# Licensed under the Apac"
},
{
"path": "delfin/api/contrib/__init__.py",
"chars": 1203,
"preview": "# Copyright 2011 Justin Santa Barbara\n# All Rights Reserved.\n#\n# Licensed under the Apache License, Version 2.0 (the "
},
{
"path": "delfin/api/extensions.py",
"chars": 11140,
"preview": "# Copyright 2020 The SODA Authors.\n# Copyright 2011 OpenStack LLC.\n# Copyright 2011 Justin Santa Barbara\n# All Rights Re"
},
{
"path": "delfin/api/middlewares.py",
"chars": 929,
"preview": "# Copyright 2020 The SODA Authors.\n#\n# Licensed under the Apache License, Version 2.0 (the \"License\");\n# you may not use"
},
{
"path": "delfin/api/schemas/__init__.py",
"chars": 0,
"preview": ""
},
{
"path": "delfin/api/schemas/access_info.py",
"chars": 3567,
"preview": "# Copyright 2020 The SODA Authors.\n#\n# Licensed under the Apache License, Version 2.0 (the \"License\");\n# you may not use"
},
{
"path": "delfin/api/schemas/alert_source.py",
"chars": 1854,
"preview": "# Copyright 2020 The SODA Authors.\n#\n# Licensed under the Apache License, Version 2.0 (the \"License\");\n# you may not use"
},
{
"path": "delfin/api/schemas/alerts.py",
"chars": 811,
"preview": "# Copyright 2020 The SODA Authors.\n#\n# Licensed under the Apache License, Version 2.0 (the \"License\");\n# you may not use"
},
{
"path": "delfin/api/schemas/storage_capabilities_schema.py",
"chars": 42712,
"preview": "# Copyright 2021 The SODA Authors.\n#\n# Licensed under the Apache License, Version 2.0 (the \"License\");\n# you may not use"
},
{
"path": "delfin/api/schemas/storages.py",
"chars": 3848,
"preview": "# Copyright 2020 The SODA Authors.\n#\n# Licensed under the Apache License, Version 2.0 (the \"License\");\n# you may not use"
},
{
"path": "delfin/api/v1/__init__.py",
"chars": 0,
"preview": ""
},
{
"path": "delfin/api/v1/access_info.py",
"chars": 3647,
"preview": "# Copyright 2020 The SODA Authors.\n#\n# Licensed under the Apache License, Version 2.0 (the \"License\");\n# you may not use"
},
{
"path": "delfin/api/v1/alert_source.py",
"chars": 7658,
"preview": "# Copyright 2020 The SODA Authors.\n#\n# Licensed under the Apache License, Version 2.0 (the \"License\");\n# you may not use"
},
{
"path": "delfin/api/v1/alerts.py",
"chars": 3621,
"preview": "# Copyright 2020 The SODA Authors.\n#\n# Licensed under the Apache License, Version 2.0 (the \"License\");\n# you may not use"
},
{
"path": "delfin/api/v1/controllers.py",
"chars": 2100,
"preview": "# Copyright 2020 The SODA Authors.\n#\n# Licensed under the Apache License, Version 2.0 (the \"License\");\n# you may not use"
},
{
"path": "delfin/api/v1/disks.py",
"chars": 2002,
"preview": "# Copyright 2020 The SODA Authors.\n#\n# Licensed under the Apache License, Version 2.0 (the \"License\");\n# you may not use"
},
{
"path": "delfin/api/v1/filesystems.py",
"chars": 2110,
"preview": "# Copyright 2021 The SODA Authors.\n#\n# Licensed under the Apache License, Version 2.0 (the \"License\");\n# you may not use"
},
{
"path": "delfin/api/v1/masking_views.py",
"chars": 2296,
"preview": "# Copyright 2021 The SODA Authors.\n#\n# Licensed under the Apache License, Version 2.0 (the \"License\");\n# you may not use"
},
{
"path": "delfin/api/v1/port_groups.py",
"chars": 2388,
"preview": "# Copyright 2021 The SODA Authors.\n#\n# Licensed under the Apache License, Version 2.0 (the \"License\");\n# you may not use"
},
{
"path": "delfin/api/v1/ports.py",
"chars": 2033,
"preview": "# Copyright 2020 The SODA Authors.\n#\n# Licensed under the Apache License, Version 2.0 (the \"License\");\n# you may not use"
},
{
"path": "delfin/api/v1/qtrees.py",
"chars": 2077,
"preview": "# Copyright 2021 The SODA Authors.\n#\n# Licensed under the Apache License, Version 2.0 (the \"License\");\n# you may not use"
},
{
"path": "delfin/api/v1/quotas.py",
"chars": 2147,
"preview": "# Copyright 2021 The SODA Authors.\n#\n# Licensed under the Apache License, Version 2.0 (the \"License\");\n# you may not use"
},
{
"path": "delfin/api/v1/router.py",
"chars": 8132,
"preview": "# Copyright 2020 The SODA Authors.\n#\n# Licensed under the Apache License, Version 2.0 (the \"License\");\n# you may not use"
},
{
"path": "delfin/api/v1/shares.py",
"chars": 2015,
"preview": "# Copyright 2021 The SODA Authors.\n#\n# Licensed under the Apache License, Version 2.0 (the \"License\");\n# you may not use"
},
{
"path": "delfin/api/v1/storage_host_groups.py",
"chars": 2612,
"preview": "# Copyright 2021 The SODA Authors.\n#\n# Licensed under the Apache License, Version 2.0 (the \"License\");\n# you may not use"
},
{
"path": "delfin/api/v1/storage_host_initiators.py",
"chars": 2159,
"preview": "# Copyright 2021 The SODA Authors.\n#\n# Licensed under the Apache License, Version 2.0 (the \"License\");\n# you may not use"
},
{
"path": "delfin/api/v1/storage_hosts.py",
"chars": 2838,
"preview": "# Copyright 2021 The SODA Authors.\n#\n# Licensed under the Apache License, Version 2.0 (the \"License\");\n# you may not use"
},
{
"path": "delfin/api/v1/storage_pools.py",
"chars": 2087,
"preview": "# Copyright 2020 The SODA Authors.\n#\n# Licensed under the Apache License, Version 2.0 (the \"License\");\n# you may not use"
},
{
"path": "delfin/api/v1/storages.py",
"chars": 11186,
"preview": "# Copyright 2020 The SODA Authors.\n#\n# Licensed under the Apache License, Version 2.0 (the \"License\");\n# you may not use"
},
{
"path": "delfin/api/v1/volume_groups.py",
"chars": 2448,
"preview": "# Copyright 2021 The SODA Authors.\n#\n# Licensed under the Apache License, Version 2.0 (the \"License\");\n# you may not use"
},
{
"path": "delfin/api/v1/volumes.py",
"chars": 2077,
"preview": "# Copyright 2020 The SODA Authors.\n#\n# Licensed under the Apache License, Version 2.0 (the \"License\");\n# you may not use"
},
{
"path": "delfin/api/validation/__init__.py",
"chars": 1819,
"preview": "# Copyright 2020 The SODA Authors.\n# Copyright (C) 2017 NTT DATA\n# All Rights Reserved.\n#\n# Licensed under the Apache Li"
},
{
"path": "delfin/api/validation/parameter_types.py",
"chars": 6022,
"preview": "# Copyright 2020 The SODA Authors.\n# Copyright (C) 2017 NTT DATA\n# All Rights Reserved.\n#\n# Licensed under the Apache Li"
},
{
"path": "delfin/api/validation/validators.py",
"chars": 9512,
"preview": "# Copyright 2020 The SODA Authors.\n# Copyright (C) 2017 NTT DATA\n# All Rights Reserved.\n#\n# Licensed under the Apache Li"
},
{
"path": "delfin/api/views/__init__.py",
"chars": 0,
"preview": ""
},
{
"path": "delfin/api/views/access_info.py",
"chars": 1141,
"preview": "# Copyright 2020 The SODA Authors.\n#\n# Licensed under the Apache License, Version 2.0 (the \"License\");\n# you may not use"
},
{
"path": "delfin/api/views/alert_source.py",
"chars": 1513,
"preview": "# Copyright 2020 The SODA Authors.\n#\n# Licensed under the Apache License, Version 2.0 (the \"License\");\n# you may not use"
},
{
"path": "delfin/api/views/alerts.py",
"chars": 824,
"preview": "# Copyright 2020 The SODA Authors.\n#\n# Licensed under the Apache License, Version 2.0 (the \"License\");\n# you may not use"
},
{
"path": "delfin/api/views/controllers.py",
"chars": 879,
"preview": "# Copyright 2020 The SODA Authors.\n#\n# Licensed under the Apache License, Version 2.0 (the \"License\");\n# you may not use"
},
{
"path": "delfin/api/views/disks.py",
"chars": 813,
"preview": "# Copyright 2020 The SODA Authors.\n#\n# Licensed under the Apache License, Version 2.0 (the \"License\");\n# you may not use"
},
{
"path": "delfin/api/views/filesystems.py",
"chars": 879,
"preview": "# Copyright 2021 The SODA Authors.\n#\n# Licensed under the Apache License, Version 2.0 (the \"License\");\n# you may not use"
},
{
"path": "delfin/api/views/masking_views.py",
"chars": 901,
"preview": "# Copyright 2021 The SODA Authors.\n#\n# Licensed under the Apache License, Version 2.0 (the \"License\");\n# you may not use"
},
{
"path": "delfin/api/views/port_groups.py",
"chars": 879,
"preview": "# Copyright 2021 The SODA Authors.\n#\n# Licensed under the Apache License, Version 2.0 (the \"License\");\n# you may not use"
},
{
"path": "delfin/api/views/ports.py",
"chars": 813,
"preview": "# Copyright 2020 The SODA Authors.\n#\n# Licensed under the Apache License, Version 2.0 (the \"License\");\n# you may not use"
},
{
"path": "delfin/api/views/qtrees.py",
"chars": 824,
"preview": "# Copyright 2021 The SODA Authors.\n#\n# Licensed under the Apache License, Version 2.0 (the \"License\");\n# you may not use"
},
{
"path": "delfin/api/views/quotas.py",
"chars": 824,
"preview": "# Copyright 2021 The SODA Authors.\n#\n# Licensed under the Apache License, Version 2.0 (the \"License\");\n# you may not use"
},
{
"path": "delfin/api/views/shares.py",
"chars": 824,
"preview": "# Copyright 2021 The SODA Authors.\n#\n# Licensed under the Apache License, Version 2.0 (the \"License\");\n# you may not use"
},
{
"path": "delfin/api/views/storage_host_groups.py",
"chars": 967,
"preview": "# Copyright 2021 The SODA Authors.\n#\n# Licensed under the Apache License, Version 2.0 (the \"License\");\n# you may not use"
},
{
"path": "delfin/api/views/storage_host_initiators.py",
"chars": 1011,
"preview": "# Copyright 2021 The SODA Authors.\n#\n# Licensed under the Apache License, Version 2.0 (the \"License\");\n# you may not use"
},
{
"path": "delfin/api/views/storage_hosts.py",
"chars": 901,
"preview": "# Copyright 2021 The SODA Authors.\n#\n# Licensed under the Apache License, Version 2.0 (the \"License\");\n# you may not use"
},
{
"path": "delfin/api/views/storage_pools.py",
"chars": 901,
"preview": "# Copyright 2020 The SODA Authors.\n#\n# Licensed under the Apache License, Version 2.0 (the \"License\");\n# you may not use"
},
{
"path": "delfin/api/views/storages.py",
"chars": 1385,
"preview": "# Copyright 2020 The SODA Authors.\n#\n# Licensed under the Apache License, Version 2.0 (the \"License\");\n# you may not use"
},
{
"path": "delfin/api/views/volume_groups.py",
"chars": 901,
"preview": "# Copyright 2021 The SODA Authors.\n#\n# Licensed under the Apache License, Version 2.0 (the \"License\");\n# you may not use"
},
{
"path": "delfin/api/views/volumes.py",
"chars": 835,
"preview": "# Copyright 2020 The SODA Authors.\n#\n# Licensed under the Apache License, Version 2.0 (the \"License\");\n# you may not use"
},
{
"path": "delfin/cmd/__init__.py",
"chars": 0,
"preview": ""
},
{
"path": "delfin/cmd/alert.py",
"chars": 1531,
"preview": "#!/usr/bin/env python\n\n# Copyright 2020 The SODA Authors.\n# Copyright 2010 United States Government as represented by th"
},
{
"path": "delfin/cmd/api.py",
"chars": 1500,
"preview": "#!/usr/bin/env python\n\n# Copyright 2020 The SODA Authors.\n# Copyright 2010 United States Government as represented by th"
},
{
"path": "delfin/cmd/task.py",
"chars": 2007,
"preview": "#!/usr/bin/env python\n\n# Copyright 2020 The SODA Authors.\n# Copyright 2010 United States Government as represented by th"
},
{
"path": "delfin/common/__init__.py",
"chars": 0,
"preview": ""
},
{
"path": "delfin/common/alert_util.py",
"chars": 2214,
"preview": "# Copyright 2020 The SODA Authors.\n# Copyright 2010 United States Government as represented by the\n# Administrator of th"
},
{
"path": "delfin/common/config.py",
"chars": 6960,
"preview": "# Copyright 2020 The SODA Authors.\n# Copyright 2010 United States Government as represented by the\n# Administrator of th"
},
{
"path": "delfin/common/constants.py",
"chars": 19162,
"preview": "# Copyright 2020 The SODA Authors.\n# Copyright 2016 Red Hat, Inc.\n# All Rights Reserved.\n#\n# Licensed under the Apach"
},
{
"path": "delfin/common/sqlalchemyutils.py",
"chars": 6644,
"preview": "# Copyright 2020 The SODA Authors.\n# Copyright 2010 United States Government as represented by the\n# Administrator of th"
},
{
"path": "delfin/context.py",
"chars": 5302,
"preview": "# Copyright 2020 The SODA Authors.\n# Copyright 2011 OpenStack LLC.\n# Copyright 2010 United States Government as represen"
},
{
"path": "delfin/coordination.py",
"chars": 14155,
"preview": "# Licensed under the Apache License, Version 2.0 (the \"License\"); you may\n# not use this file except in compliance with "
},
{
"path": "delfin/cryptor.py",
"chars": 1707,
"preview": "# Copyright 2020 The SODA Authors.\n#\n# Licensed under the Apache License, Version 2.0 (the \"License\");\n# you may not use"
},
{
"path": "delfin/db/__init__.py",
"chars": 801,
"preview": "# Copyright 2010 United States Government as represented by the\n# Administrator of the National Aeronautics and Space Ad"
},
{
"path": "delfin/db/api.py",
"chars": 52533,
"preview": "# Copyright 2020 The SODA Authors.\n# Copyright (c) 2011 X.commerce, a business unit of eBay Inc.\n# Copyright 2010 United"
},
{
"path": "delfin/db/base.py",
"chars": 1401,
"preview": "# Copyright 2020 The SODA Authors.\n# Copyright 2010 United States Government as represented by the\n# Administrator of th"
},
{
"path": "delfin/db/sqlalchemy/__init__.py",
"chars": 0,
"preview": ""
},
{
"path": "delfin/db/sqlalchemy/api.py",
"chars": 101553,
"preview": "# Copyright 2020 The SODA Authors.\n# Copyright (c) 2011 X.commerce, a business unit of eBay Inc.\n# Copyright 2010 United"
},
{
"path": "delfin/db/sqlalchemy/models.py",
"chars": 13592,
"preview": "# Copyright 2020 The SODA Authors.\n# Copyright (c) 2011 X.commerce, a business unit of eBay Inc.\n# Copyright 2010 United"
},
{
"path": "delfin/drivers/__init__.py",
"chars": 0,
"preview": ""
},
{
"path": "delfin/drivers/api.py",
"chars": 8985,
"preview": "# Copyright 2020 The SODA Authors.\n#\n# Licensed under the Apache License, Version 2.0 (the \"License\");\n# you may not use"
},
{
"path": "delfin/drivers/dell_emc/__init__.py",
"chars": 0,
"preview": ""
},
{
"path": "delfin/drivers/dell_emc/power_store/__init__.py",
"chars": 0,
"preview": ""
},
{
"path": "delfin/drivers/dell_emc/power_store/consts.py",
"chars": 18190,
"preview": "# Copyright 2022 The SODA Authors.\n#\n# Licensed under the Apache License, Version 2.0 (the \"License\");\n# you may not use"
},
{
"path": "delfin/drivers/dell_emc/power_store/power_store.py",
"chars": 7032,
"preview": "# Copyright 2022 The SODA Authors.\n#\n# Licensed under the Apache License, Version 2.0 (the \"License\");\n# you may not use"
},
{
"path": "delfin/drivers/dell_emc/power_store/rest_handler.py",
"chars": 45449,
"preview": "# Copyright 2022 The SODA Authors.\n#\n# Licensed under the Apache License, Version 2.0 (the \"License\");\n# you may not use"
},
{
"path": "delfin/drivers/dell_emc/scaleio/__init__.py",
"chars": 0,
"preview": ""
},
{
"path": "delfin/drivers/dell_emc/scaleio/alert_consts.py",
"chars": 3338,
"preview": "# Copyright 2022 The SODA Authors.\n# All Rights Reserved.\n#\n# Licensed under the Apache License, Version 2.0 (the \"Li"
},
{
"path": "delfin/drivers/dell_emc/scaleio/consts.py",
"chars": 1485,
"preview": "# Copyright 2022 The SODA Authors.\n# All Rights Reserved.\n#\n# Licensed under the Apache License, Version 2.0 (the \"Li"
},
{
"path": "delfin/drivers/dell_emc/scaleio/rest_handler.py",
"chars": 20461,
"preview": "# Copyright 2022 The SODA Authors.\n#\n# Licensed under the Apache License, Version 2.0 (the \"License\");\n# you may not use"
},
{
"path": "delfin/drivers/dell_emc/scaleio/scaleio_stor.py",
"chars": 2561,
"preview": "# Copyright 2022 The SODA Authors.\n#\n# Licensed under the Apache License, Version 2.0 (the \"License\");\n# you may not use"
},
{
"path": "delfin/drivers/dell_emc/unity/__init__.py",
"chars": 0,
"preview": ""
},
{
"path": "delfin/drivers/dell_emc/unity/alert_handler.py",
"chars": 6636,
"preview": "# Copyright 2021 The SODA Authors.\n#\n# Licensed under the Apache License, Version 2.0 (the \"License\");\n# you may not use"
},
{
"path": "delfin/drivers/dell_emc/unity/consts.py",
"chars": 229407,
"preview": "# Copyright 2021 The SODA Authors.\n# All Rights Reserved.\n#\n# Licensed under the Apache License, Version 2.0 (the \"Li"
},
{
"path": "delfin/drivers/dell_emc/unity/rest_handler.py",
"chars": 13331,
"preview": "# Copyright 2021 The SODA Authors.\n#\n# Licensed under the Apache License, Version 2.0 (the \"License\");\n# you may not use"
},
{
"path": "delfin/drivers/dell_emc/unity/unity.py",
"chars": 52277,
"preview": "# Copyright 2021 The SODA Authors.\n#\n# Licensed under the Apache License, Version 2.0 (the \"License\");\n# you may not use"
},
{
"path": "delfin/drivers/dell_emc/vmax/__init__.py",
"chars": 0,
"preview": ""
},
{
"path": "delfin/drivers/dell_emc/vmax/alert_handler/__init__.py",
"chars": 0,
"preview": ""
},
{
"path": "delfin/drivers/dell_emc/vmax/alert_handler/alert_mapper.py",
"chars": 2034,
"preview": "# Copyright 2020 The SODA Authors.\n#\n# Licensed under the Apache License, Version 2.0 (the \"License\");\n# you may not use"
},
{
"path": "delfin/drivers/dell_emc/vmax/alert_handler/oid_mapper.py",
"chars": 1859,
"preview": "# Copyright 2020 The SODA Authors.\n#\n# Licensed under the Apache License, Version 2.0 (the \"License\");\n# you may not use"
},
{
"path": "delfin/drivers/dell_emc/vmax/alert_handler/snmp_alerts.py",
"chars": 5064,
"preview": "# Copyright 2020 The SODA Authors.\n#\n# Licensed under the Apache License, Version 2.0 (the \"License\");\n# you may not use"
},
{
"path": "delfin/drivers/dell_emc/vmax/alert_handler/unisphere_alerts.py",
"chars": 3286,
"preview": "# Copyright 2020 The SODA Authors.\n#\n# Licensed under the Apache License, Version 2.0 (the \"License\");\n# you may not use"
},
{
"path": "delfin/drivers/dell_emc/vmax/client.py",
"chars": 30891,
"preview": "# Copyright 2020 The SODA Authors.\n#\n# Licensed under the Apache License, Version 2.0 (the \"License\");\n# you may not use"
},
{
"path": "delfin/drivers/dell_emc/vmax/constants.py",
"chars": 4801,
"preview": "# Copyright 2020 The SODA Authors.\n#\n# All Rights Reserved.\n#\n# Licensed under the Apache License, Version 2.0 (the \""
},
{
"path": "delfin/drivers/dell_emc/vmax/perf_utils.py",
"chars": 2455,
"preview": "# Copyright 2020 The SODA Authors.\n#\n# Licensed under the Apache License, Version 2.0 (the \"License\");\n# you may not use"
},
{
"path": "delfin/drivers/dell_emc/vmax/rest.py",
"chars": 61516,
"preview": "# Copyright 2020 The SODA Authors.\n# Copyright (c) 2020 Dell Inc. or its subsidiaries.\n# All Rights Reserved.\n#\n# Lic"
},
{
"path": "delfin/drivers/dell_emc/vmax/vmax.py",
"chars": 7472,
"preview": "# Copyright 2020 The SODA Authors.\n#\n# Licensed under the Apache License, Version 2.0 (the \"License\");\n# you may not use"
},
{
"path": "delfin/drivers/dell_emc/vnx/__init__.py",
"chars": 0,
"preview": ""
},
{
"path": "delfin/drivers/dell_emc/vnx/vnx_block/__init__.py",
"chars": 0,
"preview": ""
},
{
"path": "delfin/drivers/dell_emc/vnx/vnx_block/alert_handler.py",
"chars": 2178,
"preview": "# Copyright 2021 The SODA Authors.\n#\n# Licensed under the Apache License, Version 2.0 (the \"License\");\n# you may not use"
},
{
"path": "delfin/drivers/dell_emc/vnx/vnx_block/component_handler.py",
"chars": 40728,
"preview": "# Copyright 2021 The SODA Authors.\n#\n# Licensed under the Apache License, Version 2.0 (the \"License\");\n# you may not use"
},
{
"path": "delfin/drivers/dell_emc/vnx/vnx_block/consts.py",
"chars": 14300,
"preview": "# Copyright 2021 The SODA Authors.\n#\n# Licensed under the Apache License, Version 2.0 (the \"License\");\n# you may not use"
},
{
"path": "delfin/drivers/dell_emc/vnx/vnx_block/navi_handler.py",
"chars": 34396,
"preview": "# Copyright 2021 The SODA Authors.\n#\n# Licensed under the Apache License, Version 2.0 (the \"License\");\n# you may not use"
},
{
"path": "delfin/drivers/dell_emc/vnx/vnx_block/navicli_client.py",
"chars": 2416,
"preview": "# Copyright 2021 The SODA Authors.\n#\n# Licensed under the Apache License, Version 2.0 (the \"License\");\n# you may not use"
},
{
"path": "delfin/drivers/dell_emc/vnx/vnx_block/vnx_block.py",
"chars": 4013,
"preview": "# Copyright 2021 The SODA Authors.\n#\n# Licensed under the Apache License, Version 2.0 (the \"License\");\n# you may not use"
},
{
"path": "delfin/drivers/dell_emc/vplex/__init__.py",
"chars": 0,
"preview": ""
},
{
"path": "delfin/drivers/dell_emc/vplex/alert_handler.py",
"chars": 2502,
"preview": "# Copyright 2021 The SODA Authors.\n#\n# Licensed under the Apache License, Version 2.0 (the \"License\");\n# you may not use"
},
{
"path": "delfin/drivers/dell_emc/vplex/consts.py",
"chars": 2727,
"preview": "# Copyright 2021 The SODA Authors.\n#\n# Licensed under the Apache License, Version 2.0 (the \"License\");\n# you may not use"
},
{
"path": "delfin/drivers/dell_emc/vplex/rest_handler.py",
"chars": 5909,
"preview": "# Copyright 2021 The SODA Authors.\n#\n# Licensed under the Apache License, Version 2.0 (the \"License\");\n# you may not use"
},
{
"path": "delfin/drivers/dell_emc/vplex/vplex_stor.py",
"chars": 31528,
"preview": "# Copyright 2021 The SODA Authors.\n#\n# Licensed under the Apache License, Version 2.0 (the \"License\");\n# you may not use"
},
{
"path": "delfin/drivers/driver.py",
"chars": 13593,
"preview": "# Copyright 2020 The SODA Authors.\n#\n# Licensed under the Apache License, Version 2.0 (the \"License\");\n# you may not use"
},
{
"path": "delfin/drivers/fake_storage/__init__.py",
"chars": 49211,
"preview": "# Copyright 2020 The SODA Authors.\n#\n# Licensed under the Apache License, Version 2.0 (the \"License\");\n# you may not use"
},
{
"path": "delfin/drivers/fujitsu/__init__.py",
"chars": 0,
"preview": ""
},
{
"path": "delfin/drivers/fujitsu/eternus/__init__.py",
"chars": 0,
"preview": ""
},
{
"path": "delfin/drivers/fujitsu/eternus/cli_handler.py",
"chars": 17440,
"preview": "# Copyright 2022 The SODA Authors.\n#\n# Licensed under the Apache License, Version 2.0 (the \"License\");\n# you may not use"
},
{
"path": "delfin/drivers/fujitsu/eternus/consts.py",
"chars": 12674,
"preview": "# Copyright 2020 The SODA Authors.\n# Copyright (c) 2016 Huawei Technologies Co., Ltd.\n# All Rights Reserved.\n#\n# Lice"
},
{
"path": "delfin/drivers/fujitsu/eternus/eternus_ssh_client.py",
"chars": 5494,
"preview": "# Copyright 2020 The SODA Authors.\n# Copyright 2011 OpenStack LLC\n# All Rights Reserved.\n#\n# Licensed under the Apach"
},
{
"path": "delfin/drivers/fujitsu/eternus/eternus_stor.py",
"chars": 41039,
"preview": "# Copyright 2022 The SODA Authors.\n#\n# Licensed under the Apache License, Version 2.0 (the \"License\");\n# you may not use"
},
{
"path": "delfin/drivers/h3c/__init__.py",
"chars": 0,
"preview": ""
},
{
"path": "delfin/drivers/h3c/unistor_cf/__init__.py",
"chars": 0,
"preview": ""
},
{
"path": "delfin/drivers/h3c/unistor_cf/unistor_cf.py",
"chars": 855,
"preview": "# Copyright 2022 The SODA Authors.\n#\n# Licensed under the Apache License, Version 2.0 (the \"License\");\n# you may not use"
},
{
"path": "delfin/drivers/helper.py",
"chars": 2710,
"preview": "# Copyright 2020 The SODA Authors.\n#\n# Licensed under the Apache License, Version 2.0 (the \"License\");\n# you may not use"
},
{
"path": "delfin/drivers/hitachi/__init__.py",
"chars": 0,
"preview": ""
},
{
"path": "delfin/drivers/hitachi/hnas/__init__.py",
"chars": 0,
"preview": ""
},
{
"path": "delfin/drivers/hitachi/hnas/constants.py",
"chars": 3846,
"preview": "# Copyright 2021 The SODA Authors.\n# All Rights Reserved.\n#\n# Licensed under the Apache License, Version 2.0 (the \"Li"
},
{
"path": "delfin/drivers/hitachi/hnas/hds_nas.py",
"chars": 2398,
"preview": "# Copyright 2021 The SODA Authors.\n#\n# Licensed under the Apache License, Version 2.0 (the \"License\");\n# you may not use"
},
{
"path": "delfin/drivers/hitachi/hnas/nas_handler.py",
"chars": 36043,
"preview": "# Copyright 2021 The SODA Authors.\n# All Rights Reserved.\n#\n# Licensed under the Apache License, Version 2.0 (the \"Licen"
},
{
"path": "delfin/drivers/hitachi/vsp/__init__.py",
"chars": 0,
"preview": ""
},
{
"path": "delfin/drivers/hitachi/vsp/consts.py",
"chars": 941,
"preview": "# Copyright 2020 The SODA Authors.\n#\n# Licensed under the Apache License, Version 2.0 (the \"License\");\n# you may not use"
},
{
"path": "delfin/drivers/hitachi/vsp/rest_handler.py",
"chars": 12275,
"preview": "# Copyright 2021 The SODA Authors.\n# All Rights Reserved.\n#\n# Licensed under the Apache License, Version 2.0 (the \"Li"
},
{
"path": "delfin/drivers/hitachi/vsp/vsp_stor.py",
"chars": 33995,
"preview": "# Copyright 2021 The SODA Authors.\n#\n# Licensed under the Apache License, Version 2.0 (the \"License\");\n# you may not use"
},
{
"path": "delfin/drivers/hpe/__init__.py",
"chars": 0,
"preview": ""
},
{
"path": "delfin/drivers/hpe/hpe_3par/__init__.py",
"chars": 0,
"preview": ""
},
{
"path": "delfin/drivers/hpe/hpe_3par/alert_handler.py",
"chars": 10771,
"preview": "# Copyright 2020 The SODA Authors.\n#\n# Licensed under the Apache License, Version 2.0 (the \"License\");\n# you may not use"
},
{
"path": "delfin/drivers/hpe/hpe_3par/component_handler.py",
"chars": 44931,
"preview": "# Copyright 2020 The SODA Authors.\n#\n# Licensed under the Apache License, Version 2.0 (the \"License\");\n# you may not use"
},
{
"path": "delfin/drivers/hpe/hpe_3par/consts.py",
"chars": 40811,
"preview": "# Copyright 2020 The SODA Authors.\n# Copyright (c) 2016 Huawei Technologies Co., Ltd.\n# All Rights Reserved.\n#\n# Lice"
},
{
"path": "delfin/drivers/hpe/hpe_3par/hpe_3parstor.py",
"chars": 5067,
"preview": "# Copyright 2020 The SODA Authors.\n#\n# Licensed under the Apache License, Version 2.0 (the \"License\");\n# you may not use"
},
{
"path": "delfin/drivers/hpe/hpe_3par/rest_handler.py",
"chars": 9770,
"preview": "# Copyright 2020 The SODA Authors.\n# Copyright (c) 2016 Huawei Technologies Co., Ltd.\n# All Rights Reserved.\n#\n# Lice"
},
{
"path": "delfin/drivers/hpe/hpe_3par/ssh_handler.py",
"chars": 26536,
"preview": "# Copyright 2020 The SODA Authors.\n# Copyright (c) 2016 Huawei Technologies Co., Ltd.\n# All Rights Reserved.\n#\n# Lice"
},
{
"path": "delfin/drivers/hpe/hpe_msa/__init__.py",
"chars": 0,
"preview": ""
},
{
"path": "delfin/drivers/hpe/hpe_msa/consts.py",
"chars": 1507,
"preview": "from delfin.common import constants\n\n\nclass AlertOIDNumber(object):\n OID_ERR_ID = '1.3.6.1.3.94.1.11.1.1'\n OID_EVE"
},
{
"path": "delfin/drivers/hpe/hpe_msa/hpe_msastor.py",
"chars": 2244,
"preview": "from delfin.drivers import driver\nfrom delfin.drivers.hpe.hpe_msa import ssh_handler\nfrom delfin.drivers.hpe.hpe_msa.ssh"
},
{
"path": "delfin/drivers/hpe/hpe_msa/ssh_handler.py",
"chars": 36674,
"preview": "import hashlib\nimport time\n\nimport six\nfrom oslo_log import log as logging\nfrom operator import itemgetter\nfrom itertool"
},
{
"path": "delfin/drivers/huawei/__init__.py",
"chars": 0,
"preview": ""
},
{
"path": "delfin/drivers/huawei/oceanstor/__init__.py",
"chars": 0,
"preview": ""
},
{
"path": "delfin/drivers/huawei/oceanstor/alert_handler.py",
"chars": 8614,
"preview": "# Copyright 2020 The SODA Authors.\n#\n# Licensed under the Apache License, Version 2.0 (the \"License\");\n# you may not use"
},
{
"path": "delfin/drivers/huawei/oceanstor/consts.py",
"chars": 9259,
"preview": "# Copyright 2020 The SODA Authors.\n# Copyright (c) 2016 Huawei Technologies Co., Ltd.\n# All Rights Reserved.\n#\n# Lice"
},
{
"path": "delfin/drivers/huawei/oceanstor/oceanstor.py",
"chars": 32917,
"preview": "# Copyright 2020 The SODA Authors.\n#\n# Licensed under the Apache License, Version 2.0 (the \"License\");\n# you may not use"
},
{
"path": "delfin/drivers/huawei/oceanstor/oid_mapper.py",
"chars": 2021,
"preview": "# Copyright 2020 The SODA Authors.\n#\n# Licensed under the Apache License, Version 2.0 (the \"License\");\n# you may not use"
},
{
"path": "delfin/drivers/huawei/oceanstor/rest_client.py",
"chars": 27455,
"preview": "# Copyright 2020 The SODA Authors.\n# Copyright (c) 2016 Huawei Technologies Co., Ltd.\n# All Rights Reserved.\n#\n# Lice"
},
{
"path": "delfin/drivers/ibm/__init__.py",
"chars": 0,
"preview": ""
},
{
"path": "delfin/drivers/ibm/ds8k/__init__.py",
"chars": 0,
"preview": ""
},
{
"path": "delfin/drivers/ibm/ds8k/alert_handler.py",
"chars": 2807,
"preview": "# Copyright 2021 The SODA Authors.\n#\n# Licensed under the Apache License, Version 2.0 (the \"License\");\n# you may not use"
},
{
"path": "delfin/drivers/ibm/ds8k/consts.py",
"chars": 64,
"preview": "HOST_PORT_URL = '/api/v1/host_ports'\nHOST_URL = '/api/v1/hosts'\n"
},
{
"path": "delfin/drivers/ibm/ds8k/ds8k.py",
"chars": 15023,
"preview": "# Copyright 2021 The SODA Authors.\n#\n# Licensed under the Apache License, Version 2.0 (the \"License\");\n# you may not use"
},
{
"path": "delfin/drivers/ibm/ds8k/rest_handler.py",
"chars": 4007,
"preview": "# Copyright 2021 The SODA Authors.\n# All Rights Reserved.\n#\n# Licensed under the Apache License, Version 2.0 (the \"Li"
},
{
"path": "delfin/drivers/ibm/storwize_svc/__init__.py",
"chars": 0,
"preview": ""
},
{
"path": "delfin/drivers/ibm/storwize_svc/consts.py",
"chars": 4277,
"preview": "# Copyright 2020 The SODA Authors.\n# Copyright (c) 2016 Huawei Technologies Co., Ltd.\n# All Rights Reserved.\n#\n# Lice"
},
{
"path": "delfin/drivers/ibm/storwize_svc/ssh_handler.py",
"chars": 52785,
"preview": "# Copyright 2020 The SODA Authors.\n# All Rights Reserved.\n#\n# Licensed under the Apache License, Version 2.0 (the \"Li"
},
{
"path": "delfin/drivers/ibm/storwize_svc/storwize_svc.py",
"chars": 3419,
"preview": "# Copyright 2020 The SODA Authors.\n#\n# Licensed under the Apache License, Version 2.0 (the \"License\");\n# you may not use"
},
{
"path": "delfin/drivers/inspur/__init__.py",
"chars": 0,
"preview": ""
},
{
"path": "delfin/drivers/inspur/as5500/__init__.py",
"chars": 0,
"preview": ""
},
{
"path": "delfin/drivers/inspur/as5500/as5500.py",
"chars": 841,
"preview": "# Copyright 2022 The SODA Authors.\n#\n# Licensed under the Apache License, Version 2.0 (the \"License\");\n# you may not use"
},
{
"path": "delfin/drivers/macro_san/__init__.py",
"chars": 0,
"preview": ""
},
{
"path": "delfin/drivers/macro_san/ms/__init__.py",
"chars": 0,
"preview": ""
},
{
"path": "delfin/drivers/macro_san/ms/consts.py",
"chars": 30104,
"preview": "# Copyright 2022 The SODA Authors.\n# Copyright (c) 2022 Huawei Technologies Co., Ltd.\n# All Rights Reserved.\n#\n# Lice"
},
{
"path": "delfin/drivers/macro_san/ms/file/__init__.py",
"chars": 0,
"preview": ""
},
{
"path": "delfin/drivers/macro_san/ms/macro_ssh_client.py",
"chars": 4319,
"preview": "# Copyright 2020 The SODA Authors.\n# Copyright 2011 OpenStack LLC\n# All Rights Reserved.\n#\n# Licensed under the Apach"
},
{
"path": "delfin/drivers/macro_san/ms/ms_handler.py",
"chars": 57171,
"preview": "# Copyright 2022 The SODA Authors.\n# Copyright (c) 2022 Huawei Technologies Co., Ltd.\n# All Rights Reserved.\n#\n# Lice"
},
{
"path": "delfin/drivers/macro_san/ms/ms_stor.py",
"chars": 3911,
"preview": "# Copyright 2022 The SODA Authors.\n# Copyright (c) 2022 Huawei Technologies Co., Ltd.\n# All Rights Reserved.\n#\n# Lice"
},
{
"path": "delfin/drivers/manager.py",
"chars": 5469,
"preview": "# Copyright 2020 The SODA Authors.\n#\n# Licensed under the Apache License, Version 2.0 (the \"License\");\n# you may not use"
},
{
"path": "delfin/drivers/netapp/__init__.py",
"chars": 0,
"preview": ""
},
{
"path": "delfin/drivers/netapp/dataontap/__init__.py",
"chars": 0,
"preview": ""
},
{
"path": "delfin/drivers/netapp/dataontap/cluster_mode.py",
"chars": 3687,
"preview": "# Copyright 2021 The SODA Authors.\n#\n# Licensed under the Apache License, Version 2.0 (the \"License\");\n# you may not use"
},
{
"path": "delfin/drivers/netapp/dataontap/constants.py",
"chars": 25574,
"preview": "# Copyright 2021 The SODA Authors.\n# All Rights Reserved.\n#\n# Licensed under the Apache License, Version 2.0 (the \"Li"
}
]
// ... and 216 more files (download for full content)
About this extraction
This page contains the full source code of the sodafoundation/delfin GitHub repository, extracted and formatted as plain text for AI agents and large language models (LLMs). The extraction includes 416 files (3.6 MB), approximately 967.4k tokens, and a symbol index with 3684 extracted functions, classes, methods, constants, and types. Use this with OpenClaw, Claude, ChatGPT, Cursor, Windsurf, or any other AI tool that accepts text input. You can copy the full output to your clipboard or download it as a .txt file.
Extracted by GitExtract — free GitHub repo to text converter for AI. Built by Nikandr Surkov.