Spec: Improving offline experience

See story Improve offline functionality in 'morph'

1. Online or offline

  1. By default, if connection can be made to Trove, use it - work online. If not work offline

  2. User can change the default a. In morph.conf using key:value pair off/online=true/false b. on the command line using --offline / ---online options

  3. If user has chosen to work online, and Trove is not contactable EITHER a: abort with an error message OR b: display a warning, allowing user to continue offline

  4. When working online, if an operation fails because Trove is not available, retry EITHER a: once before aborting command b: OR a number of times, configurable in morph.comnf or on the command line

2. Preparing to work online

Add morph prepare-for-offline command which - clones any repos required for the current system which are not yet cached locally - updates all local repos - optionally, push any locally cached artifacts [1] - any other functionality TBD

3. Normal work flow

As far as possible, all morph operations will work both online and offline.

If the user is working offline, and invokes an operation which needs to be online [2] then abort the operation with an error message.

4. Going online

If the user has beens working offline, but the default is set to 'online', then, when the Trove becomes available, perform the 'prepare to work online' operations EITHER a: automatically, without consulting user OR b: if the user agrees

[1] Is this a sensible thing to do? [2] Are there any? Should there be any?