MCPcopy Index your code
hub / github.com/fastmonkeys/stellar / rename

Function rename

stellar/command.py:151–166  ·  view source on GitHub ↗

Renames a snapshot

(old_name, new_name)

Source from the content-addressed store, hash-verified

149@click.argument('old_name')
150@click.argument('new_name')
151def rename(old_name, new_name):
152 """Renames a snapshot"""
153 app = get_app()
154
155 snapshot = app.get_snapshot(old_name)
156 if not snapshot:
157 click.echo("Couldn't find snapshot %s" % old_name)
158 sys.exit(1)
159
160 new_snapshot = app.get_snapshot(new_name)
161 if new_snapshot:
162 click.echo("Snapshot with name %s already exists" % new_name)
163 sys.exit(1)
164
165 app.rename_snapshot(snapshot, new_name)
166 click.echo("Renamed snapshot %s to %s" % (old_name, new_name))
167
168
169@stellar.command()

Callers

nothing calls this directly

Calls 3

get_appFunction · 0.85
get_snapshotMethod · 0.80
rename_snapshotMethod · 0.80

Tested by

no test coverage detected