Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Reporting data export format and streaming changes.
MessageStackHandler is updated to have a default empty implementation for 'outgoingMessage'. Subclasses are updated to remove their own empty implementations of this previously abstract method. Binding is updated to support streaming using new 'toStream' / 'fromStream' methods. Areas that previously converted to an OM model and then immediately to bytes are updated to skip the intermediate step. The namespace processing that was previously performed using 'replaceAll' is now performed via a new NamespaceMappingXMLStreamWriter class. The reporting Export class is modified to support streaming exports. The 'eureport-export-data' command is updated to support compression and streaming. A patched version of the Python gzip module is included to work around a bug that prevents streaming of gzip data (fixed in Python 3.2). The reporting Import class is modified to support streaming import of data. The RestfulMarshallingHandler has a new 'streamResponse' method that can be called from service implementations to stream data. In this case the method will return 'null' to indicate that the response has been handled. The 'streamResponse' method uses HTTP chunked encoding and supports gzip and deflate data compression. A new 'eureport-delete-data' command has been added and can be used to delete (presumably exported) reporting data. The Entities class has been updated to support bulk deletion of data. The reporting messages, binding and service are updated to support reporting data deletion. An EventFactory class has been added for creation of persistent reporting events from exported data. ExportUtils is updated to provide functions mapping between the export model and the internal persistence events. The new ReportedAction and ReportedUsage classes are the external representation of the internal reporting persistence events. A JiBX binding has been added for reporting exports and is imported for use in the reporting service binding. A new ReportingEventIdGenerator has been added to allow exported reporting data to be saved to the data warehouse with the original identifiers (so data can be merged). The ReportingEventSupport no longer extends AbstractPersistent, this means that we no longer have various unused fields/columns and that we can preserve the original identifier and created timestamp for each event. EventRecord has been updated to allow reuse of eucalyptus code in the data warehouse without depending on Mule classes.
- Loading branch information
Showing
49 changed files
with
3,065 additions
and
306 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,32 @@ | ||
#!/usr/bin/python | ||
|
||
# Copyright 2011-2012 Eucalyptus Systems, Inc. | ||
# | ||
# Redistribution and use of this software in source and binary forms, | ||
# with or without modification, are permitted provided that the following | ||
# conditions are met: | ||
# | ||
# Redistributions of source code must retain the above copyright notice, | ||
# this list of conditions and the following disclaimer. | ||
# | ||
# Redistributions in binary form must reproduce the above copyright | ||
# notice, this list of conditions and the following disclaimer in the | ||
# documentation and/or other materials provided with the distribution. | ||
# | ||
# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS | ||
# "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT | ||
# LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR | ||
# A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT | ||
# OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, | ||
# SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT | ||
# LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, | ||
# DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY | ||
# THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT | ||
# (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE | ||
# OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. | ||
|
||
from eucadmin.deletereportdata import DeleteReportData | ||
|
||
if __name__ == "__main__": | ||
r = DeleteReportData() | ||
r.main_cli() |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,47 @@ | ||
# Copyright 2011-2012 Eucalyptus Systems, Inc. | ||
# | ||
# Redistribution and use of this software in source and binary forms, | ||
# with or without modification, are permitted provided that the following | ||
# conditions are met: | ||
# | ||
# Redistributions of source code must retain the above copyright notice, | ||
# this list of conditions and the following disclaimer. | ||
# | ||
# Redistributions in binary form must reproduce the above copyright | ||
# notice, this list of conditions and the following disclaimer in the | ||
# documentation and/or other materials provided with the distribution. | ||
# | ||
# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS | ||
# "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT | ||
# LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR | ||
# A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT | ||
# OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, | ||
# SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT | ||
# LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, | ||
# DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY | ||
# THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT | ||
# (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE | ||
# OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. | ||
|
||
from boto.roboto.param import Param | ||
from eucadmin.reportsrequest import ReportsRequest | ||
|
||
class DeleteReportData(ReportsRequest): | ||
Description = 'Delete reporting data' | ||
|
||
Params = [ | ||
Param(name='End', | ||
short_name='e', long_name='end-date', | ||
ptype='datetime', optional=False, | ||
doc='the exclusive end date for the report data deletion (e.g. 2012-08-26)'), | ||
] | ||
|
||
def cli_formatter(self, data): | ||
deleted = getattr( data, 'DeletedCount', None ) | ||
if deleted is None: | ||
raise IOError('Error processing response') | ||
print 'Deleted ' + deleted + ' reporting data entries.' | ||
|
||
def process_args(self, **args): | ||
super(DeleteReportData, self).process_args( **args ) | ||
self.process_date_param('End') |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.