#NEWLINE# def get_vm_resize_spec( client_factory , vcpus , memory_mb , extra_specs , metadata = None ) : #NEWLINE# #INDENT# 'Provides updates for a VM spec.' #NEWLINE# resize_spec = client_factory . create ( 'ns0:VirtualMachineConfigSpec' ) #NEWLINE# resize_spec . numCPUs = vcpus #NEWLINE# resize_spec . memoryMB = memory_mb #NEWLINE# resize_spec . cpuAllocation = _get_allocation_info ( client_factory , extra_specs . cpu_limits , 'ns0:ResourceAllocationInfo' ) #NEWLINE# if metadata : #NEWLINE# #INDENT# resize_spec . annotation = metadata #NEWLINE# #UNINDENT# return resize_spec