Merge "Move some useful code outside v1"

This commit is contained in:
Jenkins 2014-11-18 13:07:41 +00:00 committed by Gerrit Code Review
commit 9cf81c9bf8
9 changed files with 18 additions and 17 deletions

View File

@ -15,6 +15,7 @@
# under the License. # under the License.
import abc import abc
import six import six
@ -56,4 +57,4 @@ class CrudController(Controller):
def delete(self, *args, **kw): def delete(self, *args, **kw):
""" """
Delete a resource Delete a resource
""" """

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.v1.base import Controller from designateclient import client
class DiagnosticsController(Controller): class DiagnosticsController(client.Controller):
def ping(self, service, host): def ping(self, service, host):
""" """
Ping a service on a given host Ping a service on a given host

View File

@ -15,8 +15,8 @@
# under the License. # under the License.
import json import json
from designateclient import client
from designateclient import utils from designateclient import utils
from designateclient.v1.base import CrudController
from designateclient import warlock from designateclient import warlock
@ -24,7 +24,7 @@ Domain = warlock.model_factory(utils.load_schema('v1', 'domain'))
Server = warlock.model_factory(utils.load_schema('v1', 'server')) Server = warlock.model_factory(utils.load_schema('v1', 'server'))
class DomainsController(CrudController): class DomainsController(client.CrudController):
def list(self): def list(self):
""" """
Retrieve a list of domains Retrieve a list of domains

View File

@ -15,10 +15,10 @@
# under the License. # under the License.
import json import json
from designateclient.v1.base import Controller from designateclient import client
class QuotasController(Controller): class QuotasController(client.Controller):
def get(self, tenant_id): def get(self, tenant_id):
""" """
Ping a service on a given host Ping a service on a given host

View File

@ -16,8 +16,8 @@
import json import json
from designateclient import client
from designateclient import utils from designateclient import utils
from designateclient.v1.base import CrudController
from designateclient.v1.domains import Domain from designateclient.v1.domains import Domain
from designateclient import warlock from designateclient import warlock
@ -25,7 +25,7 @@ from designateclient import warlock
Record = warlock.model_factory(utils.load_schema('v1', 'record')) Record = warlock.model_factory(utils.load_schema('v1', 'record'))
class RecordsController(CrudController): class RecordsController(client.CrudController):
def list(self, domain): def list(self, domain):
""" """
Retrieve a list of records Retrieve a list of records

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.v1.base import Controller from designateclient import client
class ReportsController(Controller): class ReportsController(client.Controller):
def count_all(self): def count_all(self):
""" """
Domain, Records and tenant total count Domain, Records and tenant total count

View File

@ -16,15 +16,15 @@
import json import json
from designateclient import client
from designateclient import utils from designateclient import utils
from designateclient.v1.base import CrudController
from designateclient import warlock from designateclient import warlock
Server = warlock.model_factory(utils.load_schema('v1', 'server')) Server = warlock.model_factory(utils.load_schema('v1', 'server'))
class ServersController(CrudController): class ServersController(client.CrudController):
def list(self): def list(self):
""" """
Retrieve a list of servers Retrieve a list of servers

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.v1.base import Controller from designateclient import client
class SyncController(Controller): class SyncController(client.Controller):
def sync_all(self): def sync_all(self):
""" """
Sync Everything Sync Everything

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.v1.base import Controller from designateclient import client
class TouchController(Controller): class TouchController(client.Controller):
def domain(self, domain_id): def domain(self, domain_id):
""" """
Touch a single Domain Touch a single Domain