|
1 |
| -"""Failover an inaccessible file volume to its available replicant volume.""" |
| 1 | +"""Failover an inaccessible block volume to its available replicant volume.""" |
2 | 2 | # :license: MIT, see LICENSE for more details.
|
3 | 3 |
|
4 | 4 | import click
|
5 | 5 | import SoftLayer
|
6 | 6 | from SoftLayer.CLI import environment
|
7 |
| -from SoftLayer.CLI import formatting |
8 | 7 | from SoftLayer.CLI import exceptions
|
| 8 | +from SoftLayer.CLI import formatting |
9 | 9 |
|
10 | 10 |
|
11 |
| -@click.command(epilog="""Failover an inaccessible block/file volume to its available replicant volume. |
12 |
| -If a volume (with replication) becomes inaccessible due to a disaster event, this method can be used to immediately failover to an available replica in another location. |
13 |
| -This method does not allow for fail back via the API. To fail back to the original volume after using this method, open a support ticket. |
14 |
| -To test failover, use SoftLayer_Network_Storage::failoverToReplicant instead.""") |
| 11 | +@click.command(epilog="""Failover an inaccessible block volume to its available replicant volume. |
| 12 | +If a volume (with replication) becomes inaccessible due to a disaster event, this method can be used to immediately |
| 13 | +failover to an available replica in another location. This method does not allow for failback via API. |
| 14 | +After using this method, to failback to the original volume, please open a support ticket. |
| 15 | +If you wish to test failover, please use replica-failover.""") |
15 | 16 | @click.argument('volume-id')
|
16 | 17 | @click.option('--replicant-id', help="ID of the replicant volume")
|
17 | 18 | @environment.pass_env
|
18 | 19 | def cli(env, volume_id, replicant_id):
|
19 |
| - """Failover an inaccessible file volume to its available replicant volume.""" |
| 20 | + """Failover an inaccessible block volume to its available replicant volume.""" |
20 | 21 | block_storage_manager = SoftLayer.BlockStorageManager(env.client)
|
21 | 22 |
|
22 |
| - click.secho("""WARNING : Failover an inaccessible block/file volume to its available replicant volume.""" |
23 |
| - """If a volume (with replication) becomes inaccessible due to a disaster event, this method can be used to immediately failover to an available replica in another location.""" |
24 |
| - """This method does not allow for fail back via the API.""" |
25 |
| - """To fail back to the original volume after using this method, open a support ticket.""" |
26 |
| - """To test failover, use SoftLayer_Network_Storage::failoverToReplicant instead.""",fg = 'red' ) |
27 |
| - |
28 |
| - if not (formatting.confirm('Are you sure you want to continue?')): |
| 23 | + click.secho("""WARNING : Failover an inaccessible block volume to its available replicant volume.""" |
| 24 | + """If a volume (with replication) becomes inaccessible due to a disaster event,""" |
| 25 | + """this method can be used to immediately failover to an available replica in another location.""" |
| 26 | + """This method does not allow for failback via the API.""" |
| 27 | + """To failback to the original volume after using this method, open a support ticket.""" |
| 28 | + """If you wish to test failover, use replica-failover instead.""", fg='red') |
| 29 | + |
| 30 | + if not formatting.confirm('Are you sure you want to continue?'): |
29 | 31 | raise exceptions.CLIAbort('Aborted.')
|
30 | 32 |
|
31 | 33 | block_storage_manager.disaster_recovery_failover_to_replicant(
|
32 | 34 | volume_id,
|
33 | 35 | replicant_id
|
34 | 36 | )
|
35 |
| - |
| 37 | + |
36 | 38 | click.echo("Disaster Recovery Failover to replicant is now in progress.")
|
0 commit comments