summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorying.yunlong <ying.yunlong@zte.com.cn>2017-09-25 19:03:22 +0800
committerying.yunlong <ying.yunlong@zte.com.cn>2017-09-25 19:03:22 +0800
commitc255dafad5527e19a79e8ec180d0190d2f0dcd55 (patch)
tree6a36b27000cdf9ff07e79770ee18fa91e19988e0
parentab39ec3cb1b62195ee9916c5baf0ea583abfacfa (diff)
Fix vfc-catalog pep8 E301/E241/E262/E265 issue
Change-Id: I2835a70af5d873a237e1c9b9cbd60b61b619cb28 Issue-ID: VFC-450 Signed-off-by: ying.yunlong <ying.yunlong@zte.com.cn>
-rw-r--r--catalog/pub/database/models.py26
-rw-r--r--catalog/pub/msapi/sdc.py1
-rw-r--r--catalog/pub/utils/jobutil.py4
-rw-r--r--tox.ini2
4 files changed, 18 insertions, 15 deletions
diff --git a/catalog/pub/database/models.py b/catalog/pub/database/models.py
index a5747a54..50976f71 100644
--- a/catalog/pub/database/models.py
+++ b/catalog/pub/database/models.py
@@ -31,34 +31,35 @@ class NSPackageModel(models.Model):
userDefinedData = models.TextField(db_column='USERDEFINEDDATA', max_length=1024, blank=True, null=True) # userDefinedData
localFilePath = models.CharField(db_column='LOCALFILEPATH', max_length=300, null=True, blank=True)
nsdModel = models.TextField(db_column='NSDMODEL', max_length=65535, null=True, blank=True)
+
class Meta:
db_table = 'CATALOG_NSPACKAGE'
class VnfPackageModel(models.Model):
- #uuid = models.CharField(db_column='UUID', primary_key=True, max_length=255)
- vnfPackageId = models.CharField(db_column='VNFPACKAGEID', primary_key=True, max_length=50) #onboardedVnfPkgInfoId
+ # uuid = models.CharField(db_column='UUID', primary_key=True, max_length=255)
+ vnfPackageId = models.CharField(db_column='VNFPACKAGEID', primary_key=True, max_length=50) # onboardedVnfPkgInfoId
vnfPackageUri = models.CharField(db_column='VNFPACKAGEURI', max_length=300, null=True, blank=True) # downloadUri
SdcCSARUri = models.CharField(db_column='SDCCSARURI', max_length=300, null=True, blank=True) # SdcCSARUri
checksum = models.CharField(db_column='CHECKSUM', max_length=50, null=True, blank=True) # checksum
operationalState = models.CharField(db_column='OPERATIONALSTATE', max_length=20, blank=True,null=True) # operationalState
usageState = models.CharField(db_column='USAGESTATE', max_length=20, blank=True, null=True) # usageState
deletionPending = models.CharField(db_column='DELETIONPENDING', max_length=20, blank=True, null=True) # deletionPending
- vnfdId = models.CharField(db_column='VNFDID', max_length=50,blank=True, null=True) #vnfdId
+ vnfdId = models.CharField(db_column='VNFDID', max_length=50,blank=True, null=True) # vnfdId
vnfVendor = models.CharField(db_column='VENDOR', max_length=50,blank=True, null=True) # vnfProvider
- vnfdProductName = models.CharField(db_column='VNFDPRODUCTNAME', max_length=50,blank=True, null=True) #vnfProductName
- vnfdVersion = models.CharField(db_column='VNFDVERSION', max_length=20,blank=True, null=True) #vnfdVersion
- vnfSoftwareVersion = models.CharField(db_column='VNFSOFTWAREVERSION', max_length=20,blank=True, null=True) #vnfSoftwareVersion
+ vnfdProductName = models.CharField(db_column='VNFDPRODUCTNAME', max_length=50,blank=True, null=True) # vnfProductName
+ vnfdVersion = models.CharField(db_column='VNFDVERSION', max_length=20,blank=True, null=True) # vnfdVersion
+ vnfSoftwareVersion = models.CharField(db_column='VNFSOFTWAREVERSION', max_length=20,blank=True, null=True) # vnfSoftwareVersion
userDefinedData = models.TextField(db_column='USERDEFINEDDATA', max_length=1024, blank=True, null=True) # userDefinedData
localFilePath = models.CharField(db_column='LOCALFILEPATH', max_length=300, null=True, blank=True)
vnfdModel = models.TextField(db_column='VNFDMODEL', max_length=65535, blank=True, null=True) # vnfd
+
class Meta:
db_table = 'CATALOG_VNFPACKAGE'
class SoftwareImageModel(models.Model):
- imageid = models.CharField(db_column='IMAGEID', primary_key=True, max_length=50)
- diskFormat = models.CharField(db_column='DISKFORMAT', max_length=10)
+ imageid = models.CharField(db_column='IMAGEID', primary_key=True, max_length=50)
containerFormat = models.CharField(db_column='CONTAINERFORMAT', max_length=20)
diskFormat = models.CharField(db_column='DISKFORMAT', max_length=20)
mindisk = models.CharField(db_column='MINDISK', max_length=20)
@@ -68,10 +69,11 @@ class SoftwareImageModel(models.Model):
filePath = models.CharField(db_column='FILEPATH', max_length=300)
status = models.CharField(db_column='STATUS', max_length=10)
vimid = models.CharField(db_column='VIMID', max_length=50)
- #filetype = models.CharField(db_column='FILETYPE', max_length=2)
- #vimuser = models.CharField(db_column='VIMUSER', max_length=50)
- #tenant = models.CharField(db_column='TENANT', max_length=50)
- #purpose = models.CharField(db_column='PURPOSE', max_length=1000)
+ # filetype = models.CharField(db_column='FILETYPE', max_length=2)
+ # vimuser = models.CharField(db_column='VIMUSER', max_length=50)
+ # tenant = models.CharField(db_column='TENANT', max_length=50)
+ # purpose = models.CharField(db_column='PURPOSE', max_length=1000)
+
class Meta:
db_table = 'CATALOG_SOFTWAREIMAGEMODEL'
diff --git a/catalog/pub/msapi/sdc.py b/catalog/pub/msapi/sdc.py
index 2eb8f110..7a046396 100644
--- a/catalog/pub/msapi/sdc.py
+++ b/catalog/pub/msapi/sdc.py
@@ -39,6 +39,7 @@ def call_sdc(resource, method, content=''):
content=content,
additional_headers=additional_headers)
+
"""
sample of return value
[
diff --git a/catalog/pub/utils/jobutil.py b/catalog/pub/utils/jobutil.py
index 79f26122..eb19c18d 100644
--- a/catalog/pub/utils/jobutil.py
+++ b/catalog/pub/utils/jobutil.py
@@ -43,7 +43,7 @@ class JobUtil(object):
@staticmethod
def query_job_status(job_id, index_id=-1):
- #logger.info("Query job status, jobid =[%s], responseid [%d]" % (job_id, index_id))
+ # logger.info("Query job status, jobid =[%s], responseid [%d]" % (job_id, index_id))
jobs = []
if index_id < 0:
row = JobStatusModel.objects.filter(jobid=job_id).order_by("-indexid").first()
@@ -53,7 +53,7 @@ class JobUtil(object):
[jobs.append(job) for job in JobStatusModel.objects.filter(jobid=job_id).order_by("-indexid")
if job.indexid > index_id]
- #logger.info("Query job status, rows=%s" % str(jobs))
+ # logger.info("Query job status, rows=%s" % str(jobs))
return jobs
@staticmethod
diff --git a/tox.ini b/tox.ini
index 1ce9e868..d44202d2 100644
--- a/tox.ini
+++ b/tox.ini
@@ -6,7 +6,7 @@ skipsdist = true
downloadcache = ~/cache/pip
[flake8]
-ignore = E501,E231,E128,W291,W293,E711,E303,E701,E225,E303,E302,E126,E203,F841,E123,E125,W391,E262,E265,E301,E241,E305
+ignore = E501,E231,E128,W291,W293,E711,E303,E701,E225,E303,E302,E126,E203,F841,E123,E125,W391
exclude = ./venv-tox,./.tox
[testenv]