Changeset 615

Show
Ignore:
Timestamp:
05/27/07 19:19:02 (2 years ago)
Author:
chtekk
Message:

Add vcd.hostinfo method (and vcdadm hostinfo command).
This is needed to get internal info on the host VCD is running on, info that's needed for interfaces to generate correct prompts and such (fex. you
need to know how many CPUs the system has installed to make up the dropdown-list from which to select the CPUID to configure).
This method may be expanded in the future to hold more usefull host-related informations (total memory, etc. comes to mind).

Files:

Legend:

Unmodified
Added
Removed
Modified
Copied
Moved
  • trunk/src/vcc/vcdadm/Makefile.am

    r547 r615  
    2323 
    2424libcmd_a_SOURCES = cmd.c \ 
     25                   hostinfo.c \ 
    2526                   status.c \ 
    2627                   user.c \ 
  • trunk/src/vcc/vcdadm/cmd.c

    r595 r615  
    2424 
    2525cmd_t CMDS[] = { 
     26        { "hostinfo",         cmd_hostinfo }, 
    2627        { "status",           cmd_status }, 
    2728        { "user.set",         cmd_user_set }, 
     
    3940                        "\n" 
    4041                        "Available commands:\n" 
     42                        "   hostinfo\n" 
     43                        "\n" 
    4144                        "   status\n" 
    4245                        "\n" 
  • trunk/src/vcc/vcdadm/cmd.h

    r547 r615  
    2121void usage(int rc); 
    2222 
     23void cmd_hostinfo        (xmlrpc_env *env, int argc, char **argv); 
    2324void cmd_status          (xmlrpc_env *env, int argc, char **argv); 
    2425void cmd_user_set        (xmlrpc_env *env, int argc, char **argv); 
  • trunk/src/vcd/methods.c

    r613 r615  
    8484 
    8585        /* vcd */ 
     86        MREGISTER("vcd.hostinfo",         m_vcd_hostinfo); 
    8687        MREGISTER("vcd.login",            m_vcd_login); 
    8788        MREGISTER("vcd.status",           m_vcd_status); 
  • trunk/src/vcd/methods.h

    r613 r615  
    127127 
    128128/* vcd */ 
     129MPROTO(m_vcd_hostinfo); 
    129130MPROTO(m_vcd_login); 
    130131MPROTO(m_vcd_status); 
  • trunk/src/vcd/methods/Makefile.am

    r613 r615  
    2323           helper/helper_startup.c 
    2424 
    25 M_VCD = vcd/vcd_login.c \ 
     25M_VCD = vcd/vcd_hostinfo.c \ 
     26        vcd/vcd_login.c \ 
    2627        vcd/vcd_status.c \ 
    2728        vcd/vcd_user_caps_add.c \