Skip to content

Commit 3f781cc

Browse files
committed
docs: Remove references to novaclient
Change-Id: Ieb1dc77f311a2e279036587a1f8d575a387494d0 Signed-off-by: Stephen Finucane <stephenfin@redhat.com>
1 parent 0f00639 commit 3f781cc

1 file changed

Lines changed: 6 additions & 5 deletions

File tree

doc/source/contributor/command-errors.rst

Lines changed: 6 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -29,8 +29,9 @@ Example
2929

3030
This example is taken from ``keypair create`` where the ``--public-key`` option
3131
specifies a file containing the public key to upload. If the file is not found,
32-
the IOError exception is trapped and a more specific CommandError exception is
33-
raised that includes the name of the file that was attempted to be opened.
32+
the ``IOError`` exception is trapped and a more specific ``CommandError``
33+
exception is raised that includes the name of the file that was attempted to be
34+
opened.
3435

3536
.. code-block:: python
3637
@@ -40,7 +41,7 @@ raised that includes the name of the file that was attempted to be opened.
4041
## ...
4142
4243
def take_action(self, parsed_args):
43-
compute_client = self.app.client_manager.compute
44+
compute_client = self.app.client_manager.sdk_connection.compute
4445
4546
public_key = parsed_args.public_key
4647
if public_key:
@@ -56,8 +57,8 @@ raised that includes the name of the file that was attempted to be opened.
5657
msg % (parsed_args.public_key, e),
5758
)
5859
59-
keypair = compute_client.keypairs.create(
60-
parsed_args.name,
60+
keypair = compute_client.create_keypair(
61+
name=parsed_args.name,
6162
public_key=public_key,
6263
)
6364

0 commit comments

Comments
 (0)