Exemplo n.º 1
0
    def find_device_by_mac(mac_address, return_raw=False, **kwargs):
        g = GroupAccessDeviceGetListRequest(mac_address=mac_address, **kwargs)
        xml = g.post()

        if return_raw:
            return xml

        # convert results to dict
        if type(xml) is str:
            xml = ET.fromstring(xml)
        table = xml.findall('./command/accessDeviceTable')[0]
        return BroadsoftRequest.convert_results_table(xml=table)
Exemplo n.º 2
0
 def get_devices(sip_user_id=None, **kwargs):
     u = UserSharedCallAppearanceGetRequest(sip_user_id=sip_user_id,
                                            **kwargs)
     xml = u.post()
     return BroadsoftRequest.convert_results_table(xml=xml)
Exemplo n.º 3
0
 def list_devices(**kwargs):
     from broadsoft.requestobjects.lib.BroadsoftRequest import BroadsoftRequest
     g = GroupAccessDeviceGetListRequest(**kwargs)
     xml = g.post()
     return BroadsoftRequest.convert_results_table(xml=xml)
Exemplo n.º 4
0
 def list_users(**kwargs):
     g = UserGetListInGroupRequest(**kwargs)
     xml = g.post()
     return BroadsoftRequest.convert_results_table(xml=xml)