Merge "Move all V2 Controllers to inherit from the v2" into stable/mitaka

This commit is contained in:
Jenkins
2016-03-29 17:06:59 +00:00
committed by Gerrit Code Review
5 changed files with 9 additions and 9 deletions

View File

@@ -40,4 +40,4 @@ class V2Controller(client.Controller):
return data return data
return body return body

View File

@@ -13,10 +13,10 @@
# WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the # WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
# License for the specific language governing permissions and limitations # License for the specific language governing permissions and limitations
# under the License. # 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): def create(self, pattern, description=None):
data = { data = {
'pattern': pattern, 'pattern': pattern,

View File

@@ -13,9 +13,9 @@
# WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the # WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
# License for the specific language governing permissions and limitations # License for the specific language governing permissions and limitations
# under the License. # under the License.
from designateclient import client from designateclient.v2.base import V2Controller
class LimitController(client.Controller): class LimitController(V2Controller):
def get(self): def get(self):
return self._get('/limits') return self._get('/limits')

View File

@@ -13,11 +13,11 @@
# WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the # WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
# License for the specific language governing permissions and limitations # License for the specific language governing permissions and limitations
# under the License. # under the License.
from designateclient import client from designateclient.v2.base import V2Controller
from designateclient.v2 import utils as v2_utils from designateclient.v2 import utils as v2_utils
class NameServerController(client.Controller): class NameServerController(V2Controller):
def list(self, zone): def list(self, zone):
zone = v2_utils.resolve_by_name(self.client.zones.list, zone) zone = v2_utils.resolve_by_name(self.client.zones.list, zone)

View File

@@ -13,10 +13,10 @@
# WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the # WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
# License for the specific language governing permissions and limitations # License for the specific language governing permissions and limitations
# under the License. # 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): def set(self, floatingip_id, ptrdname, description=None, ttl=None):
data = { data = {
'ptrdname': ptrdname 'ptrdname': ptrdname