File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -29,8 +29,9 @@ Example
2929
3030This example is taken from ``keypair create `` where the ``--public-key `` option
3131specifies 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
You can’t perform that action at this time.
0 commit comments