Skip to content

pensando/pypi

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

81 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

AMD Pensando PSM Python Bindings

This repo contains the python language bindings for the REST APIs exposed by AMD Pensando Policy and Services Manager (PSM). Client bindings differ and thus reflect the functions in various PSM distributions:

Getting started

  1. Requirements
Python >= 3.6
  1. Use pip to install the desired distribution
pip install pensando-cloud
  1. import the cloud APIs and start fetching the objects
import os
from pensando_dss.psm.apis import ClusterV1Api
from pensando_dss.psm import configuration, api_client
from pprint import pprint

import warnings
warnings.simplefilter("ignore")

configuration = configuration.Configuration(
    psm_config_path = os.environ['HOME'] + "/.psm/config.json",
    interactive_mode = True
)
configuration.verify_ssl = False

client = api_client.ApiClient(configuration)
api_instance = ClusterV1Api(client)
response = api_instance.get_cluster()
pprint (response)
[...]

More apps here using python apis.

Learn more about PSM API

  • Concepts: API structure or in PSM installation at https://<PSM IP Address>/docs
  • PSM API specification: Swagger schema at https://<PSM IP Address>/generated/swaggeruri.html
  • PSM GUI Admin menu, allows Enable Live Capture to see the the APIs used when an operation is performed in PSM GUI

Contributing

The AMD Pensando Python SDK is auto generated from the PSM swagger spec. Please do not fork/modify any code in this repository, instead head over to https://github.com/pensando/psm-tools to generate the appropriate code.

Issues

Please submit an issue at https://github.com/pensando/psm-tools/issues if you find a bug or want to request an enhancement.

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Packages

No packages published

Contributors 4

  •  
  •  
  •  
  •  

Languages