Clean imports in code
In some part in the code we import objects. In the Openstack style guidelines they recommend to import only modules. http://docs.openstack.org/developer/hacking/#imports Change-Id: Ibd3464b52fd70bbfe77ce35cdffbbef95de24b12
This commit is contained in:
parent
1fe54a5433
commit
b6f2257118
@ -13,10 +13,10 @@ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|||||||
See the License for the specific language governing permissions and
|
See the License for the specific language governing permissions and
|
||||||
limitations under the License.
|
limitations under the License.
|
||||||
"""
|
"""
|
||||||
from functionaltests.api.v1.models.base_models import BaseModel
|
from functionaltests.api.v1.models import base_models
|
||||||
|
|
||||||
|
|
||||||
class AclModel(BaseModel):
|
class AclModel(base_models.BaseModel):
|
||||||
|
|
||||||
def __init__(self, acl_ref=None, read=None):
|
def __init__(self, acl_ref=None, read=None):
|
||||||
super(AclModel, self).__init__()
|
super(AclModel, self).__init__()
|
||||||
|
@ -14,10 +14,10 @@ See the License for the specific language governing permissions and
|
|||||||
limitations under the License.
|
limitations under the License.
|
||||||
"""
|
"""
|
||||||
|
|
||||||
from functionaltests.api.v1.models.base_models import BaseModel
|
from functionaltests.api.v1.models import base_models
|
||||||
|
|
||||||
|
|
||||||
class CAModel(BaseModel):
|
class CAModel(base_models.BaseModel):
|
||||||
|
|
||||||
def __init__(self, expiration=None, ca_id=None, ca_ref=None,
|
def __init__(self, expiration=None, ca_id=None, ca_ref=None,
|
||||||
status=None, updated=None, created=None, plugin_name=None,
|
status=None, updated=None, created=None, plugin_name=None,
|
||||||
|
@ -13,10 +13,10 @@ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|||||||
See the License for the specific language governing permissions and
|
See the License for the specific language governing permissions and
|
||||||
limitations under the License.
|
limitations under the License.
|
||||||
"""
|
"""
|
||||||
from functionaltests.api.v1.models.base_models import BaseModel
|
from functionaltests.api.v1.models import base_models
|
||||||
|
|
||||||
|
|
||||||
class ConsumerModel(BaseModel):
|
class ConsumerModel(base_models.BaseModel):
|
||||||
|
|
||||||
def __init__(self, name=None, URL=None, created=None, updated=None,
|
def __init__(self, name=None, URL=None, created=None, updated=None,
|
||||||
status=None):
|
status=None):
|
||||||
|
@ -13,17 +13,17 @@ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|||||||
See the License for the specific language governing permissions and
|
See the License for the specific language governing permissions and
|
||||||
limitations under the License.
|
limitations under the License.
|
||||||
"""
|
"""
|
||||||
from functionaltests.api.v1.models.base_models import BaseModel
|
from functionaltests.api.v1.models import base_models
|
||||||
|
|
||||||
|
|
||||||
class SecretRefModel(BaseModel):
|
class SecretRefModel(base_models.BaseModel):
|
||||||
|
|
||||||
def __init__(self, name=None, secret_ref=None):
|
def __init__(self, name=None, secret_ref=None):
|
||||||
self.name = name
|
self.name = name
|
||||||
self.secret_ref = secret_ref
|
self.secret_ref = secret_ref
|
||||||
|
|
||||||
|
|
||||||
class ContainerModel(BaseModel):
|
class ContainerModel(base_models.BaseModel):
|
||||||
|
|
||||||
def __init__(self, name=None, type=None, secret_refs=[],
|
def __init__(self, name=None, type=None, secret_refs=[],
|
||||||
container_ref=None, consumers=None, status=None,
|
container_ref=None, consumers=None, status=None,
|
||||||
|
@ -14,10 +14,10 @@ See the License for the specific language governing permissions and
|
|||||||
limitations under the License.
|
limitations under the License.
|
||||||
"""
|
"""
|
||||||
|
|
||||||
from functionaltests.api.v1.models.base_models import BaseModel
|
from functionaltests.api.v1.models import base_models
|
||||||
|
|
||||||
|
|
||||||
class QuotasModel(BaseModel):
|
class QuotasModel(base_models.BaseModel):
|
||||||
|
|
||||||
def __init__(self, secrets=None, orders=None, containers=None,
|
def __init__(self, secrets=None, orders=None, containers=None,
|
||||||
consumers=None, cas=None):
|
consumers=None, cas=None):
|
||||||
@ -29,7 +29,7 @@ class QuotasModel(BaseModel):
|
|||||||
self.cas = cas
|
self.cas = cas
|
||||||
|
|
||||||
|
|
||||||
class QuotasResponseModel(BaseModel):
|
class QuotasResponseModel(base_models.BaseModel):
|
||||||
|
|
||||||
def __init__(self, quotas=None):
|
def __init__(self, quotas=None):
|
||||||
super(QuotasResponseModel, self).__init__()
|
super(QuotasResponseModel, self).__init__()
|
||||||
@ -41,7 +41,7 @@ class QuotasResponseModel(BaseModel):
|
|||||||
return cls(quotas=quotas)
|
return cls(quotas=quotas)
|
||||||
|
|
||||||
|
|
||||||
class ProjectQuotaRequestModel(BaseModel):
|
class ProjectQuotaRequestModel(base_models.BaseModel):
|
||||||
|
|
||||||
def __init__(self, project_quotas=None):
|
def __init__(self, project_quotas=None):
|
||||||
super(ProjectQuotaRequestModel, self).__init__()
|
super(ProjectQuotaRequestModel, self).__init__()
|
||||||
@ -53,14 +53,14 @@ class ProjectQuotaRequestModel(BaseModel):
|
|||||||
return cls(project_quotas=project_quotas)
|
return cls(project_quotas=project_quotas)
|
||||||
|
|
||||||
|
|
||||||
class ProjectQuotaOneModel(BaseModel):
|
class ProjectQuotaOneModel(base_models.BaseModel):
|
||||||
|
|
||||||
def __init__(self, project_quotas=None):
|
def __init__(self, project_quotas=None):
|
||||||
super(ProjectQuotaOneModel, self).__init__()
|
super(ProjectQuotaOneModel, self).__init__()
|
||||||
self.project_quotas = QuotasModel(**project_quotas)
|
self.project_quotas = QuotasModel(**project_quotas)
|
||||||
|
|
||||||
|
|
||||||
class ProjectQuotaListItemModel(BaseModel):
|
class ProjectQuotaListItemModel(base_models.BaseModel):
|
||||||
|
|
||||||
def __init__(self, project_id=None, project_quotas=None):
|
def __init__(self, project_id=None, project_quotas=None):
|
||||||
super(ProjectQuotaListItemModel, self).__init__()
|
super(ProjectQuotaListItemModel, self).__init__()
|
||||||
@ -68,7 +68,7 @@ class ProjectQuotaListItemModel(BaseModel):
|
|||||||
self.project_quotas = QuotasModel(**project_quotas)
|
self.project_quotas = QuotasModel(**project_quotas)
|
||||||
|
|
||||||
|
|
||||||
class ProjectQuotaListModel(BaseModel):
|
class ProjectQuotaListModel(base_models.BaseModel):
|
||||||
|
|
||||||
def __init__(self, project_quotas=None):
|
def __init__(self, project_quotas=None):
|
||||||
super(ProjectQuotaListModel, self).__init__()
|
super(ProjectQuotaListModel, self).__init__()
|
||||||
|
@ -14,10 +14,10 @@ See the License for the specific language governing permissions and
|
|||||||
limitations under the License.
|
limitations under the License.
|
||||||
"""
|
"""
|
||||||
|
|
||||||
from functionaltests.api.v1.models.base_models import BaseModel
|
from functionaltests.api.v1.models import base_models
|
||||||
|
|
||||||
|
|
||||||
class SecretModel(BaseModel):
|
class SecretModel(base_models.BaseModel):
|
||||||
|
|
||||||
def __init__(self, name=None, expiration=None, algorithm=None,
|
def __init__(self, name=None, expiration=None, algorithm=None,
|
||||||
secret_ref=None, bit_length=None, mode=None, secret_type=None,
|
secret_ref=None, bit_length=None, mode=None, secret_type=None,
|
||||||
|
Loading…
Reference in New Issue
Block a user