Skip to main content

repo command

Use the repo command to initialize the update repository, automatically remove the unused files, add, remove, or list the packages in the update repository.

repo command syntax

Syntax 1:

Usage: ./OneCli update repo init < --registry <arg>> [--mt <arg>]
[--ostype|-t <arg>] [--scope|-s <arg>]
[--type|-T <arg>] [--src-dir <arg>]
[--quiet|-q] [--output|-o <arg>]
[--nolog] [--config <arg>]
[--help|-h]

Syntax 2:

Usage: ./OneCli update repo add <--registry <arg>> [--mt <arg>]
[--ostype|-t <arg>] [--scope|-s <arg>]
[--type|-T <arg>] [--src-dir <arg>]
[--quiet|-q] [--output|-o <arg>]
[--nolog] [--config <arg>]
[--help|-h]

Syntax 3:

Usage: ./OneCli update repo remove <--registry <arg>> [--fixid <arg>]
[--quiet|-q] [--output|-o <arg>]
[--nolog] [--config <arg>]
[--help|-h]

Syntax 4:

Usage: ./OneCli update repo autoremove <--registry <arg>> [--quiet|-q]
[--output|-o <arg>] [--nolog]
[--config <arg>] [--help|-h]

Syntax 5:

Usage: ./OneCli update repo list <--registry <arg>> [--mt <arg>]
[--ostype|-t <arg>] [--output|-o <arg>]
[--nolog] [--config <arg>]
[--help|-h]
Table 1. repo command specific parameters
ParameterRequired/OptionalNotes
--fixidOptionalThe packages ID to be removed from the repository.
--mtOptionalSpecify the four-character machine type of the target device (BMC or CMM). For example, 5465, 7x03.
--ostypeOptionalSpecify the operating system to list packages.
--registryRequired

Update the repository address. The address can be a local folder or a https / sftp directory path.

For example:/path/to/reposigory<sftp|https>://[userid:password@]host[:port][/path]

When use the http / https server, users should open http GET / PUT / DELETE / MKCOL methods.

--scopeOptionalSpecify the update scope. The valid choices include: uxsp, latest.
--src-dirOptionalSpecify the directory for the source packages.
--typeOptionalSpecify the type of package or component to be downloaded, scanned, compared, or flashed.
  • --quiet

Optional

Refer to Table 2.

Example of the repo command

  • Initialize a firmware-only repository for the 7x01 server and upload the firmware to https server:

    ./OneCli update repo init --registry https://ip:port/path --mt 7x01 --ostype platform
  • List the packages in repository:

    ./OneCli update repo list --registry https://ip:port/path
  • List the packages from repository and filter the packages by machine type:

    ./OneCli update repo list --registry https://ip:port/path --mt 7x01
  • Remove a package from repository:

    ./OneCli update repo remove --registry https://ip:port/path--fixid package_id
  • Add the packages for the specified machine type and OS type to the existing repository:

    ./OneCli update repo add --registry https://ip:port/path --mt 7z70 --ostype rhel8
  • Add the packages in local folder to the existing repository:

    ./OneCli update repo add --registry https://ip:port/path --src-dir /path/to/local/packages