Skip to content

Commit

Permalink
feat(doc) update wiki and man
Browse files Browse the repository at this point in the history
  • Loading branch information
helderbetiol committed Feb 29, 2024
1 parent 1cde8e6 commit 31659db
Show file tree
Hide file tree
Showing 3 changed files with 32 additions and 89 deletions.
11 changes: 6 additions & 5 deletions CLI/other/man/link.txt
Original file line number Diff line number Diff line change
@@ -1,10 +1,11 @@
USAGE: link [PATH/TO/STRAY-DEVICE] @ [PATH/TO/RACK/OR/DEVICE] @ Slot (Optional)
Moves a stray-device to a parent in the OGREE hierarchy.
USAGE: link [PATH/TO/STRAY-DEVICE]@[PATH/TO/PARENT]@[AttributeName=AttributeValue (Optional)]
Attaches a stray object to a parent in the OGREE hierarchy.

NOTE
At this time it is recommended to not enclose the paths in quotes. If the parent is a device then the parent slot must be specified.
It is possible to also set or modify attributes of the object by adding one or more `@attributeName=attributeValue` to the command.

EXAMPLE

link /Physical/Stray/myDevice @ /Physical/demo/buildg/room/rackA
link /Physical/Stray/myDevice @ /Physical/demo/buildg/room/rackA/deviceA @ 1
link /Physical/Stray@/Physical/site/bldg/room/rack
link /Physical/Stray@/Physical/site/bldg/room/rack@slots=[slot1,slot2]
link /Physical/Stray@/Physical/site/bldg/room/rack@slots=[slot1,slot2]@orientation=front
10 changes: 3 additions & 7 deletions CLI/other/man/unlink.txt
Original file line number Diff line number Diff line change
@@ -1,10 +1,6 @@
USAGE: unlink [PATH/TO/DEVICE] @ [PATH/TO/STRAY-DEVICE-PARENT] (Optional)
Moves a device from the OGREE hierarchy to be stray-device.
USAGE: unlink [PATH/TO/DEVICE]
Moves an object from the OGREE hierarchy to /Physical/Stray. The objet will no longer have a parent.

NOTE
At this time it is recommended to not use quotes. An empty path for the destination is optional thus can be left empty

EXAMPLE

unlink /Physical/demo/buildg/room/rackA/deviceA @ /Physical/Stray/myDevice
unlink /Physical/demo/buildg/room/rackA/deviceA @
unlink /Physical/demo/buildg/room/rackA/deviceA
100 changes: 23 additions & 77 deletions wiki/CLI-language.md
Original file line number Diff line number Diff line change
Expand Up @@ -38,83 +38,7 @@
- [Delete object](#delete-object)
- [Focus an object](#focus-an-object)
- [Copy object](#copy-object)
- [Create commands](#create-commands)
- [Create a Tenant](#create-a-tenant)
- [Create a Site](#create-a-site)
- [Create a Building](#create-a-building)
- [Create a Room](#create-a-room)
- [Create a Rack](#create-a-rack)
- [Create a Device](#create-a-device)
- [Create a Group](#create-a-group)
- [Create a Corridor](#create-a-corridor)
- [Create a Tag](#create-a-tag)
- [Create a Layer](#create-a-layer)
- [Applicability Patterns](#applicability-patterns)
- [Character Classes](#character-classes)
- [Create a Generic Object](#create-a-generic-object)
- [Set commands](#set-commands)
- [Set colors for zones of all rooms in a datacenter](#set-colors-for-zones-of-all-rooms-in-a-datacenter)
- [Set reserved and technical zones of a room](#set-reserved-and-technical-zones-of-a-room)
- [Room separators](#room-separators)
- [Room pillars](#room-pillars)
- [Modify object's attribute](#modify-objects-attribute)
- [Tags](#tags)
- [Labels](#labels)
- [Choose Label](#choose-label)
- [Modify label's font](#modify-labels-font)
- [Modify label's background color](#modify-labels-background-color)
- [Interact with objects](#interact-with-objects)
- [Room](#room)
- [Rack](#rack)
- [Device](#device)
- [Group](#group)
- [Manipulate UI](#manipulate-ui)
- [Delay commands](#delay-commands)
- [Display infos panel](#display-infos-panel)
- [Display debug panel](#display-debug-panel)
- [Highlight object](#highlight-object)
- [Manipulate camera](#manipulate-camera)
- [Move camera](#move-camera)
- [Translate camera](#translate-camera)
- [Wait between two translations](#wait-between-two-translations)
- [Control flow](#control-flow)
- [Conditions](#conditions)
- [Loops](#loops)
- [Aliases](#aliases)
- [Examples](#examples)
- [Glossary](#glossary)
- [Comments](#comments)
- [Variables](#variables)
- [Set a variable](#set-a-variable)
- [Use a variable](#use-a-variable)
- [Expressions](#expressions)
- [Primary expressions](#primary-expressions)
- [Operators](#operators)
- [Compute operators](#compute-operators)
- [Boolean operators](#boolean-operators)
- [Print](#print)
- [String formatting](#string-formatting)
- [Loading commands](#loading-commands)
- [Load commands from a text file](#load-commands-from-a-text-file)
- [Commands over multiple lines](#commands-over-multiple-lines)
- [Load template from JSON](#load-template-from-json)
- [Hierarchy commands](#hierarchy-commands)
- [Select an object](#select-an-object)
- [Select child / children object](#select-child--children-object)
- [Select parent object](#select-parent-object)
- [Get object/s](#get-objects)
- [Ls object](#ls-object)
- [Layers](#layers)
- [Room's automatic layers](#rooms-automatic-layers)
- [Rack's automatic layers](#racks-automatic-layers)
- [Device's automatic layers](#devices-automatic-layers)
- [Filters](#filters)
- [Filter by tag](#filter-by-tag)
- [Filter by category](#filter-by-category)
- [Tree](#tree)
- [Delete object](#delete-object)
- [Focus an object](#focus-an-object)
- [Copy object](#copy-object)
- [Link/Unlink object](#linkunlink-object)
- [Create commands](#create-commands)
- [Create a Tenant](#create-a-tenant)
- [Create a Site](#create-a-site)
Expand Down Expand Up @@ -533,6 +457,28 @@ cp [source] [dest]

where `[source]` is the path of the object to be copied (currently only objects in /Logical/Layers are accepted) and `[dest]` is the destination path or slug of the destination layer.

## Link/Unlink object
Unlink an object transforms the object in a stray. In other words, it moves the object from the OGrEE hierarchy (no longer has a parent) and changes its type to stray object.

```
unlink [path/to/object]
```

Link an object reattaches the object to the OGrEE hierarchy, giving it a parent. It is possible to also set or modify attributes of the object by adding one or more `@attributeName=attributeValue` to the command.

```
link [path/to/stray-object]@[path/to/new/parent]
link [path/to/stray-object]@[path/to/new/parent]@attributeName=attributeValue
```

Examples:

```
unlink /Physical/site/bldg/room/rack/device
link /Physical/Stray@/Physical/site/bldg/room/rack
link /Physical/Stray@/Physical/site/bldg/room/rack@slots=[slot1,slot2]@orientation=front
```

# Create commands

## Create a Tenant
Expand Down

0 comments on commit 31659db

Please sign in to comment.