Did I find the right examples for you? yes no      Crawl my project      Python Jobs

All Samples(11)  |  Call(11)  |  Derive(0)  |  Import(0)

src/s/y/synnefo-HEAD/snf-cyclades-app/synnefo/volume/volumes.py   synnefo(Download)
        origin = source_volume.backend_volume_uuid
    elif source_type == "snapshot":
        source_snapshot = util.get_snapshot(user_id, source_uuid,
                                            exception=faults.BadRequest)
        snap_status = source_snapshot.get("status", "").upper()

src/s/y/synnefo-HEAD/snf-cyclades-app/synnefo/volume/views.py   synnefo(Download)
def delete_snapshot(request, snapshot_id):
    log.debug("delete_snapshot snapshot_id: %s", snapshot_id)
 
    snapshot = util.get_snapshot(request.user_uniq, snapshot_id)
    snapshots.delete(snapshot)
def get_snapshot(request, snapshot_id):
    log.debug('get_snapshot snapshot_id: %s', snapshot_id)
 
    snapshot = util.get_snapshot(request.user_uniq, snapshot_id)
    data = json.dumps({'snapshot': snapshot_to_dict(snapshot, detail=True)})
def update_snapshot(request, snapshot_id):
    req = utils.get_json_body(request)
    log.debug('update_snapshot snapshot_id: %s, request: %s', snapshot_id, req)
    snapshot = util.get_snapshot(request.user_uniq, snapshot_id)
 
def list_snapshot_metadata(request, snapshot_id):
    log.debug('list_snapshot_meta snapshot_id: %s', snapshot_id)
    snapshot = util.get_snapshot(request.user_uniq, snapshot_id)
    metadata = snapshot["properties"]
    data = json.dumps({"metadata": dict(metadata)})
def update_snapshot_metadata(request, snapshot_id, reset=False):
    req = utils.get_json_body(request)
    log.debug('update_snapshot_meta snapshot_id: %s, reset: %s request: %s',
              snapshot_id, reset, req)
    snapshot = util.get_snapshot(request.user_uniq, snapshot_id)

src/s/y/synnefo-HEAD/snf-cyclades-app/synnefo/volume/management/commands/snapshot-remove.py   synnefo(Download)
            self.stdout.write("\n")
            try:
                snapshot = util.get_snapshot(user_id, snapshot_id)
 
                snapshots.delete(snapshot)

src/s/y/synnefo-HEAD/snf-cyclades-app/synnefo/volume/management/commands/snapshot-modify.py   synnefo(Download)
        description = self.options["description"]
 
        snapshot = util.get_snapshot(user_id, snapshot_id)
 
        snapshots.modify(snapshot, name=name, description=description)

src/s/y/synnefo-HEAD/snf-cyclades-app/synnefo/volume/snapshots.py   synnefo(Download)
                              snapshot_id=snapshot_id)
 
    snapshot = util.get_snapshot(user_id, snapshot_id)
 
    return snapshot