<commit_before>.. _verify:

Verify operation
~~~~~~~~~~~~~~~~

Verify operation of the Key Manager (barbican) service.

.. note::

   Perform these commands on the controller node.

#. Source the ``admin`` credentials to be able to perform Barbican
   API calls:

   .. code-block:: console

      $ . admin-openrc

#. Use the OpenStack CLI to store a secret:

   .. code-block:: console

      $ openstack secret store --name mysecret --payload j4=]d21
      +---------------+-----------------------------------------------------------------------+
      | Field         | Value                                                                 |
      +---------------+-----------------------------------------------------------------------+
      | Secret href   | http://10.0.2.15:9311/v1/secrets/655d7d30-c11a-49d9-a0f1-34cdf53a36fa |
      | Name          | mysecret                                                              |
      | Created       | None                                                                  |
      | Status        | None                                                                  |
      | Content types | None                                                                  |
      | Algorithm     | aes                                                                   |
      | Bit length    | 256                                                                   |<commit_msg>[DOC] Install client package before verification<commit_after>.. _verify:

Verify operation
~~~~~~~~~~~~~~~~

Verify operation of the Key Manager (barbican) service.

.. note::

   Perform these commands on the controller node.

#. Install python-barbicanclient package:

   * For openSUSE and SUSE Linux Enterprise:

     .. code-block:: console

        $ zypper install python-barbicanclient

   * For Red Hat Enterprise Linux and CentOS:

     .. code-block:: console

        $ yum install python-barbicanclient

   * For Ubuntu:

     .. code-block:: console

        $ apt-get install python-barbicanclient

#. Source the ``admin`` credentials to be able to perform Barbican
   API calls:

   .. code-block:: console

      $ . admin-openrc

#. Use the OpenStack CLI to store a secret:

   .. code-block:: console

      $ openstack secret store --name mysecret --payload j4=]d21
      +---------------+-----------------------------------------------------------------------+
      | Field         | Value                                                                 |
      +---------------+-----------------------------------------------------------------------+
      | Secret href   | http://10.0.2.15:9311/v1/secrets/655d7d30-c11a-49d9-a0f1-34cdf53a36fa |
      | Name          | mysecret                                                              |
      | Created       | None                                                                  |
      | Status        | None                                                                  |
      | Content types | None                                                                  |
      | Algorithm     | aes                                                                   |
      | Bit length    | 256                                                                   |
{'fraction_non_alphanumeric': 0.17915010700091716, 'fraction_numerical': 0.022011617242433508, 'mean_word_length': 0.7130890052356021, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 2, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 33, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '4201355', 'n_tokens_mistral': 681, 'n_tokens_neox': 607, 'n_words': 180}