'Delete a snapshot by uri.
:param otype: block
:param resource_uri: uri of the source resource
:param suri: Uri of the Snapshot
:param sync: To perform operation synchronously
:param synctimeout: Query for task status for \'synctimeout\' secs. If
the task doesn\'t complete in synctimeout secs,
an exception is thrown'

def snapshot_delete_uri(self, otype, resource_uri, suri, sync, synctimeout=0):

    s = None
    if (resource_uri.find('Volume') > 0):
        (s, h) = common.service_json_request(self.ipaddr, self.port, 'POST', Snapshot.URI_RESOURCE_DEACTIVATE.format(Snapshot.URI_BLOCK_SNAPSHOTS.format(suri)), None)
    elif (resource_uri.find('BlockConsistencyGroup') > 0):
        (s, h) = common.service_json_request(self.ipaddr, self.port, 'POST', Snapshot.URI_CONSISTENCY_GROUPS_SNAPSHOT_DEACTIVATE.format(resource_uri, suri), None)
    o = common.json_decode(s)
    task = o['task'][0]
    if sync:
        return common.block_until_complete(otype, task['resource']['id'], task['id'], self.ipaddr, self.port, synctimeout)
    else:
        return o
