From a07eac233cfe5cae224fc8f68e02ebafd890246c Mon Sep 17 00:00:00 2001 From: tengqm Date: Thu, 15 Jan 2015 15:59:58 +0800 Subject: [PATCH] Remove old-style object models We are gonna use openstacksdk directly in this client module. --- senlinclient/v1/__init__.py | 18 ------------- senlinclient/v1/actions.py | 19 -------------- senlinclient/v1/build_info.py | 13 --------- senlinclient/v1/clusters.py | 45 -------------------------------- senlinclient/v1/events.py | 14 ---------- senlinclient/v1/nodes.py | 19 -------------- senlinclient/v1/policies.py | 13 --------- senlinclient/v1/policy_types.py | 13 --------- senlinclient/v1/profile_types.py | 13 --------- senlinclient/v1/profiles.py | 17 ------------ 10 files changed, 184 deletions(-) delete mode 100644 senlinclient/v1/actions.py delete mode 100644 senlinclient/v1/build_info.py delete mode 100644 senlinclient/v1/clusters.py delete mode 100644 senlinclient/v1/events.py delete mode 100644 senlinclient/v1/nodes.py delete mode 100644 senlinclient/v1/policies.py delete mode 100644 senlinclient/v1/policy_types.py delete mode 100644 senlinclient/v1/profile_types.py delete mode 100644 senlinclient/v1/profiles.py diff --git a/senlinclient/v1/__init__.py b/senlinclient/v1/__init__.py index ab24f848..e69de29b 100644 --- a/senlinclient/v1/__init__.py +++ b/senlinclient/v1/__init__.py @@ -1,18 +0,0 @@ -# Copyright 2012 OpenStack Foundation -# 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. - -__all__ = ['Client'] - -from senlinclient.v1.client import Client # noqa diff --git a/senlinclient/v1/actions.py b/senlinclient/v1/actions.py deleted file mode 100644 index 69549a34..00000000 --- a/senlinclient/v1/actions.py +++ /dev/null @@ -1,19 +0,0 @@ -# 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. - -import six -from six.moves.urllib import parse - -from senlinclient.openstack.common.apiclient import base - - - diff --git a/senlinclient/v1/build_info.py b/senlinclient/v1/build_info.py deleted file mode 100644 index 28894c20..00000000 --- a/senlinclient/v1/build_info.py +++ /dev/null @@ -1,13 +0,0 @@ -# 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. - - diff --git a/senlinclient/v1/clusters.py b/senlinclient/v1/clusters.py deleted file mode 100644 index a538954a..00000000 --- a/senlinclient/v1/clusters.py +++ /dev/null @@ -1,45 +0,0 @@ -# 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 openstack import resource -from senlinclient.openstack.clustering import clustering_service - - -class Cluster(resource.Resource): - resource_key = 'cluster' - resources_key = 'clusters' - base_path = '/clusters' - service = clustering_service.ClusteringService() - - # capabilities - allow_create = True - allow_retrieve = True - allow_update = True - allow_delete = True - allow_list = True - - # Properties - links = resource.prop('links', type=dict) - name = resource.prop('name') - profile_id = resource.prop('profile_id') - user = resource.prop('user') - project = resource.prop('project') - domain = resource.prop('domain') - parent = resource.prop('parent') - created_time = resource.prop('created_time') - updated_time = resource.prop('updated_time') - deleted_time = resource.prop('deleted_time') - size = resource.prop('size', type=int) - timeout = resource.prop('timeout') - status = resource.prop('status') - status_reason = resource.prop('status_reason') - tags = resource.prop('tags', type=dict) diff --git a/senlinclient/v1/events.py b/senlinclient/v1/events.py deleted file mode 100644 index 65ff4ff0..00000000 --- a/senlinclient/v1/events.py +++ /dev/null @@ -1,14 +0,0 @@ -# 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. - - - diff --git a/senlinclient/v1/nodes.py b/senlinclient/v1/nodes.py deleted file mode 100644 index 372d8de8..00000000 --- a/senlinclient/v1/nodes.py +++ /dev/null @@ -1,19 +0,0 @@ -# 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. - -import six -from six.moves.urllib import parse - -from senlinclient.openstack.common.apiclient import base - - - diff --git a/senlinclient/v1/policies.py b/senlinclient/v1/policies.py deleted file mode 100644 index 28894c20..00000000 --- a/senlinclient/v1/policies.py +++ /dev/null @@ -1,13 +0,0 @@ -# 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. - - diff --git a/senlinclient/v1/policy_types.py b/senlinclient/v1/policy_types.py deleted file mode 100644 index 28894c20..00000000 --- a/senlinclient/v1/policy_types.py +++ /dev/null @@ -1,13 +0,0 @@ -# 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. - - diff --git a/senlinclient/v1/profile_types.py b/senlinclient/v1/profile_types.py deleted file mode 100644 index 28894c20..00000000 --- a/senlinclient/v1/profile_types.py +++ /dev/null @@ -1,13 +0,0 @@ -# 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. - - diff --git a/senlinclient/v1/profiles.py b/senlinclient/v1/profiles.py deleted file mode 100644 index 67881a5a..00000000 --- a/senlinclient/v1/profiles.py +++ /dev/null @@ -1,17 +0,0 @@ -# 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. - -import six -from six.moves.urllib import parse - -from senlinclient.openstack.common.apiclient import base -