Move all V2 Controllers to inherit from the v2
Previously some v2 controllers inherited from the base client.Controller. Fixes have been added to the V2Controller that allow it to work with lists + next links. Change-Id: I23b4ecc52b71cafc4085ab6586164bd03ac6afea
This commit is contained in:
parent
9011aac4cc
commit
255523c63d
@ -40,4 +40,4 @@ class V2Controller(client.Controller):
|
||||
|
||||
return data
|
||||
|
||||
return body
|
||||
return body
|
||||
|
@ -13,10 +13,10 @@
|
||||
# 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 designateclient import client
|
||||
from designateclient.v2.base import V2Controller
|
||||
|
||||
|
||||
class BlacklistController(client.Controller):
|
||||
class BlacklistController(V2Controller):
|
||||
def create(self, pattern, description=None):
|
||||
data = {
|
||||
'pattern': pattern,
|
||||
|
@ -13,9 +13,9 @@
|
||||
# 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 designateclient import client
|
||||
from designateclient.v2.base import V2Controller
|
||||
|
||||
|
||||
class LimitController(client.Controller):
|
||||
class LimitController(V2Controller):
|
||||
def get(self):
|
||||
return self._get('/limits')
|
||||
|
@ -13,11 +13,11 @@
|
||||
# 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 designateclient import client
|
||||
from designateclient.v2.base import V2Controller
|
||||
from designateclient.v2 import utils as v2_utils
|
||||
|
||||
|
||||
class NameServerController(client.Controller):
|
||||
class NameServerController(V2Controller):
|
||||
def list(self, zone):
|
||||
zone = v2_utils.resolve_by_name(self.client.zones.list, zone)
|
||||
|
||||
|
@ -13,10 +13,10 @@
|
||||
# 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 designateclient import client
|
||||
from designateclient.v2.base import V2Controller
|
||||
|
||||
|
||||
class FloatingIPController(client.Controller):
|
||||
class FloatingIPController(V2Controller):
|
||||
def set(self, floatingip_id, ptrdname, description=None, ttl=None):
|
||||
data = {
|
||||
'ptrdname': ptrdname
|
||||
|
Loading…
Reference in New Issue
Block a user