Skip to content

Commit

Permalink
Create snapshots using reactive approach
Browse files Browse the repository at this point in the history
This makes the events ResourceDeploymentState, SnapshotDeployment
and InProgressSnapshot unnecessary.
  • Loading branch information
JoelColledge committed Nov 5, 2018
1 parent 58e8a9f commit 3cfa58b
Showing 1 changed file with 2 additions and 7 deletions.
9 changes: 2 additions & 7 deletions linstor_client/commands/commands.py
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,7 @@
from datetime import datetime, timedelta

import linstor
from linstor.sharedconsts import NAMESPC_AUXILIARY, EVENT_VOLUME_DISK_STATE, EVENT_RESOURCE_STATE, \
EVENT_RESOURCE_DEPLOYMENT_STATE, EVENT_SNAPSHOT_DEPLOYMENT
from linstor.sharedconsts import NAMESPC_AUXILIARY, EVENT_VOLUME_DISK_STATE, EVENT_RESOURCE_STATE
from linstor.properties import properties
from linstor.protobuf_to_dict import protobuf_to_dict
import linstor_client
Expand Down Expand Up @@ -672,11 +671,7 @@ def reply_handler(replies):

event_formatter_table = {
EVENT_VOLUME_DISK_STATE: lambda event_data: "Disk state: " + event_data.disk_state,
EVENT_RESOURCE_STATE: lambda event_data: "Resource ready: " + str(event_data.ready),
EVENT_RESOURCE_DEPLOYMENT_STATE: lambda event_data:
"Deployment state: " + self._summarize_api_call_responses(event_data.responses),
EVENT_SNAPSHOT_DEPLOYMENT: lambda event_data:
"Snapshot deployment state: " + self._summarize_api_call_responses(event_data.responses)
EVENT_RESOURCE_STATE: lambda event_data: "Resource ready: " + str(event_data.ready)
}

def event_handler(event_header, event_data):
Expand Down

0 comments on commit 3cfa58b

Please sign in to comment.