Module pyinventory.client
Classes
class SymphonyClient (email: str, password: str, tenant: str = 'fb-test', is_local_host: bool = False, is_dev_mode: bool = False, reporter: gql.gql.reporter.Reporter = <gql.gql.reporter.DummyReporter object>)
-
This is the class to use for working with symphony server.
The init method uses the credentials to establish session with the inventory website. It also consumes graphql schema for validations, and validates the client version is compatible with server.
Args
email
:str
- The email of the user to connect with.
password
:str
- The password of the user to connect with.
tenant
:str
, optional- The tenant to connect to - should be the beginning of "{}.purpleheadband.cloud" The default is "fb-test" for QA environment
is_local_host
:bool
, optional- Used for developers to connect to local inventory. This changes the address and also disable verification of ssl certificate
is_dev_mode
:bool
, optional- Used for developers to connect to local inventory from a container. This changes the address and also disable verification of ssl certificate
reporter
:object
, optional- Use reporter.InventoryReporter to store reports on all successful and failed mutations in inventory. The default is DummyReporter that discards reports
Ancestors
- gql.gql.graphql_client.GraphqlClient
Subclasses
Class variables
var equipmentTypes : Dict[str, EquipmentType]
var locationTypes : Dict[str, LocationType]
var portTypes : Dict[str, EquipmentPortType]
var serviceTypes : Dict[str, ServiceType]
Methods
def delete_file(self, key: str, is_global: bool) -> NoneType
def post(self, url: str, json: Union[Dict[str, Any], NoneType] = None) -> requests.models.Response
def put(self, url: str, json: Union[Dict[str, Any], NoneType] = None) -> requests.models.Response
def store_file(self, file_path: str, file_type: str, is_global: bool) -> str