liusheng 9378e2da58 Add support for node list command
Change-Id: Ie21f6277fa920834a52a5a67067c74a5c55eb787
2017-08-15 03:23:30 +00:00

29 lines
861 B
Python

# Copyright 2017 Huawei, Inc. All rights reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License"); you may
# not use this file except in compliance with the License. You may obtain
# a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
# WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
# License for the specific language governing permissions and limitations
# under the License.
#
from moganclient.common import base
class Node(base.Resource):
pass
class NodeManager(base.ManagerWithFind):
resource_class = Node
def list(self):
url = '/nodes'
return self._list(url, response_key='nodes')