Skip to content

Commit 99f48b3

Browse files
author
Elias Nygren
authored
Merge pull request #18 from UpCloudLtd/0.3.5-devel
0.3.5 devel
2 parents 2ee612b + 35d7ee7 commit 99f48b3

File tree

3 files changed

+4
-16
lines changed

3 files changed

+4
-16
lines changed

setup.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,15 +4,15 @@
44

55
setup(
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='[email protected]',
1111
maintainer='Elias Nygren',
1212
maintainer_email='[email protected]',
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',

upcloud_api/__init__.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@
99
from future import standard_library
1010
standard_library.install_aliases()
1111

12-
__version__ = "0.3.4"
12+
__version__ = "0.3.5"
1313
__author__ = "Elias Nygren"
1414
__author_email__ = "[email protected]"
1515
__license__ = "MIT"

upcloud_api/firewall.py

Lines changed: 1 addition & 13 deletions
Original file line numberDiff line numberDiff 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.

0 commit comments

Comments
 (0)