Skip to content
This repository was archived by the owner on Nov 29, 2023. It is now read-only.

Commit 49adeac

Browse files
Jaume Devesastackops-gerrit
authored andcommitted
Merge "Improvement first release Datastore Candidate"
2 parents 4d56096 + e5b05e6 commit 49adeac

2 files changed

Lines changed: 14 additions & 36 deletions

File tree

automationclient/v1_1/shell.py

Lines changed: 0 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -1263,13 +1263,6 @@ def do_datastore_delete(cs, args):
12631263
@utils.arg('zone', metavar='<zone>',
12641264
type=int,
12651265
help='ID of the zone to attach the resource')
1266-
@utils.arg('role', metavar='<role>',
1267-
type=int,
1268-
help='ID of the role to attach the resource')
1269-
@utils.arg('component', metavar='<component-name>',
1270-
type=str,
1271-
help='Name of the component catalog used that has the properties '
1272-
'related with storage')
12731266
@utils.arg('resource', metavar='<resource>',
12741267
type=str,
12751268
help='Indicates the kind of the resource will be used. '
@@ -1287,13 +1280,9 @@ def do_datastore_attach(cs, args):
12871280
else:
12881281
secure = ''
12891282
zone = _find_zone(cs, args.zone)
1290-
role = _find_role(cs, args.zone, args.role)
1291-
component = _find_component(cs, args.component)
12921283
datastore = _find_datastore(cs, args.datastore)
12931284
options = {
12941285
'id_zone': zone.id,
1295-
'id_role': role.id,
1296-
'component_name': component.name,
12971286
'resource': args.resource,
12981287
'secure': secure
12991288
}

docs/source/Datastore.rst

Lines changed: 14 additions & 25 deletions
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,10 @@ What is a datastore?
1818

1919
A **shared storage resource over a network** in a server identified by its endpoint, store, type of implementation and others who it is a candidate to take part in an OpenStack Zone. A datastore is view in the datastores' pool once it has been added to.
2020

21+
How to use the datastore information once it has been attached to a zone (Reference its properties to be used in a zone)
22+
------------------------------------------------------------------------------------------------------------------------
23+
24+
To do a reference about a specific datastore property and use it (once it has been attached to a zone) just you need to do $zone.id.property. For further information http://docs.stackops.org/display/STACKOPSAUTOMATION/Properties
2125

2226
Life cycle management basics
2327
----------------------------
@@ -28,6 +32,8 @@ The datastores' pool is the tool included in StackOps Automation that automates
2832
:alt: Datastores' pool life cycle for a datastore
2933
:align: center
3034

35+
36+
3137
Managing Datastores
3238
-------------------
3339

@@ -186,8 +192,6 @@ Show all the information related with a specific datastore.
186192
| href | http://0.0.0.0:8089/v1.1/datastores/14 |
187193
| id | 14 |
188194
| id_nova_zone | None |
189-
| id_role | None |
190-
| id_component_name | None |
191195
| id_storage_types | NFS |
192196
| identifier | nfs1 |
193197
| parameters | |
@@ -256,8 +260,6 @@ Update a specific datastore parameters
256260
| href | http://0.0.0.0:8089/v1.1/datastores/14 |
257261
| id | 14 |
258262
| id_nova_zone | None |
259-
| id_role | None |
260-
| id_component_name| None |
261263
| id_storage_types | NFS |
262264
| identifier | nfs1 |
263265
| parameters | par1 par2 par3 |
@@ -278,34 +280,28 @@ This service allows to link a specific datastore to a zone and resource (volumes
278280
279281
$ help datastore-attach
280282
usage: automation datastore-attach [--secure <secure>]
281-
<datastore-id> <zone> <role>
282-
<component-name> <resource>
283+
<datastore-id> <zone> <resource>
283284
284285
Attach a specific datastore to a zone.
285286
286287
Positional arguments:
287288
<datastore-id> ID of the datastore/store/volume in the pool
288289
<zone> ID of the zone to attach the resource
289-
<role> ID of the role to attach the resource
290-
<component-name> Name of the component catalog used that has the
291-
properties related with storage
292290
<resource> Indicates the kind of the resource will be used. Images,
293291
instances or volumes
294292
295293
Optional arguments:
296294
--secure <secure> Indicates whether the datastore/store/volume in the pool
297295
won't be detached.
298296
299-
$ datastore-attach 14 2 4 folsom.storage images
297+
$ datastore-attach 14 2 images
300298
+------------------+----------------------------------------+
301299
| Property | Value |
302300
+------------------+----------------------------------------+
303301
| endpoint | 192.168.1.52 |
304302
| href | http://0.0.0.0:8089/v1.1/datastores/14 |
305303
| id | 14 |
306304
| id_nova_zone | 2 |
307-
| id_role | 4 |
308-
| id_component_name| folsom.storage |
309305
| id_storage_types | NFS |
310306
| identifier | nfs1 |
311307
| parameters | par1 par2 par3 |
@@ -326,33 +322,26 @@ This service allows to unlink a specific datastore from a zone and resource (vol
326322
.. code-block:: bash
327323
328324
$ help datastore-detach
329-
usage: automation datastore-detach [--force <force>]
330-
<datastore-id> <role> <component-name>
325+
usage: automation datastore-detach [--force <force>] <datastore-id>
331326
332327
Detach a specific datastore from a zone.
333328
334329
Positional arguments:
335-
<datastore-id> ID of the datastore/store/volume in the pool
336-
<role> ID of the role attached the datastore/store/volume
337-
<component-name> Name of the component catalog used that have the
338-
properties related with storage attached with the
339-
datastore and/or store
330+
<datastore-id> ID of the datastore/store/volume in the pool
340331
341332
Optional arguments:
342-
--force <force> Indicates whether the datastore/store/volume in the pool
343-
will be detached perforce. Type the word 'force' to force
344-
the operation
333+
--force <force> Indicates whether the datastore/store/volume in the pool
334+
will be detached perforce. Type the word 'force' to force
335+
the operation
345336
346-
$ datastore-detach 14 4 folsom.storage --force force
337+
$ datastore-detach 14 --force force
347338
+------------------+----------------------------------------+
348339
| Property | Value |
349340
+------------------+----------------------------------------+
350341
| endpoint | 192.168.1.52 |
351342
| href | http://0.0.0.0:8089/v1.1/datastores/14 |
352343
| id | 14 |
353344
| id_nova_zone | None |
354-
| id_role | None |
355-
| id_component_name| None |
356345
| id_storage_types | NFS |
357346
| identifier | nfs1 |
358347
| parameters | defaults |

0 commit comments

Comments
 (0)