diff options
author | Lars Wirzenius <liw@liw.fi> | 2017-11-18 20:37:53 +0100 |
---|---|---|
committer | Lars Wirzenius <liw@liw.fi> | 2017-11-18 20:37:53 +0100 |
commit | 4e45654544c65741de49f2929664de84a76712e0 (patch) | |
tree | 8822e6132f239ec187cd9aeca4447aeeb906e8f8 /ick2/workerapi.py | |
parent | 792c059b9997b9e98ee12b6105b778b6d5a9e0ca (diff) | |
download | ick2-4e45654544c65741de49f2929664de84a76712e0.tar.gz |
Refactor: move WorkerAPI to its own module
Diffstat (limited to 'ick2/workerapi.py')
-rw-r--r-- | ick2/workerapi.py | 25 |
1 files changed, 25 insertions, 0 deletions
diff --git a/ick2/workerapi.py b/ick2/workerapi.py new file mode 100644 index 0000000..5a7e835 --- /dev/null +++ b/ick2/workerapi.py @@ -0,0 +1,25 @@ +# Copyright (C) 2017 Lars Wirzenius +# This program is free software: you can redistribute it and/or modify +# it under the terms of the GNU Affero General Public License as published by +# the Free Software Foundation, either version 3 of the License, or +# (at your option) any later version. +# +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU Affero General Public License for more details. +# +# You should have received a copy of the GNU Affero General Public License +# along with this program. If not, see <http://www.gnu.org/licenses/>. + + +import ick2 + + +class WorkerAPI(ick2.ResourceApiBase): # pragma: no cover + + def __init__(self, state): + super().__init__('workers', state) + + def get_resource_name(self, resource): + return resource['worker'] |