File tree Expand file tree Collapse file tree 3 files changed +4
-16
lines changed
Expand file tree Collapse file tree 3 files changed +4
-16
lines changed Original file line number Diff line number Diff line change 44
55setup (
66 name = 'upcloud-api' ,
7- version = '0.3.4 ' ,
7+ version = '0.3.5 ' ,
88 description = 'UpCloud API Client' ,
99 author = 'Elias Nygren' ,
1010 author_email = 'elias.nygren@upcloud.com' ,
1111 maintainer = 'Elias Nygren' ,
1212 maintainer_email = 'elias.nygren@upcloud.com' ,
1313 url = 'https://github.com/UpCloudLtd/upcloud-python-api' ,
1414 packages = ['upcloud_api' , 'upcloud_api.cloud_manager' ],
15- download = 'https://github.com/UpCloudLtd/upcloud-python-api/tarball/v0.3.3 ' ,
15+ download = 'https://github.com/UpCloudLtd/upcloud-python-api/tarball/v0.3.5 ' ,
1616 license = 'MIT' ,
1717 install_requires = [
1818 'future==0.14.3' ,
Original file line number Diff line number Diff line change 99from future import standard_library
1010standard_library .install_aliases ()
1111
12- __version__ = "0.3.4 "
12+ __version__ = "0.3.5 "
1313__author__ = "Elias Nygren"
1414__author_email__ = "elias.nygren@upcloud.com"
1515__license__ = "MIT"
Original file line number Diff line number Diff line change @@ -18,6 +18,7 @@ class FirewallRule(object):
1818 'action' : 'drop' ,
1919 'direction' : 'in' ,
2020 'family' : 'IPv4' ,
21+ 'comment' : '' ,
2122 'destination_address_end' : None ,
2223 'destination_address_start' : None ,
2324 'destination_port_end' : None ,
@@ -40,9 +41,6 @@ def __init__(self, **kwargs):
4041
4142 # set object attributes from params
4243 for key in kwargs :
43- if key not in self .attributes :
44- self ._invalid_key_err (key )
45-
4644 setattr (self , key , kwargs [key ])
4745
4846 # set defaults (if need be) where the default is not None
@@ -82,16 +80,6 @@ def destroy(self):
8280 )
8381
8482
85- def _invalid_key_err (self , key ):
86- """
87- Raise exception on invalid parameters given to __init__.
88- """
89- attr_list = list (self .attributes .keys ())
90- raise Exception (
91- "invalid parameter to FirewallRule, '{key}' is not in {attributes}"
92- .format (key = key , attributes = attr_list )
93- )
94-
9583 def _associate_with_server (self , server ):
9684 """
9785 Internal function used by Server to associate itself with the FirewallRule.
You can’t perform that action at this time.
0 commit comments