#NEWLINE# def get_parser( self , prog_name ) : #NEWLINE# #INDENT# parser = super ( CreateLease , self ) . get_parser ( self ) #NEWLINE# parser . add_argument ( 'name' , metavar = self . resource . upper ( ) , help = ( 'Name for the %s' % self . resource ) ) #NEWLINE# parser . add_argument ( '--start-date' , dest = 'start' , help = 'Time (YYYY-MM-DD HH:MM) UTC TZ for starting the lease (default: now)' , default = self . default_start ) #NEWLINE# parser . add_argument ( '--end-date' , dest = 'end' , help = 'Time (YYYY-MM-DD HH:MM) UTC TZ for ending the lease (default: 24h later)' , default = self . default_end ) #NEWLINE# parser . add_argument ( '--physical-reservation' , metavar = '<min=int,max=int,hypervisor_properties=str,resource_properties=str>' , action = 'append' , dest = 'physical_reservations' , help = 'Create a reservation for physical compute hosts. Specify option multiple times to create multiple reservations. min: minimum number of hosts to reserve. max: maximum number of hosts to reserve. hypervisor_properties: JSON string, see doc. resource_properties: JSON string, see doc. ' , default = [ ] ) #NEWLINE# parser . add_argument ( '--reservation' , metavar = '<key=value>' , action = 'append' , dest = 'reservations' , help = 'key/value pairs for creating a generic reservation. Specify option multiple times to create multiple reservations. ' , default = [ ] ) #NEWLINE# parser . add_argument ( '--event' , metavar = '<event_type=str,event_date=time>' , action = 'append' , dest = 'events' , help = 'Creates an event with key/value pairs for the lease. Specify option multiple times to create multiple events. event_type: type of event (e.g. notification). event_date: Time for event (YYYY-MM-DD HH:MM) UTC TZ. ' , default = [ ] ) #NEWLINE# return parser