{
"info": {
"author": "Samuel Riolo",
"author_email": "samuel.riolo@biel-bienne.ch",
"bugtrack_url": null,
"classifiers": [
"Development Status :: 4 - Beta",
"License :: OSI Approved :: Zope Public License",
"Natural Language :: English",
"Operating System :: OS Independent",
"Programming Language :: Python :: 3 :: Only"
],
"description": ".. contents::\n\nWhat is pyaxl\n=============\n\npyaxl is a **Python 3** library accessing the Cisco Callmanger over the AXL interface. This library was build\ninspired by `the work of Sebastian Kratzert `_ and works as a\nsecond layer over SUDS, which contains further improvements by `jurko `_.\nWe use `SoupUI `_ and recommend it if you want to work with this library, as it helps\nanalizing and understanding how the WSDL from Cisco Callmanager is composed.\n\npyaxl is licensed under the ZPL 2.1, see LICENSE.txt for details. \n\n\nImport WSDL\n-----------\nThe WSDL files are not included with this library due to licenses terms. pyaxl provides\na script to import it and then build a cache directly into the library.\n\nFirst of all you need to download the WSDL files. The AXL WSDL is included in the AXL SQL Toolkit download,\nwhich is available in Cisco Unified CM. Follow these steps to download the AXL SQL Toolkit from your Cisco\nUnified CM server:\n\n1. Log into the Cisco Unified CM Administration application.\n2. Go to Application | Plugins\n3. Click on the Download link by the Cisco CallManager AXL SQL Toolkit Plugin.\n\nThe axlsqltoolkit.zip file contains the complete schema definition for different versions of Cisco Unified CM.\n\nThe important files for each version are:\n * AXLAPI.wsdl\n * AXLEnums.xsd\n * axlmessage.xsd\n * axlsoap.xsd\n * axl.xsd\n\nNote: all files must be in the same directory and have the same name as the version you want use.\n\n.. code-block:: bash\n\n $ ./pyaxl_import_wsdl -p path_to_wsdl/10.5/AXLAPI.wsdl\n\nHint: We put all these file in the buildout directory. While buildout is running, the WSDL files are imported automatically.\n\n.. code-block:: ini\n\n [buildout]\n parts =\n pyaxl_import\n pyaxl_import_exec\n \n [pyaxl_import]\n recipe = zc.recipe.egg:scripts\n eggs = pyaxl\n scripts=pyaxl_import_wsdl=import_wsdl\n \n [pyaxl_import_exec]\n recipe = collective.recipe.cmd\n on_install=true\n on_update=true\n cmds = ${buildout:directory}/bin/import_wsdl -p ${buildout:directory}/wsdl/10.5/AXLAPI.wsdl\n\n\nConfiguration\n-------------\n\n>>> import pyaxl\n>>> from pyaxl import ccm\n>>> from pyaxl.testing import validate\n>>> from pyaxl.testing.transport import TestingTransport\n\nFor these tests we use a fake transport layer. For this we must tell which xml\nthe transporter should use for the response.\n\n>>> transport = TestingTransport()\n>>> transport.define('10.5_user_riols')\n>>> transport_testing = TestingTransport()\n>>> transport_testing.define('8.0_user_riols')\n\n>>> settings = pyaxl.AXLClientSettings(host='https://callmanger.fake:8443',\n... user='super-admin',\n... passwd='nobody knows',\n... path='/axl/',\n... version='10.5',\n... suds_config=dict(transport=transport))\n>>> pyaxl.registry.register(settings)\n\npyaxl supports multiple settings. To use that, pass the configuration name as\nsecond attribute in the register method.\n\n>>> settings_testing = pyaxl.AXLClientSettings(host='https://callmanger-testing.fake:8443',\n... user='super-admin',\n... passwd='nobody knows',\n... path='/axl/',\n... version='8.0',\n... suds_config=dict(transport=transport_testing))\n>>> pyaxl.registry.register(settings_testing, 'testing')\n\nif you want to use a custom configuration, you also need to pass\nit when you are getting the object:\n\n>>> user = ccm.User('riols', configname='testing')\n\nif you don't need multiple settings, you can just use the default.\n\n>>> user = ccm.User('riols')\n\nDon't forget to build the cache for the defined configuration name:\n\n.. code-block:: bash\n\n $ ./pyaxl_import_wsdl -p -c testing path_to_wsdl/10.5/AXLAPI.wsdl\n\n\nWorking with pyaxl\n------------------\n\nGet all information for a specific user.\n~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~\n\n>>> transport.define('10.5_user_riols')\n>>> user1 = ccm.User('riols')\n\n>>> validate.printSOAPRequest(transport.lastrequest())\ngetUser:\n userid=riols\n\n>>> user1.firstName\nSamuel\n>>> user1.lastName\nRiolo\n\n\nGet the same user with his UUID.\n~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~\n\n>>> transport.define('10.5_user_riols')\n>>> user2 = ccm.User(uuid='{5B5C014F-63A8-412F-B793-782BDA987371}')\n>>> user1._uuid == user2._uuid\nTrue\n\n\nSearch and list information\n~~~~~~~~~~~~~~~~~~~~~~~~~~~\n\n>>> transport.define('10.5_user_armstrong')\n>>> users = ccm.User.list(dict(lastName='Armstrong'), ('firstName', 'lastName'))\n>>> validate.printSOAPRequest(transport.lastrequest())\nlistUser:\n searchCriteria:\n lastName=Armstrong\n returnedTags:\n firstName=True\n lastName=True\n\n>>> list(users)\n[(Lance, Armstrong), (Neil, Armstrong)]\n\n\nSearch and fetch information as objects\n~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~\n\n>>> transport.define('10.5_user_riols')\n>>> users = ccm.User.list_obj(dict(lastName='Riolo', firstName='Samuel'))\n>>> for user in users:\n... print(user.firstName, user.lastName)\nSamuel Riolo\n\n\nReload an object\n~~~~~~~~~~~~~~~~\n\n>>> transport.define('10.5_user_riols')\n>>> user = ccm.User('riols')\n>>> user.firstName = 'Yuri'\n>>> user.lastName = 'Gagarin'\n>>> print(user.firstName, user.lastName)\nYuri Gagarin\n>>> user.reload()\nTraceback (most recent call last):\n ...\npyaxl.exceptions.ReloadException: Error because some field are already changed by the client. Use force or update it first.\n>>> user.reload(force=True)\n>>> print(user.firstName, user.lastName)\nSamuel Riolo\n\n\nUpdate an object\n~~~~~~~~~~~~~~~~\n\n>>> transport.define('10.5_user_riols')\n>>> user = ccm.User('riols')\n>>> user.firstName = 'Claude'\n>>> user.lastName = 'Nicollier'\n>>> user.update()\n>>> validate.printSOAPRequest(transport.lastrequest())\nupdateUser:\n uuid={5B5C014F-63A8-412F-B793-782BDA987371}\n firstName=Claude\n lastName=Nicollier\n\n\nRemove an object\n~~~~~~~~~~~~~~~~\n\n>>> transport.define('10.5_user_riols')\n>>> user = ccm.User('riols')\n>>> user.remove()\n>>> validate.printSOAPRequest(transport.lastrequest())\nremoveUser:\n uuid={5B5C014F-63A8-412F-B793-782BDA987371}\n\n\nCreate a new object\n~~~~~~~~~~~~~~~~~~~\n\n>>> transport.define('10.5_user_riols')\n>>> user = ccm.User()\n>>> user.lastName = 'Edison'\n>>> user.firstName = 'Thomas'\n>>> user.userid = 'tedison'\n>>> user.presenceGroupName = 'SC Presence Group'\n>>> user.ipccExtension = None\n>>> user.ldapDirectoryName = None\n>>> user.userProfile = None\n>>> user.serviceProfile = None\n>>> user.primaryDevice = None\n>>> user.pinCredentials = None\n>>> user.passwordCredentials = None\n>>> user.subscribeCallingSearchSpaceName = None\n>>> user.defaultProfile = None\n>>> user.convertUserAccount = None\n\n>>> user.update()\nTraceback (most recent call last):\n ...\npyaxl.exceptions.UpdateException: you must create a object with \"create\" before update\n\n>>> user.create()\n{12345678-1234-1234-1234-123123456789}\n>>> validate.printSOAPRequest(transport.lastrequest())\naddUser:\n user:\n firstName=Thomas\n lastName=Edison\n userid=tedison\n presenceGroupName=SC Presence Group\n\n\nIf you try to create a user twice, an Exception of the type CreationException is thrown:\n\n>>> user.create()\nTraceback (most recent call last):\n ...\npyaxl.exceptions.CreationException: this object are already attached\n\n\nClone an object\n~~~~~~~~~~~~~~~\n\n>>> transport.define('10.5_user_riols')\n>>> user = ccm.User('riols')\n>>> clone = user.clone()\n>>> clone.userid = 'riols2'\n>>> clone.update()\nTraceback (most recent call last):\n ...\npyaxl.exceptions.UpdateException: you must create a object with \"create\" before update\n>>> clone.create()\n{12345678-1234-1234-1234-123123456789}\n\n\nRunning the doc tests\n---------------------\n\n.. code-block:: bash\n\n $ tox -- \n\n\nAbout us\n========\nWe are the IT Services of Biel/Bienne, Switzerland.\nhttp://foss.biel-bienne.ch/blog/\n\n\n\n\n\nChangelog\n=========\n\n1.1 (2016-11-25)\n================\n\n- adding windows support\n\n1.0.1 (2015-08-03)\n------------------\n\n- adding pgp signature\n\n\n1.0 (2015-08-03)\n----------------\n\n- Initial [codeix]",
"description_content_type": null,
"docs_url": null,
"download_url": "",
"downloads": {
"last_day": -1,
"last_month": -1,
"last_week": -1
},
"home_page": "https://github.com/bielbienne/pyaxl",
"keywords": "bielbienne cisco callmanger axl soap",
"license": "ZPL 2.1",
"maintainer": "",
"maintainer_email": "",
"name": "pyaxl",
"package_url": "https://pypi.org/project/pyaxl/",
"platform": "",
"project_url": "https://pypi.org/project/pyaxl/",
"project_urls": {
"Homepage": "https://github.com/bielbienne/pyaxl"
},
"release_url": "https://pypi.org/project/pyaxl/1.1/",
"requires_dist": null,
"requires_python": "",
"summary": "pyaxl is a python library accessing the Cisco Callmanger over the AXL interface",
"version": "1.1"
},
"last_serial": 2483252,
"releases": {
"1.0": [
{
"comment_text": "",
"digests": {
"md5": "17e13c56789079c92b24c06778826075",
"sha256": "2e567a95042e02556efd57286bb03193606598c44f576dc86ca1eac2c5cc8174"
},
"downloads": -1,
"filename": "pyaxl-1.0.tar.gz",
"has_sig": false,
"md5_digest": "17e13c56789079c92b24c06778826075",
"packagetype": "sdist",
"python_version": "source",
"requires_python": null,
"size": 19976,
"upload_time": "2015-08-03T16:08:24",
"url": "https://files.pythonhosted.org/packages/e2/26/dbd37f9df8d781523f94ab4a354a3402b0b79a715b49ce286b6a56364f4d/pyaxl-1.0.tar.gz"
}
],
"1.0.1": [
{
"comment_text": "",
"digests": {
"md5": "b83d8c5784d6552cd46a04676f7e97a9",
"sha256": "b6674993e86cb142120008a55a84f317bafb2952701b372717a4f388b9f3603c"
},
"downloads": -1,
"filename": "pyaxl-1.0.1.tar.gz",
"has_sig": true,
"md5_digest": "b83d8c5784d6552cd46a04676f7e97a9",
"packagetype": "sdist",
"python_version": "source",
"requires_python": null,
"size": 20153,
"upload_time": "2015-08-03T17:56:52",
"url": "https://files.pythonhosted.org/packages/08/c4/69fdaef1bc1bf6360c31810a4980c6c6fdd6577b3fd58227901e0c10ac7b/pyaxl-1.0.1.tar.gz"
}
],
"1.1": [
{
"comment_text": "",
"digests": {
"md5": "c3c9f86c8974b8c38db4347379a5209c",
"sha256": "e210580cead665d4d7023d2eac65db212b8617e5fc64ddfdcf8f9ff6fa926465"
},
"downloads": -1,
"filename": "pyaxl-1.1.tar.gz",
"has_sig": false,
"md5_digest": "c3c9f86c8974b8c38db4347379a5209c",
"packagetype": "sdist",
"python_version": "source",
"requires_python": null,
"size": 20159,
"upload_time": "2016-11-25T21:25:52",
"url": "https://files.pythonhosted.org/packages/8e/e0/90c8778a59f4ee82d7324a090e0dcb234daa7ef134b140fe2e7b396d1d86/pyaxl-1.1.tar.gz"
}
]
},
"urls": [
{
"comment_text": "",
"digests": {
"md5": "c3c9f86c8974b8c38db4347379a5209c",
"sha256": "e210580cead665d4d7023d2eac65db212b8617e5fc64ddfdcf8f9ff6fa926465"
},
"downloads": -1,
"filename": "pyaxl-1.1.tar.gz",
"has_sig": false,
"md5_digest": "c3c9f86c8974b8c38db4347379a5209c",
"packagetype": "sdist",
"python_version": "source",
"requires_python": null,
"size": 20159,
"upload_time": "2016-11-25T21:25:52",
"url": "https://files.pythonhosted.org/packages/8e/e0/90c8778a59f4ee82d7324a090e0dcb234daa7ef134b140fe2e7b396d1d86/pyaxl-1.1.tar.gz"
}
]
}