Add support to list certificates

Redfish supports listing the certificates present in the
system, catered for the listing certificates.

Tested:
-------OP930-------
bash-4.2$ python openbmctool.py -H $BMC_IP -U bbbb -P ppppp certificate list

Attempting login...
Not supported
User bbbb has been logged out

-------OP940-------
bash-4.2$ python openbmctool.py -H $BMC_IP -U xxxx -P xxxx certificate --help
usage: openbmctool.py certificate [-h] {update,replace,display,list} ...

optional arguments:
  -h, --help            show this help message and exit

subcommands:
  valid certificate commands

  {update,replace,display,list}
                        sub-command help
    update              Update the certificate
    replace             Replace the certificate
    display             Print the certificate
    list                Certificate list
bash-4.2$ python openbmctool.py -H $BMC_IP -U xxxx -P xxxx certificate list
--help
usage: openbmctool.py certificate list [-h]

optional arguments:
  -h, --help  show this help message and exit
bash-4.2$ python openbmctool.py -H $BMC_IP -U xxxx -P xxxx certificate list
Attempting login...
List certificates complete.
{
  "@odata.context":
"/redfish/v1/$metadata#CertificateLocations.CertificateLocations",
  "@odata.id": "/redfish/v1/CertificateService/CertificateLocations",
  "@odata.type": "#CertificateLocations.v1_0_0.CertificateLocations",
  "Description": "Defines a resource that an administrator can use in order to
locate all certificates installed on a given service",
  "Id": "CertificateLocations",
  "Links": {
    "Certificates": [
      {
        "@odata.id":
"/redfish/v1/Managers/bmc/NetworkProtocol/HTTPS/Certificates/1"
      },
      {
        "@odata.id": "/redfish/v1/AccountService/LDAP/Certificates/1"
      },
      {
        "@odata.id": "/redfish/v1/Managers/bmc/Truststore/Certificates/1"
      }
    ],
    "Certificates@odata.count": 3
  },
  "Name": "Certificate Locations"
}
User xxxx has been logged out

Signed-off-by: Marri Devender Rao <devenrao@in.ibm.com>
Change-Id: Ia41370f88bcc170f4d82dc340e6d4a5ea969bd2b
1 file changed
tree: e84a9bfe8d8deb1569ba56e030cb563516dfbb5f
  1. amboar/
  2. edtanous/
  3. emilyshaffer/
  4. feistjj/
  5. geissonator/
  6. hongweiz/
  7. infra/
  8. leiyu/
  9. post-process/
  10. thalerj/
  11. LICENSE
  12. MAINTAINERS
  13. README.md
README.md

The OpenBMC Tools Collection

The goal of this repository is to collect the two-minute hacks you write to automate interactions with OpenBMC systems.

It's highly likely the scripts don't meet your needs - they could be undocumented, dysfunctional or utterly broken. Please help us improve!

Repository Rules

  • Always inspect what you will be executing
  • Some hacking on your part is to be expected

If you're still with us

Then this repository aims to be the default destination for your otherwise un-homed scripts. As such we are setting the bar for submission pretty low, and we aim to make the process as easy as possible.

Catalogue of scripts

Users

Developers

  • netboot: Painless netboot of BMC kernels
  • obmc-gerrit: Automagically add reviewers to changes pushed to Gerrit
  • reboot: Endlessly reboot OpenPOWER hosts
  • tracing: Enable and clean up kernel tracepoints remotely
  • witherspoon-debug: Deploy the debug tools tarball to Witherspoon BMCs

Maintainers

  • cla-signers: Check if a contributor has signed the OpenBMC CLA

Project Administrators

Sending patches

Please use gerrit for all patches to this repository:

Do note that you will need to be party to the OpenBMC CLA before your contributions can be accepted. See Gerrit Setup and CLA for more information.

What we will do once we have your patches

So long as your patches look sane with a cursory glance you can expect them to be applied. We may push back in the event that similar tools already exist or there are egregious issues.

What you must have in your patches

We don't ask for much, but you need to give us at least a Signed-off-by, and put your work under the Apache 2.0 license. Licensing everything under Apache 2.0 will just hurt our heads less. Lets keep the lawyers off our backs. ^

^Any exceptions must be accompanied by a LICENSE file in the relevant subdirectory, and be compatible with Apache 2.0. You thought you would get away without any fine print?

How you consume the repository

There's no standard way to install the scripts housed in the here, so adding parts of the repository to your PATH might be a bit of a dice-roll. We may also move or remove scripts from time to time as part of housekeeping. It's probably best to copy things out if you need stability.