Package: fabrictestbed
FABRIC TESTBED USER LIBRARY AND CLIFabric User CLI for experimentsOverviewThis package supports User facing APIs as well as CLI.Tokens: Token managementSlices: Slice managementSlivers: Sliver managementResources: Resource managementCLI CommandsCommandSubCommandActionInputOutputtokensissueIssue token with projectId and scopeprojectIdProject Id,scopeScopePoints user to Credential Manager to generate the tokenstokenrefreshRefresh tokenprojectIdProject Id,scopeScope,refreshtokenRefresh TokenReturns new identity and refresh tokenstokenrevokeRevoke tokenrefreshtokenRefresh TokenSuccess or Failure statusslicesqueryQuery user slice(s)idtokenIdentity Token,refreshtokenRefresh Token,projectIdProject Id,scopeScope,sliceidSlice IdList of Slices or Graph ML representing slice identified by Slice IdslicescreateCreate user sliceidtokenIdentity Token,refreshtokenRefresh Token,projectIdProject Id,scopeScope,slicenameSlice Name,slicegraphSlice graphList of Slivers created for the SliceslicesdeleteDelete user sliceidtokenIdentity Token,refreshtokenRefresh Token,projectIdProject Id,scopeScope,sliceidSlice IdSuccess or Failure StatussliversqueryQuery user sliver(s)idtokenIdentity Token,refreshtokenRefresh Token,projectIdProject Id,scopeScope,sliceidSlice Id,sliveridSliver IdList of Slivers for the slice identified by Slice Id or Sliver identified by Sliver IdresourcesqueryQuery resourcesidtokenIdentity Token,refreshtokenRefresh Token,projectIdProject Id,scopeScopeGraph ML representing the available resourcesAPISliceManagerclass implements the API supporting the operations listed above. Check example in Usage below.RequirementsPython 3.9+InstallationMultiple installation options possible. For CF development the recommended method is to install from GitHub MASTER branch:$ mkvirtualenv fabrictestbed
$ workon fabrictestbed
$ pip install git+https://github.com/fabric-testbed/fabric-cli.gitFor inclusion in tools, etc, use PyPi$ mkvirtualenv fabrictestbed
$ workon fabrictestbed
$ pip install fabrictestbedPre-requisites for the install example aboveEnsure that following are installedvirtualenvvirtualenvwrapperNOTE: Any of the virtual environment tools (venv,virtualenv, orvirtualenvwrapper) should work.Usage (API)User API supports token and orchestrator commands. Please refer to Jupyter Notebooksherefor examples.Usage (CLI)ConfigurationUser CLI expects the user to set following environment variables:export FABRIC_ORCHESTRATOR_HOST=orchestrator.fabric-testbed.net
export FABRIC_CREDMGR_HOST=cm.fabric-testbed.net
export FABRIC_TOKEN_LOCATION=<location of the token file downloaded from the Portal>
export FABRIC_PROJECT_ID=<Project Id of the project for which resources are being provisioned>Alternatively, user can pass these as parameters to the commands.To enable CLI auto-completion, add following line to your ~/.bashrceval "$(_FABRIC_CLI_COMPLETE=source_bash fabric-cli)"Open a new shell to enable completion.
Or run the eval command directly in your current shell to enable it temporarily.User CLI supports token and orchestrator commands:(usercli) $ fabric-cli
Usage: fabric-cli [OPTIONS] COMMAND [ARGS]...

Options:
  -v, --verbose
  --help         Show this message and exit.

Commands:
  resources  Resource management (set $FABRIC_ORCHESTRATOR_HOST to the...
  slices     Slice management (set $FABRIC_ORCHESTRATOR_HOST to the...
  slivers    Sliver management (set $FABRIC_ORCHESTRATOR_HOST to the...
  tokens     Token management (set $FABRIC_CREDMGR_HOST to the Credential...Token Management CommandsList of the token commands supported can be found below:(usercli) $ fabric-cli tokens
Usage: fabric-cli tokens [OPTIONS] COMMAND [ARGS]...

  Token management (set $FABRIC_CREDMGR_HOST to the Credential Manager
  Server)

Options:
  --help  Show this message and exit.

Commands:
  issue    Issue token with projectId and scope
  refresh  Refresh token
  revoke   Revoke tokenResource Management CommandsList of the resource commands supported can be found below:$ fabric-cli resources
Usage: fabric-cli resources [OPTIONS] COMMAND [ARGS]...

  Query Resources (set $FABRIC_ORCHESTRATOR_HOST to the Control Framework
  Orchestrator)

Options:
  --help  Show this message and exit.

Commands:
  query  issue token with projectId and scopeSlice Management Commands(usercli) $ fabric-cli slices
Usage: fabric-cli slices [OPTIONS] COMMAND [ARGS]...

  Slice management (set $FABRIC_ORCHESTRATOR_HOST to the Orchestrator)

Options:
  --help  Show this message and exit.

Commands:
  create  Create user slice
  delete  Delete user slice
  query   Query user slice(s)Sliver Management Commands(usercli) $ fabric-cli slivers
Usage: fabric-cli slivers [OPTIONS] COMMAND [ARGS]...

  Sliver management (set $FABRIC_ORCHESTRATOR_HOST to the Orchestrator)

Options:
  --help  Show this message and exit.

Commands:
  query  Query user slice sliver(s)