def vcpus_realtime_topology(flavor, image):
 mask = _get_realtime_mask(flavor, image)
 if (not mask):
  raise exception.RealtimeMaskNotFoundOrInvalid()
 vcpus_rt = parse_cpu_spec(('0-%d,%s' % ((flavor.vcpus - 1), mask)))
 if (len(vcpus_rt) < 1):
  raise exception.RealtimeMaskNotFoundOrInvalid()
 return vcpus_rt

def vcpus_realtime_topology ( flavor , image ) : mask = _get_realtime_mask ( flavor , image ) if ( not mask ) : raise exception . RealtimeMaskNotFoundOrInvalid ( ) vcpus_rt = parse_cpu_spec ( ( '0-%d,%s' % ( ( flavor . vcpus - 1 ) , mask ) ) ) if ( len ( vcpus_rt ) < 1 ) : raise exception . RealtimeMaskNotFoundOrInvalid ( ) return vcpus_rt
determines instance vcpus used as rt for a given spec .