Skip to content

Commit 0cf9709

Browse files
authored
Merge pull request #231 from oracle/release_2020-03-10
Releasing version 2.11.0
2 parents e7672e3 + 12bb6c9 commit 0cf9709

File tree

10 files changed

+63
-15
lines changed

10 files changed

+63
-15
lines changed

CHANGELOG.rst

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,18 @@ Change Log
33
All notable changes to this project will be documented in this file.
44

55
The format is based on `Keep a Changelog <http://keepachangelog.com/>`_.
6+
====================
7+
2.11.0 - 2020-03-10
8+
====================
9+
10+
Added
11+
-----
12+
* Support for Events service integration with alerts in the Budgets service
13+
14+
Breaking
15+
--------
16+
* The parameters sort_by and lifecycle_state type from Budget service are changed from str to enum
17+
618
====================
719
2.10.7 - 2020-03-03
820
====================

src/oci/budget/budget_client.py

Lines changed: 36 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -582,9 +582,13 @@ def list_alert_rules(self, budget_id, **kwargs):
582582
The default sort order for timeCreated is DESC.
583583
The default sort order for displayName is ASC in alphanumeric order.
584584
585+
Allowed values are: "timeCreated", "displayName"
586+
585587
:param str lifecycle_state: (optional)
586588
The current state of the resource to filter by.
587589
590+
Allowed values are: "ACTIVE", "INACTIVE"
591+
588592
:param str display_name: (optional)
589593
A user-friendly name. Does not have to be unique, and it's changeable.
590594
@@ -640,6 +644,20 @@ def list_alert_rules(self, budget_id, **kwargs):
640644
"Invalid value for `sort_order`, must be one of {0}".format(sort_order_allowed_values)
641645
)
642646

647+
if 'sort_by' in kwargs:
648+
sort_by_allowed_values = ["timeCreated", "displayName"]
649+
if kwargs['sort_by'] not in sort_by_allowed_values:
650+
raise ValueError(
651+
"Invalid value for `sort_by`, must be one of {0}".format(sort_by_allowed_values)
652+
)
653+
654+
if 'lifecycle_state' in kwargs:
655+
lifecycle_state_allowed_values = ["ACTIVE", "INACTIVE"]
656+
if kwargs['lifecycle_state'] not in lifecycle_state_allowed_values:
657+
raise ValueError(
658+
"Invalid value for `lifecycle_state`, must be one of {0}".format(lifecycle_state_allowed_values)
659+
)
660+
643661
query_params = {
644662
"limit": kwargs.get("limit", missing),
645663
"page": kwargs.get("page", missing),
@@ -713,9 +731,13 @@ def list_budgets(self, compartment_id, **kwargs):
713731
The default sort order for timeCreated is DESC.
714732
The default sort order for displayName is ASC in alphanumeric order.
715733
734+
Allowed values are: "timeCreated", "displayName"
735+
716736
:param str lifecycle_state: (optional)
717737
The current state of the resource to filter by.
718738
739+
Allowed values are: "ACTIVE", "INACTIVE"
740+
719741
:param str display_name: (optional)
720742
A user-friendly name. Does not have to be unique, and it's changeable.
721743
@@ -770,6 +792,20 @@ def list_budgets(self, compartment_id, **kwargs):
770792
"Invalid value for `sort_order`, must be one of {0}".format(sort_order_allowed_values)
771793
)
772794

795+
if 'sort_by' in kwargs:
796+
sort_by_allowed_values = ["timeCreated", "displayName"]
797+
if kwargs['sort_by'] not in sort_by_allowed_values:
798+
raise ValueError(
799+
"Invalid value for `sort_by`, must be one of {0}".format(sort_by_allowed_values)
800+
)
801+
802+
if 'lifecycle_state' in kwargs:
803+
lifecycle_state_allowed_values = ["ACTIVE", "INACTIVE"]
804+
if kwargs['lifecycle_state'] not in lifecycle_state_allowed_values:
805+
raise ValueError(
806+
"Invalid value for `lifecycle_state`, must be one of {0}".format(lifecycle_state_allowed_values)
807+
)
808+
773809
if 'target_type' in kwargs:
774810
target_type_allowed_values = ["ALL", "COMPARTMENT", "TAG"]
775811
if kwargs['target_type'] not in target_type_allowed_values:

src/oci/budget/models/alert_rule_summary.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -424,7 +424,7 @@ def version(self, version):
424424
def recipients(self):
425425
"""
426426
**[Required]** Gets the recipients of this AlertRuleSummary.
427-
The audience that will received the alert when it triggers.
427+
The audience that will receive the alert when it triggers.
428428
429429
430430
:return: The recipients of this AlertRuleSummary.
@@ -436,7 +436,7 @@ def recipients(self):
436436
def recipients(self, recipients):
437437
"""
438438
Sets the recipients of this AlertRuleSummary.
439-
The audience that will received the alert when it triggers.
439+
The audience that will receive the alert when it triggers.
440440
441441
442442
:param recipients: The recipients of this AlertRuleSummary.

src/oci/budget/models/budget.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -398,7 +398,7 @@ def targets(self):
398398
Gets the targets of this Budget.
399399
The list of targets on which the budget is applied.
400400
If targetType is \"COMPARTMENT\", targets contains list of compartment OCIDs.
401-
If targetType is \"TAG\", targets contains list of tag identifiers in the form of \"{tagNamespace}.{tagKey}.{tagValue}\".
401+
If targetType is \"TAG\", targets contains list of cost tracking tag identifiers in the form of \"{tagNamespace}.{tagKey}.{tagValue}\".
402402
403403
404404
:return: The targets of this Budget.
@@ -412,7 +412,7 @@ def targets(self, targets):
412412
Sets the targets of this Budget.
413413
The list of targets on which the budget is applied.
414414
If targetType is \"COMPARTMENT\", targets contains list of compartment OCIDs.
415-
If targetType is \"TAG\", targets contains list of tag identifiers in the form of \"{tagNamespace}.{tagKey}.{tagValue}\".
415+
If targetType is \"TAG\", targets contains list of cost tracking tag identifiers in the form of \"{tagNamespace}.{tagKey}.{tagValue}\".
416416
417417
418418
:param targets: The targets of this Budget.

src/oci/budget/models/budget_summary.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -398,7 +398,7 @@ def targets(self):
398398
Gets the targets of this BudgetSummary.
399399
The list of targets on which the budget is applied.
400400
If targetType is \"COMPARTMENT\", targets contains list of compartment OCIDs.
401-
If targetType is \"TAG\", targets contains list of tag identifiers in the form of \"{tagNamespace}.{tagKey}.{tagValue}\".
401+
If targetType is \"TAG\", targets contains list of cost tracking tag identifiers in the form of \"{tagNamespace}.{tagKey}.{tagValue}\".
402402
403403
404404
:return: The targets of this BudgetSummary.
@@ -412,7 +412,7 @@ def targets(self, targets):
412412
Sets the targets of this BudgetSummary.
413413
The list of targets on which the budget is applied.
414414
If targetType is \"COMPARTMENT\", targets contains list of compartment OCIDs.
415-
If targetType is \"TAG\", targets contains list of tag identifiers in the form of \"{tagNamespace}.{tagKey}.{tagValue}\".
415+
If targetType is \"TAG\", targets contains list of cost tracking tag identifiers in the form of \"{tagNamespace}.{tagKey}.{tagValue}\".
416416
417417
418418
:param targets: The targets of this BudgetSummary.

src/oci/budget/models/create_alert_rule_details.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -251,8 +251,8 @@ def threshold_type(self, threshold_type):
251251
@property
252252
def recipients(self):
253253
"""
254-
**[Required]** Gets the recipients of this CreateAlertRuleDetails.
255-
The audience that will received the alert when it triggers.
254+
Gets the recipients of this CreateAlertRuleDetails.
255+
The audience that will receive the alert when it triggers. An empty string is interpreted as null.
256256
257257
258258
:return: The recipients of this CreateAlertRuleDetails.
@@ -264,7 +264,7 @@ def recipients(self):
264264
def recipients(self, recipients):
265265
"""
266266
Sets the recipients of this CreateAlertRuleDetails.
267-
The audience that will received the alert when it triggers.
267+
The audience that will receive the alert when it triggers. An empty string is interpreted as null.
268268
269269
270270
:param recipients: The recipients of this CreateAlertRuleDetails.

src/oci/budget/models/create_budget_details.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -306,7 +306,7 @@ def targets(self):
306306
Gets the targets of this CreateBudgetDetails.
307307
The list of targets on which the budget is applied.
308308
If targetType is \"COMPARTMENT\", targets contains list of compartment OCIDs.
309-
If targetType is \"TAG\", targets contains list of tag identifiers in the form of \"{tagNamespace}.{tagKey}.{tagValue}\".
309+
If targetType is \"TAG\", targets contains list of cost tracking tag identifiers in the form of \"{tagNamespace}.{tagKey}.{tagValue}\".
310310
Curerntly, the array should contain EXACT ONE item.
311311
312312
@@ -321,7 +321,7 @@ def targets(self, targets):
321321
Sets the targets of this CreateBudgetDetails.
322322
The list of targets on which the budget is applied.
323323
If targetType is \"COMPARTMENT\", targets contains list of compartment OCIDs.
324-
If targetType is \"TAG\", targets contains list of tag identifiers in the form of \"{tagNamespace}.{tagKey}.{tagValue}\".
324+
If targetType is \"TAG\", targets contains list of cost tracking tag identifiers in the form of \"{tagNamespace}.{tagKey}.{tagValue}\".
325325
Curerntly, the array should contain EXACT ONE item.
326326
327327

src/oci/budget/models/update_alert_rule_details.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -228,7 +228,7 @@ def threshold_type(self, threshold_type):
228228
def recipients(self):
229229
"""
230230
Gets the recipients of this UpdateAlertRuleDetails.
231-
The audience that will received the alert when it triggers.
231+
The audience that will receive the alert when it triggers. If you need to clear out this value, please pass in an empty string instead of null.
232232
233233
234234
:return: The recipients of this UpdateAlertRuleDetails.
@@ -240,7 +240,7 @@ def recipients(self):
240240
def recipients(self, recipients):
241241
"""
242242
Sets the recipients of this UpdateAlertRuleDetails.
243-
The audience that will received the alert when it triggers.
243+
The audience that will receive the alert when it triggers. If you need to clear out this value, please pass in an empty string instead of null.
244244
245245
246246
:param recipients: The recipients of this UpdateAlertRuleDetails.

src/oci/config.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -74,7 +74,7 @@ def from_file(file_location=DEFAULT_LOCATION, profile_name=DEFAULT_PROFILE):
7474

7575
parser = configparser.ConfigParser(interpolation=None)
7676
if not parser.read(expanded_file_location):
77-
raise ConfigFileNotFound("Could not find config file at {}".format(expanded_file_location))
77+
raise ConfigFileNotFound("Could not find config file at {}, please follow the instructions in the link to setup the config file https://docs.cloud.oracle.com/en-us/iaas/Content/API/Concepts/sdkconfig.htm".format(expanded_file_location))
7878

7979
if profile_name not in parser:
8080
raise ProfileNotFound("Profile '{}' not found in config file {}".format(profile_name, expanded_file_location))

src/oci/version.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
11
# coding: utf-8
22
# Copyright (c) 2016, 2020, Oracle and/or its affiliates. All rights reserved.
33

4-
__version__ = "2.10.7"
4+
__version__ = "2.11.0"

0 commit comments

Comments
 (0)