Skip to content

Commit 1223237

Browse files
committed
Add set_maintenance method
1 parent 3d28930 commit 1223237

File tree

2 files changed

+4
-1
lines changed

2 files changed

+4
-1
lines changed

setup.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@
66

77
setup(
88
name='spectrum-client',
9-
version='0.0.7',
9+
version='0.0.8',
1010
description='CA Spectrum Web Services API wrapper',
1111
long_description=README,
1212
long_description_content_type='text/markdown',

spectrum_client/spectrum.py

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -87,3 +87,6 @@ def update_attribute(self, model_handle, attr_id, value):
8787
params = {'attr': hex(attr_id), 'val': value}
8888
res = requests.put(url, params=params, auth=self.auth)
8989
self._parse_update(res)
90+
91+
def set_maintenance(self, model_handle, on=True):
92+
return self.update_attribute(model_handle, 0x1295d, str(not on))

0 commit comments

Comments
 (0)