Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

Code Block
languagebash
linenumbersfalse
Usage: vss-cli compute folder [OPTIONS] COMMAND [ARGS]...

Logical Folders are containers for storing and organizing inventory
objects, in this case virtual machines.

Options:
--help  Show this message and exit.

Commands:
get  Given folder info.
ls   list folders
mk   create folder
rm   remove folder
set  update folder

Anchor
List
List
Anchor
ManageLogicalFolders-List
ManageLogicalFolders-List
List

Run vss-cli compute folder to list available logical folders. Filter list by name using the option --filter-by/-f which is structured <field_name>=<operator>,<value> and available operators are eq, ne, lt, le, gt, ge, like, in as follows:

Code Block
languagebash
linenumbersfalse
vss-cli compute folder ls -f name=ut

moref        name              parent.name  path
-----------  ----------------  -----------  ----------------------------------------------
group-v8900  ut20170135153548  Testing      VSS > Development > Testing > ut20170135153548
group-v8923  ut20170621092129  Testing      VSS > Development > Testing > ut20170621092129

Anchor
Info
Info
Anchor
ManageLogicalFolders-Info
ManageLogicalFolders-Info
Info

Folder info, such as name, parent and path, children folders and stored virtual machines are available via vss-cli compute folder get <name-path-or-moref> command.

Code Block
languagebash
linenumbersfalse
vss-cli compute folder get group-v8900

moref               : group-v905
name                : ut20170135153548
path                : Development > Testing > ut20170135153548
parent.name         : Testing
parent.moref        : group-v8900
has_children        : False

Anchor
Create
Create
Anchor
ManageLogicalFolders-Create
ManageLogicalFolders-Create
Create

To create a new folder just run vss-cli compute folder mk <name> --parent <name-path-moref>, for instance:

...

Code Block
languagebash
linenumbersfalse
vss-cli --wait compute folder mk --parent group-v8900 QA DEV PROD UAT

id  status     task_id                               message
----  ---------  ------------------------------------  ----------------------------------------
49  SUBMITTED  dbd51c34-fd1c-48e4-a2dc-dd33aa44f1e1  Request has been accepted for processing
50  SUBMITTED  03f0d9cf-e23f-4f70-b511-2c0f69888e63  Request has been accepted for processing
51  SUBMITTED  a9380056-9d07-44f3-8469-c1e8149e90bf  Request has been accepted for processing
52  SUBMITTED  8100b93c-0dba-463c-a76a-4d8b97e47c03  Request has been accepted for processing

⏳ Waiting for request 49 to complete...
⏳ Waiting for request 50 to complete...
⏳ Waiting for request 51 to complete...
⏳ Waiting for request 52 to complete...

🎉 Request 50 completed successfully:
warnings            : Folder ITS > EIS > Data Centre Dev > Folder10 > DEV created
errors              :
🎉 Request 52 completed successfully:
warnings            : Folder ITS > EIS > Data Centre Dev > Folder10 > UAT created
errors              :
🎉 Request 49 completed successfully:
warnings            : Folder ITS > EIS > Data Centre Dev > Folder10 > QA created
errors              :
🎉 Request 51 completed successfully:
warnings            : Folder ITS > EIS > Data Centre Dev > Folder10 > PROD created
errors              :

Anchor
Update
Update
Anchor
ManageLogicalFolders-Update
ManageLogicalFolders-Update
Update

Moving and renaming folders are command enclosed in the vss-cli compute folder set group.

Anchor
Rename
Rename
Anchor
ManageLogicalFolders-Rename
ManageLogicalFolders-Rename
Rename

Run vss-cli compute folder set <name-path-moref> name <new_name> to rename a folder. For example, the following command renames a given moref to Prd:

...

Check the state of the request made by running vss-cli request folder ls -s created_on desc -c 1 or vss-cli request folder get <id>.

Anchor
Move
Move
Anchor
ManageLogicalFolders-Move
ManageLogicalFolders-Move
Move

To move folders run vss-cli compute folder set <name-path-moref> parent <parent-name-path-moref> where the first name-path-moref is the folder required to move and the parent-name-path-moref is the target folder to move to.

...

Check the state of the request made by running vss-cli request folder ls -s created_on desc -c 1 or vss-cli request folder get <id>.

Anchor
Remove
Remove
Anchor
ManageLogicalFolders-Remove
ManageLogicalFolders-Remove
Remove

To remove a new folder just run vss-cli compute folder rm <name-path-moref> ..., for instance:

...