summaryrefslogtreecommitdiff
path: root/pycadf
Commit message (Collapse)AuthorAgeFilesLines
...
* Enabled hacking checks H305 and H307Christian Berendt2014-07-175-4/+5
| | | | | | | * H305 imports not grouped correctly * H307 like imports should be grouped together Change-Id: Ied0e83b9b37dcb7a7a60a653093c3fa0d8e56226
* Merge "Expand © and remove unnecessary encoding lines"Jenkins2014-06-1922-26/+4
|\
| * Expand © and remove unnecessary encoding linesMartin Geisler2014-06-1522-26/+4
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The word "Copyright" alone is sufficient to claim copyright, the © symbol need not be present.[1] This allows us to expand the "©" symbol into "(c)" to avoid introducing non-ASCII characters. As per PEP 263, a Python file with non-ASCII characters must have a line with "coding: <some-encoding>". Python files containing only 7-bit ASCII characters need no such line.[2] This commit expands the non-ASCII Unicode copyright symbols and removes the now unnecessary encoding lines. [1]: http://www.copyright.gov/circs/circ03.pdf [2]: http://legacy.python.org/dev/peps/pep-0263/ Change-Id: Ibbb282224bccbea383947b4e09a619f94d5c24b1
* | add audit_maps for more OpenStack componentsGordon Chung2014-06-053-21/+26
|/ | | | | | | | | | add audit_maps for: - cinder - glance - neutron Change-Id: If324c1296f852e57f3a376ccfc485ed1b3df75e3 Blueprint: audit-all-apis
* Merge "sync oslo"0.5.1Jenkins2014-05-2311-203/+376
|\
| * sync osloGordon Chung2014-05-2211-203/+376
| | | | | | | | | | | | sync to Ia1bfa1bd24989681db1d2f385defc12e69a01f8d Change-Id: Idbbbb9fcec8e8b0d1930956850b1a7371081b632
* | remove token from notifier middlewareGordon Chung2014-05-221-1/+1
|/ | | | | | | | notifier middleware is capturing token and sending it to MQ. this is not advisable so we should filter it out. Change-Id: I11d9f2f23fc3b60c945c33d4d02bd7640d88a083 Closes-Bug: #1321080
* add docstrings to functionsGordon Chung2014-03-1016-4/+155
| | | | | | | add docstrings to functions Change-Id: I112e297d20de5026784298e93b6ff05733639a1c Implements: blueprint document-pycadf
* catch empty json body0.4.1Gordon Chung2014-02-212-4/+19
| | | | | | add a catch for when json body is empty on action event. Change-Id: I25ae76162ace25bac700bbfb39fa1af83427f629
* add constant for security service0.4Gordon Chung2014-02-201-1/+2
| | | | | | add constant variable for resource 'service/security' Change-Id: I29a47920a6718a6695a9ca2187fcbe92bcf46ac9
* audit middleware in pycadfGordon Chung2014-02-209-32/+439
| | | | | | | | move audit middleware to pyCADF and allow it to support oslo.messaging instead of openstack.common.notifier Partial-Bug: #1280327 Change-Id: I7f0b706a91a61111147bc2b3c682dfdac01c0b7d
* oslo common code sync and requirements cleanupGordon Chung2014-02-2015-0/+1688
| | | | | | | clean up requirements and pull in oslo code required for audit middleware Change-Id: Ia9c5bb9b6468e9d859d6b1f5a88798e72b3dc8ae
* update build_typeURI to drop query stringGordon Chung2014-02-031-2/+2
| | | | | | | capture query string in requestPath attribute. use path sans query string to build typeURI Change-Id: Ia4ad4ada6172ad56d2f17665942fb7a767f97c3e
* Merge "mask token values"Jenkins2014-02-035-5/+66
|\
| * mask token valuesGordon Chung2014-02-035-5/+66
| | | | | | | | | | | | | | | | scramble a percentage of leading and trailing characters for a provided value to avoid security issues. Change-Id: I544e57be1b554a4fd92b634a57ae0ca63a2e7d09 Closes-Bug: #1262393
* | sync common code and requirementsGordon Chung2014-02-034-467/+274
| | | | | | | | | | | | sync up common code from oslo and requirements Change-Id: I3b7842e58ad12fe46cc6ac10ff7a0482be3a85ea
* | add path to eventGordon Chung2014-02-032-0/+2
| | | | | | | | | | | | | | add REST request URL path to event Change-Id: Iac825b43c8a61abfdbfaf98c23aff66f7ece0e27 Closes-Bug: #1267500
* | adjust typeURI to capture target betterGordon Chung2014-02-033-85/+177
|/ | | | | | | | | | update to fix nova audits. - change typeURI to record greater depth of api request. - add custom_actions to allow special case actions based on api path Change-Id: I2b33cf8cff796bdb135dd832c23f0e2ffdf90780 blueprint: audit-all-apis
* Python3: do not index a dict_keys object0.3Cyril Roelandt2014-01-091-1/+1
| | | | | | | | This avoids getting this error: TypeError: 'dict_keys' object does not support indexing Change-Id: I662d9e0206e7346069e30fa14182886e8865a61e
* Merge "Python3: use six.moves.urllib.parse instead of urlparse"Jenkins2014-01-081-1/+1
|\
| * Python3: use six.moves.urllib.parse instead of urlparseCyril Roelandt2014-01-071-1/+1
| | | | | | | | | | | | This makes the code compatible with both Python 2 and 3. Change-Id: Idd71d2041eea6de71209535e4aa4d3d43256c836
* | Python 3: the request body should be bytes in test_api.pyCyril Roelandt2014-01-071-2/+2
|/ | | | | | This works with Python 2 and 3. Change-Id: I567068695163064d163cbab7c63f8f9983cc0c04
* Merge "Python 3: use six.with_metaclass"Jenkins2014-01-071-2/+2
|\
| * Python 3: use six.with_metaclassCyril Roelandt2014-01-061-2/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Instead of using (Python 2): __metaclass__ = ... or (Pyhon 3): class Foo(metaclass=...): we use six.with_metaclass (Python 2 and 3): class Foo(six.with_metaclass(Meta, Base)): Change-Id: Ie934cd14dfb81a018f838294b768e69dff16af5b
* | Merge "Python 3: replace 'basestring' by 'six.string_types'"Jenkins2014-01-0713-39/+69
|\ \
| * | Python 3: replace 'basestring' by 'six.string_types'Cyril Roelandt2014-01-0613-39/+69
| |/ | | | | | | | | | | | | 'basestring' will only work in Python 2. Using 'six.string_types' instead makes the code compatible with both Python 2 and 3. Change-Id: I572506ce6d0cc7570dc264711d19619746949d49
* | Python 3: Use six.moves.configparser rather than ConfigParserCyril Roelandt2014-01-061-7/+8
|/ | | | | | This makes the code compatible with both Python 2 and 3. Change-Id: Idfbfb26c9df4a55d2cfb3f1d020e2787239a61d4
* sync requirements and osloGordon Chung2013-12-165-29/+34
| | | | | | | - update common code - update requirements Change-Id: I1912dad4e61da7c14c5e3d9a38076829b09afe87
* Merge "add namespace to all ids"0.2.2Jenkins2013-10-293-8/+13
|\
| * add namespace to all idsGordon Chung2013-10-293-8/+13
| | | | | | | | | | | | add namespace to all ids, including those not generated by pycadf Change-Id: I9ba68a65524708c4f0749540ad25811f8cb3355f
* | improve model validationGordon Chung2013-10-2513-52/+135
|/ | | | | | | | | | | - add isset to check "real" attribute and not descriptor - verify only id is set in shortform - verify either resource or resourceId value is set, not both. blueprint improve-validation related-bug: #1242830 Change-Id: Ie9e3f26c5d30cd36e6013a1f0b77c8fe466cb3f7
* update osloGordon Chung2013-10-244-40/+137
| | | | | | bring in latest oslo code Change-Id: Id05edcd9c23370fbba7610fb9de0ac7977bae717
* do not set typeURI in resource shortformGordon Chung2013-10-211-1/+3
| | | | | | | do not set typeURI if resource id is 'target' or 'initiator' Partial-Fix: Bug #1240067 Change-Id: I2aba379822989aab7e5dac4a4368682e22463f80
* Merge "support namespace prefix in id"0.2.1Jenkins2013-10-181-9/+11
|\
| * support namespace prefix in idGordon Chung2013-10-171-9/+11
| | | | | | | | | | | | prefix generated ids with namespace option Change-Id: I50776202dd5be1b9ab2cfc5e177eeb9a77d6a8f9
* | switch list action to read/listGordon Chung2013-10-182-4/+4
|/ | | | | | | CADF spec has changed 'list' action to 'read/list' action type. update library to reflect that. Change-Id: I5fe3b7d180f9a5b9117700e684bd659701da49b4
* observer and reporter should be valid ResourceGordon Chung2013-10-176-23/+44
| | | | | | | | | - fix observer and reporter attributes to be valid Resource type - add check that Resource id shortform for initiator and target do not reference themselves Fixes: Bug # 1240067 Change-Id: Iab5b6c129d512039073cc8c2ab7b75ac7c819624
* fix conf file settings0.2Gordon Chung2013-09-253-4/+47
| | | | | | | | | - add test for default_target_endpoint_type setting - do not fail when missing optional conf options. Change-Id: If09267c17db73e8adfdf3cc5d63156a0408d2edc Fixes-Bug: #1226870 Fixes-Bug: #1228199
* pycadf 0.1.8 broke oslo0.1.9Gordon Chung2013-09-191-13/+14
| | | | | | | add default_target_endpoint_var Change-Id: I4e5a75c1ec72757ddca7d70e4d20dd0667646521 Fixes: bug #1227634
* DNS names may not map to service catalog valuesGordon Chung2013-09-171-24/+48
| | | | | | | | support an optional value to default target endpoint to a specific value. add target_endpoint_type to map.conf to set a default Change-Id: I735dcd8958d6479d6a59d144f81bb18e87bd72e0 Fixes: Bug#1226722
* ensure unique id and timestamp defaults0.1.7Gordon Chung2013-09-054-11/+33
| | | | | | | | | ceilometer CADF_EVENT.id and CADF_EVENT.eventTime always default to the same id and timestamp. fix other bad default values in __init__() Change-Id: Icd90e96264725ee274893bbd25f4b25cdb830598 Fixes: Bug #1221379
* update cadf spec to support new data model0.1.5Gordon Chung2013-08-2010-115/+340
| | | | | | | | | | | - add Credential type and move token into it - add Host type and move client_addr, agent into it - add Endpoint type and move adminUrl, privateUrl into it - add credential, host, addresses as optional attr of Resource - add observer attr to event Change-Id: I663eaf0b2f239300e035f084b8574e615c40a182 Fixes: Bug #1214097
* add event to CADF_EVENT0.1.4Gordon Chung2013-08-192-19/+19
| | | | | | | to accommodate notifier filter, only variables in all caps are included in payload Change-Id: I622e57069a3f03a58c393b2d8f2a3b022d1597d3
* add support for no response and failed request audit0.1.3Gordon Chung2013-08-152-8/+50
| | | | | | | | | when no response is given, set outcome to unknown when request is not audited (req missing cadf_model), do audit on response add docstring to explain functions Change-Id: I622ea05aae477b9897e0968d52faf60dbbc4f819
* move cadf correlation id under req.environGordon Chung2013-08-142-2/+2
| | | | | | move cadf correlation id under req.environ Change-Id: Iff247fdd065ac55b0455c7d6e5fe2ade9e98cfaa
* append cadf event to req.environ0.1.2Gordon Chung2013-08-143-40/+40
| | | | | | append cadf event to req.environ to work with middlware.notifier Change-Id: I0ebfd2ed436a7fed88b0ef12ea2e3cccd350cc98
* validate attributes against basestring0.1.10.1Gordon Chung2013-08-0715-646/+52
| | | | | | | | | - need to update attribute validation to test against basestring instead of str - drop use of openstack logger Change-Id: I2167cf8e468c0e932c476238120d768e5d4d443f Fixes: bug1209387
* add support for audit api middlewarev0.1Gordon Chung2013-08-065-0/+463
| | | | | | | | build api audit event and append to a given message blueprint support-standard-audit-formats Change-Id: I620f49083c3db12bdad74b29f4d9b3019d977468
* DMTF CADF formatGordon Chung2013-08-0626-0/+3032
| | | | | | | | | | | | Adding support for the DMTF Cloud Audit (CADF) format which will be used along with a generic notification filter to audit 'core' component APIs. initial code drop blueprint support-standard-audit-formats Change-Id: I3b27ceae8faa6427e4be1290c1406102e790e2e3
* initial project setupDoug Hellmann2013-08-022-0/+0
Change-Id: I1bbe058cf162549a517814e02a3e8bed70b5dbf8