Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 0 additions & 10 deletions PyPowerFlex/objects/gen2/snapshot_policy.py
Original file line number Diff line number Diff line change
Expand Up @@ -107,16 +107,6 @@ def remove_source_volume(self,

return self.get(entity_id=snapshot_policy_id)

def query_snapshot_policy_metrics(self, snapshot_policy_id, metrics=None):
"""Query PowerFlex Metrics for snapshot policy.
TODO TTHE make sure this API is valid after new dev build is ready

:type snapshot_policy_id: str
:type metrics: list|tuple
:rtype: dict
"""
return self.query_metrics('snapshot_policy', [snapshot_policy_id], metrics)

def get_statistics(self, snapshot_policy_id, fields=None):
"""Get PowerFlex Snapshot Policy Statistics not supported in PowerFlex 5.x.

Expand Down
20 changes: 0 additions & 20 deletions tests/gen2/test_snapshot_policy.py
Original file line number Diff line number Diff line change
Expand Up @@ -56,9 +56,6 @@ def setUp(self):
{},
f'/instances/SnapshotPolicy::{self.fake_policy_id}/action/resumeSnapshotPolicy':
{},
'/dtapi/rest/v1/metrics/query': {
self.fake_policy_id: {'numOfpypowerflexVols': 1}
},
},
self.RESPONSE_MODE.Invalid: {
'/types/SnapshotPolicy/instances':
Expand Down Expand Up @@ -222,23 +219,6 @@ def test_snapshot_policy_resume_bad_status(self):
self.client.snapshot_policy.resume,
self.fake_policy_id)

def test_snapshot_policy_query_metrics(self):
"""
Test snapshot policy query selected metrics.
"""
ret = self.client.snapshot_policy.query_snapshot_policy_metrics(self.fake_policy_id)
assert ret.get(self.fake_policy_id).get("numOfpypowerflexVols") == 1

def test_snapshot_policy_query_metrics_bad_status(self):
"""
Test snapshot policy query selected metrics with bad status.
"""
with self.http_response_mode(self.RESPONSE_MODE.BadStatus):
self.assertRaises(
exceptions.PowerFlexClientException,
self.client.snapshot_policy.query_snapshot_policy_metrics,
self.fake_policy_id)

def test_snapshot_policy_query_selected_statistics_not_supported(self):
"""
Tests the behavior of the query_selected_statistics method.
Expand Down