Hello community,
here is the log from the commit of package python-ravello-sdk for
openSUSE:Factory checked in at 2017-07-12 19:35:26
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Comparing /work/SRC/openSUSE:Factory/python-ravello-sdk (Old)
and /work/SRC/openSUSE:Factory/.python-ravello-sdk.new (New)
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Package is "python-ravello-sdk"
Wed Jul 12 19:35:26 2017 rev:3 rq:508869 version:2.4
Changes:
--------
--- /work/SRC/openSUSE:Factory/python-ravello-sdk/python-ravello-sdk.changes
2017-02-07 12:09:20.279787410 +0100
+++
/work/SRC/openSUSE:Factory/.python-ravello-sdk.new/python-ravello-sdk.changes
2017-07-12 19:35:26.953067481 +0200
@@ -1,0 +2,17 @@
+Wed Jul 5 20:11:57 UTC 2017 - [email protected]
+
+- Update to v2.4 2017-07-05 (bsc#1047582)
+ - Added api call to get storage charges for bp.
+ - Update get_detailed_charges_for_blueprint() args, error
+ handling and desc.
+ - Remove ;design from POST.
+
+-------------------------------------------------------------------
+Wed Feb 22 15:18:17 UTC 2017 - [email protected]
+
+- Update to 2.3 2017-02-22
+ - Add share API.
+- Update to 2.2 2017-02-22
+ - Add cost bucket and cost alert definition calls (beta feature).
+
+-------------------------------------------------------------------
@@ -6,2 +23 @@
-- Requested addition to SUSE_SLE-12_Update.
- FATE#322319, bsc#1018964
+- Add package to SLE-12 codestream (bsc#1018964, fate#322319)
@@ -19 +34,0 @@
-
Old:
----
ravello-sdk-2.1.tar.gz
New:
----
ravello-sdk-2.4.tar.gz
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Other differences:
------------------
++++++ python-ravello-sdk.spec ++++++
--- /var/tmp/diff_new_pack.X835gl/_old 2017-07-12 19:35:27.444997990 +0200
+++ /var/tmp/diff_new_pack.X835gl/_new 2017-07-12 19:35:27.444997990 +0200
@@ -17,7 +17,7 @@
Name: python-ravello-sdk
-Version: 2.1
+Version: 2.4
Release: 0
Summary: Python SDK for the Ravello API
License: Apache-2.0
++++++ ravello-sdk-2.1.tar.gz -> ravello-sdk-2.4.tar.gz ++++++
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore' old/ravello-sdk-2.1/PKG-INFO new/ravello-sdk-2.4/PKG-INFO
--- old/ravello-sdk-2.1/PKG-INFO 2016-10-18 11:03:09.000000000 +0200
+++ new/ravello-sdk-2.4/PKG-INFO 2017-06-19 08:02:46.000000000 +0200
@@ -1,6 +1,6 @@
Metadata-Version: 1.1
Name: ravello-sdk
-Version: 2.1
+Version: 2.4
Summary: Python SDK for the Ravello API
Home-page: https://github.com/ravello/python-sdk
Author: Hadar Davidovich
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore' old/ravello-sdk-2.1/lib/ravello_sdk.egg-info/PKG-INFO
new/ravello-sdk-2.4/lib/ravello_sdk.egg-info/PKG-INFO
--- old/ravello-sdk-2.1/lib/ravello_sdk.egg-info/PKG-INFO 2016-10-18
11:03:09.000000000 +0200
+++ new/ravello-sdk-2.4/lib/ravello_sdk.egg-info/PKG-INFO 2017-06-19
08:02:46.000000000 +0200
@@ -1,6 +1,6 @@
Metadata-Version: 1.1
Name: ravello-sdk
-Version: 2.1
+Version: 2.4
Summary: Python SDK for the Ravello API
Home-page: https://github.com/ravello/python-sdk
Author: Hadar Davidovich
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore'
old/ravello-sdk-2.1/lib/ravello_sdk.egg-info/requires.txt
new/ravello-sdk-2.4/lib/ravello_sdk.egg-info/requires.txt
--- old/ravello-sdk-2.1/lib/ravello_sdk.egg-info/requires.txt 2016-10-18
11:03:09.000000000 +0200
+++ new/ravello-sdk-2.4/lib/ravello_sdk.egg-info/requires.txt 2017-06-19
08:02:46.000000000 +0200
@@ -1,3 +1,3 @@
six
docopt
-requests>=2.6.0
\ No newline at end of file
+requests>=2.6.0
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore'
old/ravello-sdk-2.1/lib/ravello_sdk.egg-info/top_level.txt
new/ravello-sdk-2.4/lib/ravello_sdk.egg-info/top_level.txt
--- old/ravello-sdk-2.1/lib/ravello_sdk.egg-info/top_level.txt 2016-10-18
11:03:09.000000000 +0200
+++ new/ravello-sdk-2.4/lib/ravello_sdk.egg-info/top_level.txt 2017-06-19
08:02:46.000000000 +0200
@@ -1,2 +1,2 @@
-ravello_sdk
ravello_cli
+ravello_sdk
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore' old/ravello-sdk-2.1/lib/ravello_sdk.py
new/ravello-sdk-2.4/lib/ravello_sdk.py
--- old/ravello-sdk-2.1/lib/ravello_sdk.py 2016-10-18 11:03:08.000000000
+0200
+++ new/ravello-sdk-2.4/lib/ravello_sdk.py 2017-06-19 08:02:46.000000000
+0200
@@ -11,7 +11,6 @@
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
-
from __future__ import absolute_import, print_function
import sys
@@ -22,6 +21,7 @@
import json
import random
import requests
+import urllib
# Python 2.x / 3.x module name differences
try:
@@ -803,6 +803,18 @@
if isinstance(bp, dict): bp = bp['id']
self.request('DELETE', '/blueprints/{0}'.format(bp))
+ def get_detailed_charges_for_blueprint(self, bp, deployment_options = {}):
+ """Estimate the detailed charges for an application deployed from this
blueprint.
+ *bp* is the blueprint to get the charges for
+ *deployment_options* required parameter, is a dict
+ with the deployment optimizationLevel when querying for a design
pricing.
+ See the REST API docs for details on possible values.
+ """
+ if isinstance(bp, dict): bp = bp['id']
+ if 'optimizationLevel' not in deployment_options:
+ raise RavelloError("Cannot query for detailed blueprint charges
with no optimizationLevel specified in deployment_options")
+ return self.request('POST', '/blueprints/{0}/calcPrice'.format(bp),
deployment_options)
+
def get_image(self, img):
"""Return the image with ID *img*, or None if it does not exist."""
if isinstance(img, dict): img = img['id']
@@ -1240,3 +1252,150 @@
"""Retrieves all communities."""
return self.request('GET', '/communities')
+ def get_cost_buckets(self, permissions="execute,update",
skip_deleted=False):
+ """Retrieves all cost buckets
+ *permissions* - Possible values: execute, create, read, update,
delete, share or ephemeral_access, or any combination of the above, comma
separated. The returned list will be only buckets with user's authentication
plus defined permissions.
+ *skip_deleted* - If False, list contains also deleted cost buckets.
+ """
+ skip_deleted_str=str(skip_deleted).lower()
+ return self.request('GET',
'/costBuckets?permissions={0}&skipDeleted={1}'.format(permissions,skip_deleted_str))
+
+ def get_cost_bucket(self, cost_bucket):
+ """Retrieves an existing cost bucket.
+ The *cost_bucket* parameter is the ID of the cost bucket to retrieve
+ """
+ if isinstance(cost_bucket, dict): cost_bucket = cost_bucket['id']
+ return self.request('GET', '/costBuckets/{0}'.format(cost_bucket))
+
+ def create_cost_bucket(self, cost_bucket_details):
+ """Creates a new cost bucket.
+ The *cost_bucket_details* parameter is a dict describing the cost
bucket to create.
+ This parameter has a mandatory field named *name*, as well as optional
fields:
+ - description - The description of the cost bucket
+ - parentId - The ID of the cost bucket parent, which is also a cost
bucket. If this parameter is missing, the default parentId, "Organization", is
set.
+ """
+ return self.request('POST', '/costBuckets', cost_bucket_details)
+
+ def update_cost_bucket(self, cost_bucket, cost_bucket_details):
+ """Updates an existing cost bucket.
+ The *cost_bucket* parameter is the ID of the cost bucket to update
+ The *cost_bucket_details* parameter is a dict describing the cost
bucket details
+ """
+ if isinstance(cost_bucket, dict): cost_bucket = cost_bucket['id']
+ return self.request('PUT', '/costBuckets/{0}'.format(cost_bucket),
cost_bucket_details)
+
+ def associate_resource_to_cost_bucket(self, cost_bucket, resource_details):
+ """Associate Billed Resource to a Different Cost Bucket
+ The *cost_bucket* parameter is the ID of the cost bucket the resource
will be associated to
+ The *resource_details* parameter is a dict describing the resource to
associate details
+ """
+ if isinstance(cost_bucket, dict): cost_bucket = cost_bucket['id']
+ return self.request('PUT',
'/costBuckets/{0}/associateResource'.format(cost_bucket), resource_details)
+
+ def describe_cost_bucket(self):
+ """Describe Cost Bucket
+ """
+ return self.request('GET', '/costBuckets/describe')
+
+ def get_cost_alert_definition(self, cost_alert_definition):
+ """Returns a single cost alert definition according to its ID.
+ The *cost_alert_definition* parameter is the ID of the cost alert
definition to retrieve
+ """
+ if isinstance(cost_alert_definition, dict): cost_alert_definition =
cost_alert_definition['id']
+ return self.request('GET',
'/costAlertDefinitions/{0}'.format(cost_alert_definition))
+
+ def get_cost_alert_definitions(self, cost_bucket):
+ """Retrieves all the cost alert definitions for an existing cost
bucket.
+ The *cost_bucket* parameter is the ID of the cost bucket to retrieve
+ """
+ if isinstance(cost_bucket, dict): cost_bucket = cost_bucket['id']
+ return self.request('GET',
'/costBuckets/{0}/costAlertDefinitions'.format(cost_bucket))
+
+ def create_cost_alert_definition(self, cost_alert_definition_details):
+ """Creates a new cost alert definition. In addition to permission to
create cost alert definitions,
+ the user must also have READ permission on the aggregation parent,
and READ permission on Billing Info.
+ The *cost_alert_definition_details* parameter is a dict describing the
cost alert definition to create.
+ This parameter has several mandatory fields:
+ - aggregationTimeUnit - The duration of the aggregation. Possible
values: daily, weekly, monthly, yearly, all_times.
+ - costLimit - The limit in dollars.
+ - aggregationParent - Possible values: "cost_bucket" or "application".
If "cost_bucket" is sent, an alert is sent when the quota for this bucket is
exceeded. If "application" is sent, an alert is sent when the quota is exceeded
for this application.
+ - parentId - The ID of the cost_bucket / application in which the
alert is defined.
+ This parameter has several optional fields:
+ - description - The description of the cost bucket
+ - warningThreshold - The threshold for warning, as a percentage.
+ - userIds - List of IDs of the users that will receive the messages
when the configured quota is exceeded.
+ """
+ return self.request('POST', '/costAlertDefinitions',
cost_alert_definition_details)
+
+ def update_cost_alert_definition(self, cost_alert_definition,
cost_alert_definition_details):
+ """Updates a specific cost alert definition. The user should have the
following permissions in order to complete this operation: UPDATE permission on
cost alert definitions, READ permission on the aggregation parent (the cost
bucket or application's on which the alert is set) and READ permission on
Billing Info.
+ The *cost_alert_definition* parameter is the ID of the cost alert
definition to update
+ The *cost_alert_definition_details* parameter is a dict describing the
cost alert definition to update.
+ """
+ if isinstance(cost_alert_definition, dict): cost_alert_definition =
cost_alert_definition['id']
+ return self.request('PUT',
'/costAlertDefinitions/{0}'.format(cost_alert_definition),
cost_alert_definition_details)
+
+ def delete_cost_alert_definition(self, cost_alert_definition):
+ """Deletes a cost alert definition. The user should have the following
permissions in order to complete this operation: DELETE permission on cost
alert definitions, READ permission on the aggregation parent (the cost bucket
or application's on which the alert is set) and READ permission on Billing Info.
+ The *cost_alert_definition* parameter is the ID of the cost alert
definition to delete
+ """
+ if isinstance(cost_alert_definition, dict): cost_alert_definition =
cost_alert_definition['id']
+ return self.request('DELETE',
'/costAlertDefinitions/{0}'.format(cost_alert_definition))
+
+ def get_users_of_cost_alert_definition(self, cost_alert_definition):
+ """Returns list of all the recipients of a specific cost alert
definition.
+ The *cost_alert_definition* parameter is the ID of the cost alert
definition to retrieve
+ """
+ if isinstance(cost_alert_definition, dict): cost_alert_definition =
cost_alert_definition['id']
+ return self.request('GET',
'/costAlertDefinitions/{0}/users'.format(cost_alert_definition))
+
+ def add_user_to_cost_alert_definition(self, cost_alert_definition, user):
+ """Adds a recipient to the cost alert definition. Required
permissions: READ permission on the user, and UPDATE permission on the Cost
Alert Definition.
+ The *cost_alert_definition* parameter is the ID of the cost alert
definition to add the user to
+ The *user* parameter is the ID of the user to add to the cost alert
definition
+ """
+ if isinstance(cost_alert_definition, dict): cost_alert_definition =
cost_alert_definition['id']
+ if isinstance(user, dict): user = user['id']
+ return self.request('POST',
'/costAlertDefinitions/{0}/users/{1}'.format(cost_alert_definition, user))
+
+ def remove_user_from_cost_alert_definition(self, cost_alert_definition,
user):
+ """Deletes related user from cost alert definition. Required
permissions: READ permission on the user, and UPDATE permission on the Cost
Alert Definition.
+ The *cost_alert_definition* parameter is the ID of the cost alert
definition to remove the user from
+ The *user* parameter is the ID of the user to remove from the cost
alert definition
+ """
+ if isinstance(cost_alert_definition, dict): cost_alert_definition =
cost_alert_definition['id']
+ if isinstance(user, dict): user = user['id']
+ return self.request('DELETE',
'/costAlertDefinitions/{0}/users/{1}'.format(cost_alert_definition, user))
+
+ def get_shares(self, request=None):
+ """Get List of Shares.
+ Returns a list of share records, optional filters could be used.
+ - sharingUserId - The ID of the sharing user.
+ - targetEmail - The email of the user whom we share the resource with.
+ - sharedResourceType - Could be one of the following: BLUEPRINT,
LIBRARY_VM, DISK_IMAGE.
+ - sharedResourceId - The resource ID.
+ """
+
+ if isinstance(request, dict):
+ query = urllib.urlencode(request)
+ path = '/shares?{0}'.format(query)
+ else:
+ path = '/shares'
+ return self.request('GET', path)
+
+ def share_resource(self, share_details):
+ """Share Specific Resource.
+ The *share_details* parameter is a dict, describing the share to
create.
+ All fields are mandatory:
+ - targetEmail - The email address of the user the share the resource
with.
+ - sharedResourceType - Should be one of the following: BLUEPRINT,
LIBRARY_VM, DISK_IMAGE
+ - sharedResourceId - The resource ID
+ """
+ return self.request('POST', '/shares', share_details)
+
+ def delete_share(self, share):
+ """Delete Share Data by ID.
+ Unshare specific resource.
+ """
+ if isinstance(share, dict): share = share['id']
+ return self.request('DELETE', '/shares/{0}'.format(share))
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore' old/ravello-sdk-2.1/setup.py new/ravello-sdk-2.4/setup.py
--- old/ravello-sdk-2.1/setup.py 2016-10-18 11:03:08.000000000 +0200
+++ new/ravello-sdk-2.4/setup.py 2017-06-19 08:02:46.000000000 +0200
@@ -21,7 +21,7 @@
version_info = {
'name': 'ravello-sdk',
- 'version': '2.1',
+ 'version': '2.4',
'description': 'Python SDK for the Ravello API',
'author': 'Geert Jansen',
'maintainer': 'Hadar Davidovich',