#NEWLINE# def _validate_property_values( self , properties ) : #NEWLINE# #INDENT# "Check if the input of local_gb, cpus and memory_mb are valid.\n\n        :param properties: a dict contains the node's information.\n        " #NEWLINE# if ( not properties ) : #NEWLINE# #INDENT# return #NEWLINE# #UNINDENT# invalid_msgs_list = [ ] #NEWLINE# for param in REQUIRED_INT_PROPERTIES : #NEWLINE# #INDENT# value = properties . get ( param ) #NEWLINE# if ( value is None ) : #NEWLINE# #INDENT# continue #NEWLINE# #UNINDENT# try : #NEWLINE# #INDENT# int_value = int ( value ) #NEWLINE# assert ( int_value >= 0 ) #NEWLINE# #UNINDENT# except ( ValueError , AssertionError ) : #NEWLINE# #INDENT# msg = ( '%(param)s=%(value)s' % { #NEWLINE# #INDENT# 'param' : param , #NEWLINE# 'value' : value , #NEWLINE# #UNINDENT# } ) #NEWLINE# invalid_msgs_list . append ( msg ) #NEWLINE# #UNINDENT# #UNINDENT# if invalid_msgs_list : #NEWLINE# #INDENT# msg = ( _ ( 'The following properties for node %(node)s should be non-negative integers, but provided values are: %(msgs)s' ) % { #NEWLINE# #INDENT# 'node' : self . uuid , #NEWLINE# 'msgs' : ', ' . join ( invalid_msgs_list ) , #NEWLINE# #UNINDENT# } ) #NEWLINE# raise exception . InvalidParameterValue ( msg )