show sandbox-structure example

show sandbox-structure example

Examples

You can load a workspace in several ways. Projects can be loaded in a component root folder or into a deeply nested directory in a sandbox. Running the status subcommand shows what components have been loaded but the command does not show where the components are loaded in the sandbox. The sandbox-structure command provides the location of the loaded projects in the sandbox. Output of the command shows the sandbox location, local path and remote path of a project in the file system.

The following example describes a scenario where a project in a component is loaded in the sandbox root. proj1 is loaded from workspace ws1, component comp1 in root directory sb.

lscm show sandbox-structure

Sandbox: C:\cli\sb  
  Local: C:\cli\sb\proj1    
   Remote: ws1/comp1/proj1/

The following example describes a scenario where a project is loaded in a nested directory of the sandbox root. proj2 is loaded from workspace ws1, component comp2 in nested directory child.

lscm show sandbox-structure
Sandbox: C:\cli\sb  
  Local: C:\cli\sb\proj1    
   Remote: ws1/comp1/proj1/  
  Local: C:\cli\sb\root\parent\child\proj2    
   Remote: ws1/comp2/proj2/

The following example describes a scenario where a project is renamed while loading. proj3 is loaded from workspace ws2, component comp1 in sandbox root directory with an alternative name as proj3_renamed.

lscm show sandbox-structure
Sandbox: C:\cli\sb  
  Local: C:\cli\sb\proj1    
   Remote: ws1/comp1/proj1/  
  Local: C:\cli\sb\root\parent\child\proj2    
   Remote: ws1/comp2/proj2/  
  Local: C:\cli\sb\proj3_renamed    
   Remote: ws2/comp1/proj3/

The following example shows the sandbox structure for workspace ws2.

lscm show sandbox-structure -w ws2
Sandbox: C:\cli\sb  
  Local: C:\cli\sb\proj3_renamed  
   Remote: ws2/comp2/proj3/

The following example shows the sandbox structure for components named comp1.

lscm show sandbox-structure -C comp1
Sandbox: C:\cli\sb  
  Local: C:\cli\sb\proj1    
   Remote: ws1/comp1/proj1/  
  Local: C:\cli\sb\proj3_renamed    
   Remote: ws2/comp1/proj3/

The following example shows the sandbox structure for components named comp1 in workspace ws1.

lscm show sandbox-structure -C comp1 -w ws1
Sandbox: C:\cli\sb  
  Local: C:\cli\sb\proj1    
   Remote: ws1/comp1/proj1/

The following example shows JSON output of a sandbox structure for components named comp1 in workspace ws1.

lscm show sb -j
{
    "sandbox": "C:\\cli\\sb",
    "shares": [
        {
            "local": "C:\\cli\\sb\\proj1",
            "remote": {
                "component": {
                    "name": "comp1",
                    "uuid": "_3tg4cdVqEeWM5MAhdFokDA"
                },
                "path": {
                    "path": "proj1\/",
                    "type": "folder",
                    "uuid": "_6COtENVqEeWXheu9mSQ0Ag"
                },
                "workspace": {
                    "name": "ws1",
                    "uuid": "_U6NRkNVqEeWM5MAhdFokDA"
                }
            }
        }
    ]
}