mirror of
https://gitlab.com/libvirt/libvirt.git
synced 2025-03-20 07:59:00 +00:00
POWER add create() and destroy() support
* src/phyp/phyp_driver.[ch]: add new entry points and a number of cleanups
This commit is contained in:
parent
3023ec5ee7
commit
3811eaaa63
File diff suppressed because it is too large
Load Diff
@ -1,3 +1,29 @@
|
||||
|
||||
/*
|
||||
* Copyright IBM Corp. 2009
|
||||
*
|
||||
* phyp_driver.c: ssh layer to access Power Hypervisors
|
||||
*
|
||||
* Authors:
|
||||
* Eduardo Otubo <otubo at linux.vnet.ibm.com>
|
||||
*
|
||||
* This library is free software; you can redistribute it and/or
|
||||
* modify it under the terms of the GNU Lesser General Public
|
||||
* License as published by the Free Software Foundation; either
|
||||
* version 2.1 of the License, or (at your option) any later version.
|
||||
*
|
||||
* This library is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
||||
* Lesser General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU Lesser General Public
|
||||
* License along with this library; if not, write to the Free Software
|
||||
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
|
||||
*/
|
||||
|
||||
#include "conf/capabilities.h"
|
||||
#include "conf/domain_conf.h"
|
||||
#include <config.h>
|
||||
#include <libssh2.h>
|
||||
|
||||
@ -26,23 +52,54 @@ struct _lpar {
|
||||
/* Struct that holds how many lpars (domains) we're
|
||||
* handling and a pointer to an array of lpar structs
|
||||
* */
|
||||
typedef struct _uuid_db uuid_db_t;
|
||||
typedef uuid_db_t *uuid_dbPtr;
|
||||
struct _uuid_db {
|
||||
typedef struct _uuid_table uuid_table_t;
|
||||
typedef uuid_table_t *uuid_tablePtr;
|
||||
struct _uuid_table {
|
||||
int nlpars;
|
||||
lparPtr *lpars;
|
||||
};
|
||||
|
||||
/* This is the main structure of the driver
|
||||
* */
|
||||
typedef struct _phyp_driver phyp_driver_t;
|
||||
typedef phyp_driver_t *phyp_driverPtr;
|
||||
struct _phyp_driver {
|
||||
uuid_tablePtr uuid_table;
|
||||
virCapsPtr caps;
|
||||
int vios_id;
|
||||
char *managed_system;
|
||||
};
|
||||
|
||||
int phypCheckSPFreeSapce(virConnectPtr conn, int required_size, char *sp);
|
||||
|
||||
int phypGetVIOSPartitionID(virConnectPtr conn);
|
||||
|
||||
virCapsPtr phypCapsInit(void);
|
||||
|
||||
int phypBuildLpar(virConnectPtr conn, virDomainDefPtr def);
|
||||
|
||||
int phypUUIDTable_WriteFile(virConnectPtr conn);
|
||||
|
||||
int phypUUIDTable_ReadFile(virConnectPtr conn);
|
||||
|
||||
int phypUUIDTable_AddLpar(virConnectPtr conn, unsigned char *uuid, int id);
|
||||
|
||||
int phypUUIDTable_RemLpar(virConnectPtr conn, int id);
|
||||
|
||||
int phypUUIDTable_Pull(virConnectPtr conn);
|
||||
|
||||
int phypUUIDTable_Push(virConnectPtr conn);
|
||||
|
||||
int phypUUIDTable_Init(virConnectPtr conn);
|
||||
|
||||
int escape_specialcharacters(char *src, char *dst, size_t dstlen);
|
||||
|
||||
int waitsocket(int socket_fd, LIBSSH2_SESSION * session);
|
||||
|
||||
int phypGetLparUUID(unsigned char *uuid, int lpar_id, virConnectPtr conn);
|
||||
|
||||
void init_uuid_db(virConnectPtr conn);
|
||||
|
||||
int phypRegister(void);
|
||||
|
||||
void stripPath(char *striped_path, char *path);
|
||||
|
||||
void stripNewline(char *striped_string, char *string);
|
||||
|
||||
int phypGetLparState(virConnectPtr conn, unsigned int lpar_id);
|
||||
|
||||
unsigned long phypGetLparMem(virConnectPtr conn,
|
||||
@ -52,6 +109,10 @@ unsigned long phypGetLparMem(virConnectPtr conn,
|
||||
unsigned long phypGetLparCPU(virConnectPtr conn,
|
||||
const char *managed_system, int lpar_id);
|
||||
|
||||
unsigned long phypGetLparCPUGeneric(virConnectPtr conn,
|
||||
const char *managed_system,
|
||||
int lpar_id, int type);
|
||||
|
||||
int phypGetRemoteSlot(virConnectPtr conn, const char *managed_system,
|
||||
const char *lpar_name);
|
||||
|
||||
@ -60,6 +121,5 @@ char *phypGetBackingDevice(virConnectPtr conn, const char *managed_system,
|
||||
|
||||
int phypDiskType(virConnectPtr conn, char *backing_device);
|
||||
|
||||
LIBSSH2_SESSION *openSSHSession(virConnectPtr conn, virConnectAuthPtr auth, int *internal_socket);
|
||||
|
||||
int waitsocket(int socket_fd, LIBSSH2_SESSION * session);
|
||||
LIBSSH2_SESSION *openSSHSession(virConnectPtr conn, virConnectAuthPtr auth,
|
||||
int *internal_socket);
|
||||
|
Loading…
x
Reference in New Issue
Block a user