Esempio n. 1
0
 def _aggregate_guest_net_interfaces_g(self):
     """
     Aggregate guest's network interface info from each guest configurations
     and return list of host list grouped by each networks.
     """
     gcs = self.load_guests_confs()
     kf = lambda d: d.get("network", False)
     return ((k, list(g)) for k, g in itertools.groupby(
         sorted(filter(bool, U.concat(
             g.get("interfaces", []) for g in gcs)),
                key=kf), kf))
Esempio n. 2
0
 def _aggregate_guest_net_interfaces_g(self):
     """
     Aggregate guest's network interface info from each guest configurations
     and return list of host list grouped by each networks.
     """
     gcs = self.load_guests_confs()
     kf = lambda d: d.get("network", False)
     return ((k, list(g)) for k, g in
             itertools.groupby(sorted(filter(bool,
                                             U.concat(g.get("interfaces",
                                                            []) for g
                                                      in gcs)),
                                      key=kf), kf))
Esempio n. 3
0
            files = list_files(reldir)

            if not files:
                continue

            if offset is not None:
                if offset in reldir:
                    reldir = reldir.replace(offset, '')

            instdir = os.path.join(prefix, reldir)
            yield (instdir, files)


data_files = list(list_data_files_g(M_CONF_TOPDIR, "conf", "conf/"))
data_files += concat(list_data_files_g(p, d) for p, d in
                     (("share/%s" % PACKAGE, "templates"),  # template files
                      ("share/%s" % PACKAGE, "tests"),      # test cases
                      ))


class SrpmCommand(Command):

    user_options = []
    build_stage = "s"

    curdir = os.path.abspath(os.curdir)
    rpmspec = os.path.join(curdir, "pkg/package.spec")

    def initialize_options(self):
        pass

    def finalize_options(self):