class models.ActResponse

Dictionary class that helps parsing and raising errors on public Actifio API responses.

__init__(*arg, **kwarg)

Raise ACTError if one occurred

parse(k=None, m_k=None, m_v=None, index=0, warnings=True)

Takes appliance api response and returns a desired value or dictionary.

It will first search outside the result for the key. Then it will search inside the result. If only a key is given it will return the value of that key from the desired index (default 0). If given a match_key and match_value it will search for the first matching dictionary inside the result list and return the key from that dictionary.

Index is ignored without warning if match_key and match_value are provided.

It is outside the scope of this method to return multiple dictionaries. Parsing multiple outputs shouldn’t use this method.

  • self – python object response from appliance api (most commonly json decoded from method cmd)
  • k – the key; corresponding value will be returned
  • m_k – match key to find the indexes
  • m_v – match value to find the indexes
  • index – index of the list of dictionaries to return
  • warnings – boolean of whether to raise warning or not

string if key provided; dictionary if key is not provided