1. 11 7月, 2016 11 次提交
    • N
      virsh: Introduce vshReadlineParse for improved auto-completion · 3987eba9
      Nishith Shah 提交于
      The new function works as expected, and matches the current level of
      autocomplete offered, along with several other improvements like quotes
      handling, multiple command completion and space handling. Now, it is easy
      to introduce options completer here.
      Signed-off-by: NNishith Shah <nishithshah.2211@gmail.com>
      3987eba9
    • N
      virsh: Add option to suppress error in various functions · aceb6308
      Nishith Shah 提交于
      A bool 'report' has been introduced in various functions, which when set
      to true will produce the error it is suppposed to produce, and when
      false, will suppress the error. These functions are used in the next
      patch for auto-completion.
      Signed-off-by: NNishith Shah <nishithshah.2211@gmail.com>
      aceb6308
    • N
      virsh: Fix variable types in readline generators · d7079ec9
      Nishith Shah 提交于
      Use unsigned int for array indexes and size_t for length variables.
      Signed-off-by: NNishith Shah <nishithshah.2211@gmail.com>
      d7079ec9
    • N
      virsh: Break vshCmddefOptParse into helper functions · 2432521e
      Nishith Shah 提交于
      Decompose vshCmddefOptParse into two helper functions, vshCmddefOptFill
      and vshCmddefCheckInternals.
      
      vshCmddefCheckInternals checks if the internal command definitions are
      correct or not.
      
      vshCmddefOptFill keeps track of the required options and mandatory
      arguments through opts_required and opts_need_arg.
      Signed-off-by: NNishith Shah <nishithshah.2211@gmail.com>
      2432521e
    • F
      bhyve: implement virConnectGetDomainCapabilities · 32916b16
      Fabian Freyer 提交于
      32916b16
    • R
      bhyve: fix bhyveargv2xml custom loader test · 9bbb3676
      Roman Bogorodskiy 提交于
      Before pushing this test, I changed the appropriate args file
      to pet test-wrap-argv.pl, but forgot to change the xml file, so
      update it accordingly.
      9bbb3676
    • F
      bhyve: add tests for bhyveParseCommandLineString · dd23c382
      Fabian Freyer 提交于
      dd23c382
    • F
      bhyve: implement argument parser for loader · 9f22b347
      Fabian Freyer 提交于
      A simple getopt-based argument parser is added for the /usr/sbin/bhyveload
      command, loosely based on its argument parser.
      
      The boot disk is guessed by iterating over all
      disks and matching their sources. If any non-default arguments are found,
      def->os.bootloaderArgs is set accordingly, and the bootloader is treated as a
      custom bootloader.
      
      Custom bootloader are supported by setting the def->os.bootloader and
      def->os.bootloaderArgs accordingly
      
      grub-bhyve is also treated as a custom bootloader. Since we don't get the
      device map in the native format anyways, we can't reconstruct the complete
      boot order. While it is possible to check what type the grub boot disk is by
      checking if the --root argument is "cd" or "hd0,msdos1", and then just use the
      first disk found, implementing the grub-bhyve argument parser as-is in the
      grub-bhyve source would mean adding a dependency to argp or duplicating lots
      of the code of argp. Therefore it's not really worth implementing that now.
      Signed-off-by: NFabian Freyer <fabian.freyer@physik.tu-berlin.de>
      9f22b347
    • F
      bhyve: implement bhyve argument parser · 8151b300
      Fabian Freyer 提交于
      A simpe getopt-based argument parser is added for the /usr/sbin/bhyve command,
      loosely based on its argument parser, which reads the following from the bhyve
      command line string:
      
      * vm name
      * number of vcpus
      * memory size
      * the time offset (UTC or localtime)
      * features:
        * acpi
        * ioapic: While this flag is deprecated in FreeBSD r257423, keep checking for
          it for backwards compatibiility.
      * the domain UUID; if not explicitely given, one will be generated.
      * lpc devices: for now only the com1 and com2 are supported. It is required for
         these to be /dev/nmdm[\d+][AB], and the slave devices are automatically
         inferred from these to be the corresponding end of the virtual null-modem
         cable: /dev/nmdm<N>A <-> /dev/nmdm<N>B
      * PCI devices:
        * Disks: these are numbered in the order they are found, for virtio and ahci
          disks separately. The destination is set to sdX or vdX with X='a'+index;
          therefore only 'z'-'a' disks are supported.
          Disks are considered to be block devices if the path
          starts with /dev, otherwise they are considered to be files.
        * Networks: only tap devices are supported. Since it isn't possible to tell
          the type of the network, VIR_DOMAIN_NET_TYPE_ETHERNET is assumed, since it
          is the most generic. If no mac is specified, one will be generated.
      Signed-off-by: NFabian Freyer <fabian.freyer@physik.tu-berlin.de>
      8151b300
    • F
      bhyve: implement virConnectDomainXMLFromNative · 01163b1b
      Fabian Freyer 提交于
      First, remove escaped newlines and split up the string into an argv-list for
      the bhyve and loader commands, respectively. This is done by iterating over the
      string splitting it by newlines, and then re-iterating over each line,
      splitting it by spaces.
      
      Since this code reuses part of the code of qemu_parse_command.c
      (in bhyveCommandLine2argv), add the appropriate copyright notices.
      Signed-off-by: NFabian Freyer <fabian.freyer@physik.tu-berlin.de>
      01163b1b
    • F
      gnulib: add getopt module · b436a8ae
      Fabian Freyer 提交于
      Unconditionally use gnulib's getopt module. This is needed by the bhyve driver
      to provide a reentrant interface for getopt.
      
      Several gnulib headers rely on features.h being included by ctype.h to provide
      __GNUC_PREREQ, but on systems without glibc, this is not provided. In these
      cases __GNUC_PREREQ gets redefined to 0, which causes build errors from checks
      in src/internal.h.
      Therefore, define __GNUC_PREREQ as early as possible. config-post.h is probably
      the first header that is included, before any other headers.
      b436a8ae
  2. 09 7月, 2016 4 次提交
  3. 08 7月, 2016 2 次提交
  4. 07 7月, 2016 14 次提交
  5. 04 7月, 2016 9 次提交