File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -44,9 +44,29 @@ import kowabunga
4444
4545## Usage
4646
47- Creating an API client can be done by:
47+ Creating an API client and listing all Kompute instances can be done by:
4848
4949``` python
50+
51+ import kowabunga
52+ from kowabunga.rest import ApiException
53+ from pprint import pprint
54+
55+ cfg = kowabunga.Configuration(
56+ host = " https://your_kowabunga_kahuna_server/api/v1"
57+ )
58+
59+ cfg.api_key[' ApiKeyAuth' ] = os.environ[" API_KEY" ]
60+
61+ with kowabunga.ApiClient(cfg) as client:
62+ kompute = kowabunga.KomputeApi(client)
63+
64+ try :
65+ for k in kompute.list_komputes():
66+ pprint(kompute.read_kompute(k))
67+ except ApiException as e:
68+ print (" Exception when calling KomputeApi->list_komputes: %s \n " % e)
69+
5070```
5171
5272where ** uri** is * https://your\_kowabunga\_kahuna\_server * and ** token** is the associated API key.
You can’t perform that action at this time.
0 commit comments