Remove unused variables

Defalut variablies is not used in function, remove them.

Change-Id: Iccc097d9f15b1b8240f4eb75a4d32619b26ed777
This commit is contained in:
guo yunxian 2016-12-08 17:16:32 +08:00
parent 7489bb6430
commit 7e04d2c39d

View File

@ -224,7 +224,7 @@ class Uuid(object):
type_name = 'Uuid'
@classmethod
def validate(cls, value, default=None):
def validate(cls, value):
if not uuidutils.is_uuid_like(value):
raise exception.InvalidUUID(uuid=value)
return value
@ -273,7 +273,7 @@ class DateTime(object):
type_name = "DateTime"
@classmethod
def validate(cls, value, default=None):
def validate(cls, value):
if value is None:
return
elif isinstance(value, datetime.datetime):
@ -286,7 +286,7 @@ class MemoryType(object):
type_name = 'MemoryType'
@classmethod
def validate(cls, value, default=None):
def validate(cls, value):
if value is None:
return
elif value.isdigit() and int(value) >= MIN_MEMORY_SIZE:
@ -308,7 +308,7 @@ class ImageSize(object):
type_name = 'ImageSize'
@classmethod
def validate(cls, value, default=None):
def validate(cls, value):
if value is None:
return
elif value.isdigit():