def printassets(args): config = Config(args) ctx = config_context.ConfigContext(config) for w in config.cloud_workstations: workstation = cws.Cws(ctx, w.name) print("Workstation", workstation.unique_name()) print(" State", workstation.state()) snapshots = workstation.snapshot_names() for i, volume in enumerate(workstation.volumes()): print(" Volume", volume.unique_name()) for snapshot in snapshots[i]: print(" Snapshot", snapshot)
def tidysnapshots(args): ctx = config_context.ConfigContext(Config(args)) workstation = cws.Cws(ctx, args.name) workstation.tidy_snapshots()
def powerdown(args): ctx = config_context.ConfigContext(Config(args)) workstation = cws.Cws(ctx, args.name) workstation.powerdown()
def rehydrate(args): ctx = config_context.ConfigContext(Config(args)) workstation = cws.Cws(ctx, args.name) workstation.rehydrate()
def dessicate(args): ctx = config_context.ConfigContext(Config(args)) workstation = cws.Cws(ctx, args.name) workstation.dessicate()
def stop(args): ctx = config_context.ConfigContext(Config(args)) workstation = cws.Cws(ctx, args.name) workstation.stop()