def gen_random_resource_name(resource='', timestamp=True):
 fields = ['horizon']
 if resource:
  fields.append(resource)
 if timestamp:
  tstamp = time.strftime('%d-%m-%H-%M-%S')
  fields.append(tstamp)
 fields.append(uuidutils.generate_uuid(dashed=False))
 return '_'.join(fields)

def gen_random_resource_name ( resource = '' , timestamp = True ) : fields = [ 'horizon' ] if resource : fields . append ( resource ) if timestamp : tstamp = time . strftime ( '%d-%m-%H-%M-%S' ) fields . append ( tstamp ) fields . append ( uuidutils . generate_uuid ( dashed = False ) ) return '_' . join ( fields )
generate random resource name using uuid and timestamp .