'Test snapshot deletion from primary DN.'

@mock.patch('cinder.volume.drivers.veritas.vrtshyperscale.HyperScaleDriver._get_volume_metadata')
@mock.patch('cinder.volume.api.API.get_volume')
@mock.patch('cinder.volume.drivers.veritas.utils.message_data_plane')
def test_delete_snapshot_from_primary_dn(self, mock_mdp, mock_gv, mock_gvm):

    mock_gv.return_value = None
    mock_gvm.return_value = {'current_dn_ip': self.driver.datanode_ip}
    message_body = {}
    message_body['volume_guid'] = (('{' + self.volume['id']) + '}')
    message_body['snapshot_id'] = (('{' + self.snapshot['id']) + '}')
    self.driver.delete_snapshot(self.snapshot)
    mock_mdp.assert_called_with(self.driver.dn_routing_key, 'hyperscale.storage.dm.version.delete', **message_body)
