CHANGES
=======

* fix an issue with objectstorage products not being in all regions
* Fix a NotFound error thrown when checking policy
* Fix an issue with product naming and swift policy names
* Update tox.ini file for opendev.org
* Add support for object storage policies
* OpenDev Migration Patch
* Support JSON file as an ERP driver
* Fix the KeyError for getting the volume types
* Support extra product category
* Support more licensed products
* Add new transformer for Magnum pollster
* Add new product category \`premium support\`
* Add failied project information in health API response
* Get last collection time from valid projects
* Improve odoo driver performance
* Support ignore project in /health API
* Support invisible products and fix the units
* Include windows vm usage in quotation
* Remove vestigate HUDSON\_PUBLISH\_DOCS reference
* Add API ref
* Fix grant product
* Return numberic type for volume in /measurements
* Update and replace http with https for doc links in distil
* Fix regression issue
* Support py35
* [Trivialfix]Fix typos in distil
* Return invoice status
* Support discount for prodcut category mapping
* Fix typo
* Round the quantity for storage product
* Add oslo.cache to distil.conf
* Fix object storage mapping
* Remove useless config options
* Fix ut for project order
* Fix getting context info when doing policy check
* Replace basestring with six.string\_types
* Replaces uuid.uuid4 with uuidutils.generate\_uuid()
* Ensure using UTC for /quotations
* Cache invoices
* Improve cache about get products
* Stop using deprecated 'message' attribute in Exception
* Add doc for Distil
* Add 'collect\_end\_time' param for distil-collector command
* Support project order for collection
* Add return value for collect\_usage()
* Trivial fix for odoo driver
* Remove unused None from dict.get()
* Support odoo in health check
* Improve performance of getting products
* Fix policy check for distil
* Open API to tenant users
* Remove usage of parameter enforce\_type
* Add /credits API
* Replace assertEquals with assertEqual
* Add unit tests for api module
* Remove log translations
* Improve get\_health API
* Reword Readme
* Add unit test for collector/ceilometer.py
* Use correct mock for stevedore driver
* Add coverage configuration for Distil
* Replaces yaml.load() with yaml.safe\_load()
* Fix last\_collect time for new project
* Add unit tests for service modules
* Rename get\_usage to get\_measurements
* Fix getting host name from instances
* Add /quotations rest api
* Add /invoices rest api
* Improve get\_products api
* Support db migration for existing tables
* Rename /usages to /measurements
* Fix timestamp conversion
* Bugfix for getting image
* Fix nova client initialization issue
* Fix wrong policy.json.sample
* Update to a newer hacking library
* Fix long resource id issue
* distil-collector concurrency support
* Fix long resource id issue
* Collecting host info for instance
* Fix Distil V1 log issue
* Make Odoo as a driver of ERP
* Transformer improvement
* Fix exceptions in distil
* Remove /bin and /debian
* Rename 'utils' pkg to 'common'
* Rename prices to products
* Add the support for cache
* Make transformer entry point names consistent with config file
* Fix getting 'os\_distro' property of instance
* Replace assertEquals with assertEqual
* Use upper-constraints for tox envs
* Fix a typo in web.py

0.6.0
-----

* Add policy support
* Replace assertEqual(None, \*) with assertIsNone in tests
* Move args parsing to make\_app()
* Remove odoo glue script
* Fix some problems when debugging swift traffic billing
* Support adding new order line and respect credits
* Set Supplier Reference for Windows purchase order
* Support Cloud Credit of Odoo
* Dn not update some resource properties for each period
* Support generating config automatically
* Remove client from Distil server repo
* Fix tagging issue after instance deleted
* adding raw usage endpoint
* Implement /costs on new service
* Implement usages\_add function in db layer
* Add a log for odoo-glue script
* Add keystone util functions
* Implement get\_meter function in CeilometerCollector
* Refactor collect\_usage function
* Adding collector service to distil
* Refactor Database layer
* Implement /prices by extracting price from odoo
* Refactor Distil API to support new endpoints
* Support Swift Billing
* Add command to generate Purchase order for Windows
* Support Windows image billing
* Adding command for duplication check
* Initialze order\_id attribute of OdooShell
* Fix duplication check
* Clean up usage of oerplib
* Remove wsgiref from requirements
* Remove argparse from requirements
* Add check to avoid duplicate quotations in Odoo
* Add retry mechanism for build\_sales\_order
* Fix jenkins failure
* Update tox configuration
* Sync distil project structure with internal one
* fix .gitreview
* fpm: Convert deb-pre-depends to normal depends
* fixing a issue I missed with last client change
* add proper keyword args to distilclient
* fix transformer tests for new timestamp handling
* bump version to 0.4.2
* add configuration knob for max\_windows\_per\_cycle
* Moving entry sorting to interface
* version bump to 0.4.1
* support insecure flag in distilclient
* bump versions of distil and distilclient
* log cache flushes
* provide default service\_type, endpoint\_type in Client
* setting up a default service for each metric
* Transformer to correctly name services to b1.standard or other volume\_types
* setting up cinder volume\_type query and cache reset
* added an addional source for ip\_address metadata
* Add billing for routers in use by tenants
* get rid of transform\_info; apply template if present
* replace indirect metadata definition lookup with child of the meter\_info
* pull fetching of md\_def up into api
* pull fetching of md\_def up one level
* remove a bunch of dead junk
* Remove a bunch of duplication in distilclient
* client: use urlparse.urljoin to avoid trailing-slash madness
* add raw get-usage command
* fix errors collection type in client
* version bump to 0.3.2; add distilclient package
* hack packaging to not touch /usr/local/bin; 0.3.1
* properly assigning endpoint when grabbed from keystone
* remove catalyst uris from example conf
* packaging: mark everything in etc/ as config
* about time for a version bump
* Adding a simple api call to get last collection run timestamp
* Require admin for all API operations, if authenticate\_clients is enabled
* Optionally authenticate distil clients against keystone
* stop using flask convenience function on app for run()
* remove bogus leading space from X-Auth-Token header name
* add include\_tenants whitelist to complement ignore\_tenants blacklist
* Fixing a bug with not passing in headers correctly
* fix ceilometer endpoint lookup to work with keystoneclient-0.3.2
* Changes to client and shell to setup keystone auth
* Fixup rates file handling to be less insane
* getting rid of ancient puppet code
* adding copyright and licensing
* Format and readability changed for README
* Network traffic config enhancement
* Enable network billing
* minor alteration to remove openstack prefix
* Changing README and getting rid of a few other useless files
* Add new transformer for network service
* adding all dependencies to the makefile
* minor client and shell changes to handle responses better
* Fixing model tests to except correct exceptions
* Working on setting up better session handling on exception exit
* Catching operational error thrown by current mysql exclusion triggers
* fixing top level exception catch and critical log
* Account for root\_disk on image booted instances
* Add network traffic billing
* Remove dup novaclient in requirements.txt
* Fix 404 error when endpoint ends with slash
* altering table name to avoid mysql reserved word
* Fixing meta\_data merge, and amending conf file
* Removing unneeded parts of packaging
* Fixing tests
* making initbd.py a little easier to use
* Renaming Artifice to Distil
* Altering example files to be a bit more useful
* Fixing a typo in docstring
* Adding comments to explain the conf file a little
* fixing typo that stopped sales order regeneration from working
* Clean-up part1 - DocStrings, pep8 clean up, removing useless files
* fixing a key error from config, as conf no longer has a ceilometer key
* get ceilometer endpoint from keystone
* adding log file location to config
* convert untrusted message to log warning
* split filter/grouping into own timed block
* Allow whitelisting of trusted ceilometer sample sources
* adding an ID for sales\_orders
* Catching the error if a rate is missing for a service
* Moving info prints and debug prints to logging
* Changing how the dawn of time value works
* removing int casting for flavor id
* making shell commands have required arguments
* adding api call to get sales orders in a given range
* minor tidy of rates code
* use requests.Session in ceilometer interface for more perf
* adding range into sales orders
* Adding metadata definition to config, and collection based on that
* definable end point for sales orders, and drafts
* fixing tests that were broken due to unit conversions changes
* api calls to collect historic sales orders
* adding 'collection' to the test config so tests can run
* Shifting the meter mappings to config
* commenting out object storage for now
* fixing a typo, type was returning as an array
* Setting up transformer units
* Slight change to make usageentry \_\_str\_\_ use the correct field names
* changes to client and shell tools
* Changes and fixes to api sales order generation
* interface: Drop ceilometerclient dependency
* interface: strip out more junk from the artifice object
* support ignoring tenants
* Fixing transformer tests, and issues brought up by tests
* Removing and fixing some broken tests
* breaking apart values in service dict
* tests for add\_cost\_to\_tenant
* tests for build\_tenant\_dict
* Simplifying build\_tenant\_dict
* Removing exporter code, and related modules/tests
* api to return json usage+costs
* clarify GaugeMax units; dont assume 1h chunks
* do everything in utc
* record last\_collected timestamp for tenants
* do not generate the final partial window
* rewrite interface
* perf: dont need flavor, provide ts bounds to ceilometer for samples
* kill dead things
* dont parse dawn\_of\_time, and move it further out
* always provide start/end in usage
* remove some duplication from uptime transformer
* clip & extend uptime transformer window
* Fix broken overlap exclusion
* add decent stringification for UsageEntry models
* models: Include start/end dates in pk
* do window splitting by hours
* various fixes to make usage collection work
* Cleanup of dead code
* remove bin/usage as well; it is junk
* nuke bin/collect\*
* parse port option
* actually load the config
* allow insecure flag in config to w/a cert fails
* fix resource lookup to actually work
* Changes to the config system
* remove some dead junk
* untangle rates from exporters
* remove unused names mixins
* timestamp consistency for insert\_tenant
* improve timestamp consistency
* extract function to collect usage for one tenant
* transformers: Add more tests for lead-in handling and clipping
* add a reference timestamp outside the window
* add clipping window to transformer::transform\_usage
* remove magic numbers in test\_get\_from\_db
* Moves the artifice web API into the artifice package. Updates the build system to create a working .deb, based on the makefile. Adds a new script to start up the web daemon. Adds a new script to test if the database is provisioned Adds a new script used by Puppet to provision the database Adds puppet manifests (mirrored in main puppet) Moves api/ to artifice/api Alters some of the relative imports Moves artifice.py to why\_is\_this\_called\_artifice.py, as it was causing import issues
* Removing a useless print statement
* add a .gitreview file
* remove useless 2.0 tree
* remove BaseModelConstruct::get
* use normal member lookup for resource\_id, tenant\_id
* remove stray print
* TransformerValidationError now extends Exception rather than BaseException
* Added docstrings to transformers
* Updated the mocking of the flavor\_name helper function to match the mocking of it in test\_transformers
* Removed GaugeAverage since it is unlikely to be needed and easy to reimplement later
* Added a try except to catch errors if transformer validation fails for future logging
* Reworked uptime transformer so that the last test passes
* adjust flavor merging to consider flavor\_timestamp <= state\_timestamp
* Add a bunch of unit tests for the uptime transformer
* be less fussy about python-novaclient version
* moved the novaclient helper function to a helpers module
* Uptime transformer now uses flavor and state to calculate uptime
* Fixing a typo
* Replaced the sample data to have the flavor metric
* First implementation of transformers. Seems to work, all old tests pass
* More clean up in inteface.py, moved the get\_meter function had to alter tests to account for new function location
* Breaking artifice.interface into a couple of extra modules
* altered the helper build\_billable function to take a volume value
* getting rid of a useless function
* updated the csv exporter to output in a given type order. It will write resource types in a given order, then any types not requiring an order will be listed after the ordered types
* adding basic tests for the billable object
* minor variable rename
* add test for no tenant list overlap; fix bad assert
* fix validation throwing 403 rather than 400; enable extra test
* fix sales order code to pass the tests again
* use enumerate rather than handrolling loop counter
* tolerate missing Content-Type header
* fixed a few things I forgot to rename
* database module tests work, and test most of what is needed
* fixed a tiny typo
* changed the Usage.values() function to return a list of all the combined resources, rather than a tuple. Changed all the places that used it to take advantage of the change
* general pep8 and import clean up
* removing a couple of comments
* MAJOR test refactor. Not much logic changes, but breaking functions and constants out into multiple modules
* adding a test\_rates file for easier exporter testing
* renaming the exporter plugins
* created a mock exporter, and altered the config to use it
* More tests for the api, now actually asserts salesorder are created, and makes assertions from the response
* changes to api to getting it working and correctly grabbing DB data, also changes to how the invoicer is imported
* fixing calls to non-existent resource\_id fields
* renaming a parameter for clarity
* fixing issues with csv\_ plugin so that it matches how other functions call it, and minor changed based on how it is expected to be used
* move validation helpers into own module
* Major code clean up, deletion of unneeded functions/imports, and general pep8 compliance
* factor out common part of must/json\_must
* fix error reporting in json\_must
* Fix sales order generation API
* Working through web.py to get the sales-order tests to pass, also working on getting the sales-order tests to work
* fixing a tiny typo of mine in the docs from ages ago that has been bugging me
* disabling broken tests and starting work on getting sales-order tests passing
* add missing packages to requirements
* test\_models: import connection strings, drop dead maker junk
* Updated the api to correctly handle data entry, also updated the database module to correctly enter that data
* database.Database no longer needs a config
* altering the tenant id to match the ID in the data set
* Artifice.tenants now returns a list
* Overwriting using the config DB uri in tests; now using package-level fixture
* Test interface now uses the database constructed in package-level fixtures. All tests currently passing
* moved the configs from the test\_api module to test interface, and a few other small changes to make extending test interface easier
* Cleanup of the model test code and model instancing. Moved the database setup and teardown into package-level fixtures. TODO: Make all tests use package-level DBs for testing
* Fix imports, skip bogus tests for now
* database module now correctly created resources
* adding service to pgsql trigger
* changing database enter to correctly use resource.id
* Adding relationship backrefs to SalesOrder. Finished initial testcases
* Model code is to this point testing correctly
* Model tests are more working than previously
* Removed the usages backref from Tenants to fix the relationship error. Tweaks to the MySQL trigger creation. Tweaks to test setup
* New model code loaded in database correctly. Usage tests to come
* added session maker to test\_interface, and fixed renaming for test\_csv\_plugins
* renamed imports from invoice to sales\_order
* Renamed invoice.py to sales\_order.py to be more accurate, also changed it to be a slightly more enforced interface, and changed csv\_.py to work with that, as well as a two line change in web.py to fit those changes
* modifying the tests to mock out the appropriate sections of artifice and ceilometer to make testing work as expected
* Added some doc strings
* Makes the plugin dir a module. Rename csv plugin to avoid system collision. modify test to reference new module path
* Fixed wrong conf reference in create\_app
* Added create\_engine import
* added decorator to the 'must' validation decorator
* Added decorator to better control callable metadata, because Flask cares about that information
* Fixing the imports in test\_api for models
* Fixed the model import in the test\_api
* Switching to Flask blueprints so we can correctly use the get\_app factory. Removed the Keystone auth handler as we are not currently using it
* Fixing the imports for sessions
* Spurious import of sqlalchemy.type
* making the web API importable
* Moving towards test-created DB sessions; updates to remove importing a session from the Artifice models
* Changing the after hooks in models to reference the table component of a model, instead of the model directly
* moved csv and openrep to a plugins folder
* making the models compile properly
* Minor updates to web and models
* adding a try except in client
* Initial API tests. Tweaks to the web API to enable proper setup of SQLAlchemy based on online documentation and ability of configuring the SQLAlchemy engine from a provided configuration file. Major modifications to the models, adding relational integrity and triggers to handle range constraints
* adding more arguments to shell.py, that default to env variables
* added basic python client and a basic commandline tool
* adding more meta data to resources.VM and altering how the uptime gauge works by a tiny bit
* Filling out the API calls for a usage run and a sales order run. Minor tweaks and removing of unnecessary code from the original interface
* Moved billable object contruction out of database.py and into another module, and changed the api to use the new module for billable objects to pass to the sales order generator
* Adding API stuff
* Making the get\_tenants return a queryset object instead of a list of dicts
* renaming of variables for clarity, and adding some documentation/comments
* For clarity renamed usage\_strategies in the billing model to be services, and a few other fields, then everything that relied on those names
* changed constants for vm states to be variables, resources now uses those
* added constants for vm states, so tracked states can be referred to by string names
* shifted/renamed db\_models, removed reliance on clerk (for now). A few more docs
* Removing usage again
* Removing the original commandline tools. Modifying the usage model, but this is deprecated by the data-models branch. Adding a flask-based web api to provide the entrypoints for all the Artifice code calls
* Altered the csv formatting, and added reliance on clerk for rates collection
* More testing, csv module redone to use new models, testing for csv module (sort of), anda slight change in db models/resource models
* Added new data, and changed the tests to reflect this
* Refined the tests some more, also added the database to use the tenant and resource tables
* Added a lot of new test data, and rewrote/deleted some of the older tests
* adding new database entrypoint, and altering/removing other database connections and models
* few bits of clean up
* added a function for clarity
* Initial API coding
* Reworked the resources, and the csv\_invoice to use a strategies based system in the resource itself for getting usage and rate data
* Changing things around. adding a simple web API to handle billing pre-computed usage data as pulled from the DB instead of Ceilometer
* adding api stuff
* general hacks to get artifice to bill for a few more things
* Removing the media-wiki readme; the markdown README is the default
* Removing Vagrant-related stuff, as it is unnecessary/shouldn't be in this repo
* Changed billable in uptime parameters to tracked. Same in resources
* More pep8 formatting and tidying up
* Some more pep8 formatting tidying up
* uptime function in gauge given a parameter of billable states (will be renamed to tracked later). Also some code clean up and formatting done
* Updated artifice to use the 'state' meter in ceilometer to accurately calculated uptime
* Basic fixes to get artifice working. Most just hacky workarounds to get it running for demo purposes. Some few useful bug fixes such as replacement of password without "\n", and issues with "flavor.name" vs "instance\_type"
* added new csv mixin for writing a set of lines to a file
* Added a couple of mixin classes to grab data from the webservice
* Working deb install on Devstack
* Prep for release
* Minor cleanup to the install functionality
* Updated docs. Updated tests to add further coverage
* Added CSV i/o, new tests
* Initial pass at creating file loader mixins for example CSV invoice class
* Removed some unnecessary print statements
* Generates a working Usage implementation, and a full set of the libraries and implementation. Passes all tests. Tests updated to exercise Ceilometer library behaviour
* Adding a rates file for CSV output. Updated testing for CSV stuff. Tweaks related to generating the debfiles and testing the debfiles
* Tweaks and bugfixes moving towards a stable-ish release
* Packaging-related stuff
* Initial readme. Minor tweaks around config files
* Initial CSV module, and tests
* Tests verify that usage is as expected
* Refactored to a better external API
* Test cases for usages indicated an incomplete representation of the various datatypes, based on our own necessary modelling for billable information. Moving instead to specific types of constructs, similar to ceilometer's own internal data structures/divisons. New tests to follow that line
* Fixes to the data model for Usage to make sure that resources are constructed correctly; only one resource ID may exist at once, and must be associatd with a Tenant. Test coverage for creating and manipulating Usage objects
* creating resources works. Creating bad resources does not work
* Tenants instance properly, save properly, and refuse to save the same tenant with the same ID
* Initial tests. Verifies instancing works As Expected
* Removed invoice start/end from the billing binary. Added invoice config hooks to interface.py
* Added initial semi-reference OpenERP plugin(incomplete) for Invoices. Tweaks around how Invoice interaction has to work. Added INVOICES.md document to cover how interacting with invoices will take place in the Artifice API
* Added updated TSRANGE for correct casting to DB. Verified SQLalchemy models construct DB tables as expected. Verified records are inserted as expected. NOTE: postgresql will require create extension btree\_gist; this should be added to the basic postgresql installation mechanica
* Adding gitignore. Fixing the SQLAlchemy models to load, interconnect as expected
* Better comments. Tenant objects now get the Artifice connection object passed through
* Usage model changed to take two arguments for the time, instead of relying on an array. Unnecessary/legacy code removed from interface.py. Deleted unnecessary ceilometer.py file
* Initial commit; initial layout of code and structure and SQL Alchemy hookups and such. Covers the basics of communication with an underlying database to handle billing artifacts. Covers initial API that clients will use to interface with a given Tenant's bills
