evscntl-1 - API for Elastic Virtual Switch
#include <rad/client/1/evscntl.h>
cc [ flag... ] file... -levscntl1_client [ library... ]
interface EVSController
rc_err_t evscntl_EVSController_createEVS(rc_instance_t *inst,
const char *nvpropstr,
const char *tenantname,
const char *evsname,
evscntl_EVSInfo_t **result,
evscntl_EVSError_t **error);
rc_err_t evscntl_EVSController_deleteEVS(rc_instance_t *inst,
const char *evsname,
const char *tenantname,
evscntl_EVSError_t **error);
rc_err_t evscntl_EVSController_getEVSInfo(rc_instance_t *inst,
const char *filterstr,
evscntl_EVSInfo_t ***result,
int *result_cnt,
evscntl_EVSError_t **error);
rc_err_t evscntl_EVSController_getVPortInfo(rc_instance_t *inst,
const char *filterstr,
evscntl_VPortInfo_t ***result,
int *result_cnt,
evscntl_EVSError_t **error);
rc_err_t evscntl_EVSController_getIPnetInfo(rc_instance_t *inst,
const char *filterstr,
evscntl_IPnetInfo_t ***result,
int *result_cnt,
evscntl_EVSError_t **error);
rc_err_t evscntl_EVSController_getVPortStat(rc_instance_t *inst,
int interval,
int count,
const char *filterstr,
evscntl_VPortStat_t ***result,
int *result_cnt,
evscntl_EVSError_t **error);
rc_err_t evscntl_EVSController_setProperty(rc_instance_t *inst,
const char *nvpropstr,
const char *host,
evscntl_EVSError_t **error);
rc_err_t evscntl_EVSController_getProperty(rc_instance_t *inst,
const char *propstr,
const char *filterstr,
evscntl_ControllerProperty_t ***result,
int *result_cnt,
evscntl_EVSError_t **error);
rc_err_t evscntl_EVSController_getL2TypeIdRange(rc_instance_t *inst,
const char *filterstr,
evscntl_L2TypeIdRange_t ***result,
int *result_cnt,
evscntl_EVSError_t **error);
interface EVS
rc_err_t evscntl_EVS_setProperty(rc_instance_t *inst,
const char *nvpropstr,
evscntl_EVSError_t **error);
rc_err_t evscntl_EVS_getProperty(rc_instance_t *inst,
const char *propstr,
evscntl_Property_t ***result,
int *result_cnt,
evscntl_EVSError_t **error);
rc_err_t evscntl_EVS_addIPnet(rc_instance_t *inst,
const char *nvpropstr,
const char *ipnetname,
evscntl_IPnetInfo_t **result,
evscntl_EVSError_t **error);
rc_err_t evscntl_EVS_removeIPnet(rc_instance_t *inst,
const char *ipnetname,
evscntl_EVSError_t **error);
rc_err_t evscntl_EVS_addVPort(rc_instance_t *inst,
const char *nvpropstr,
const char *vportname,
evscntl_VPortInfo_t **result,
evscntl_EVSError_t **error);
rc_err_t evscntl_EVS_removeVPort(rc_instance_t *inst,
const char *vportname,
const char *nvpropstr,
evscntl_EVSError_t **error);
rc_err_t evscntl_EVS_resetVPort(rc_instance_t *inst,
const char *vportname,
const char *nvpropstr,
evscntl_EVSError_t **error);
rc_err_t evscntl_EVS_assignVPort(rc_instance_t *inst,
const char *vnicname,
const char *hostname,
const char *vportname,
const char *vmpropstr,
evscntl_EVSImplInfo_t **result,
evscntl_EVSError_t **error);
rc_err_t evscntl_EVS_unAssignVPort(rc_instance_t *inst,
const char *vnicname,
const char *hostname,
const char *vmpropstr,
evscntl_EVSError_t **error);
interface VPort
rc_err_t evscntl_VPort_setProperty(rc_instance_t *inst,
const char *nvpropstr,
evscntl_EVSError_t **error);
rc_err_t evscntl_VPort_getProperty(rc_instance_t *inst,
const char *propstr,
evscntl_Property_t ***result,
int *result_cnt,
evscntl_EVSError_t **error);
interface IPnet
rc_err_t evscntl_IPnet_setProperty(rc_instance_t *inst,
const char *nvpropstr,
evscntl_EVSError_t **error);
rc_err_t evscntl_IPnet_getProperty(rc_instance_t *inst,
const char *propstr,
evscntl_Property_t ***result,
int *result_cnt,
evscntl_EVSError_t **error);
Enumerated Types
enum EVSStatus
typedef enum evscntl_EVSStatus {
EEVSS_IDLE = 0,
EEVSS_BUSY = 1,
} evscntl_EVSStatus_t;
enum VPortStatus
typedef enum evscntl_VPortStatus {
EVPS_FREE = 0,
EVPS_USED = 1,
} evscntl_VPortStatus_t;
enum Permission
typedef enum evscntl_Permission {
EP_READ = 1,
EP_WRITE = 2,
EP_READWRITE = 3,
} evscntl_Permission_t;
enum IPVersion
typedef enum evscntl_IPVersion {
EIPV_IPV4 = 0,
EIPV_IPV6 = 1,
} evscntl_IPVersion_t;
Structured Types
struct EVSError
typedef struct evscntl_EVSError evscntl_EVSError_t;
struct evscntl_EVSError {
int eevse_err;
char *eevse_errmsg;
};
void evscntl_EVSError_free(evscntl_EVSError_t *in);
struct PropertyNV
typedef struct evscntl_PropertyNV evscntl_PropertyNV_t;
struct evscntl_PropertyNV {
char *epnv_name;
char *epnv_value;
};
void evscntl_PropertyNV_free(evscntl_PropertyNV_t *in);
struct Property
typedef struct evscntl_Property evscntl_Property_t;
struct evscntl_Property {
char *ep_name;
evscntl_Permission_t ep_permission;
char *ep_current_value;
char *ep_effective_value;
char *ep_default_value;
char *ep_possible_values;
};
void evscntl_Property_free(evscntl_Property_t *in);
struct IPnetInfo
typedef struct evscntl_IPnetInfo evscntl_IPnetInfo_t;
struct evscntl_IPnetInfo {
char *eipi_name;
char *eipi_uuid;
char *eipi_evsname;
char *eipi_evsuuid;
char *eipi_tenantname;
evscntl_PropertyNV_t **eipi_props;
int eipi_props_count;
char *eipi_start;
char *eipi_end;
char *eipi_range;
evscntl_IPVersion_t eipi_ipvers;
};
void evscntl_IPnetInfo_free(evscntl_IPnetInfo_t *in);
struct VPortInfo
typedef struct evscntl_VPortInfo evscntl_VPortInfo_t;
struct evscntl_VPortInfo {
char *evpi_name;
char *evpi_uuid;
char *evpi_evsname;
char *evpi_evsuuid;
char *evpi_tenantname;
evscntl_VPortStatus_t evpi_status;
char *evpi_vnicname;
evscntl_PropertyNV_t **evpi_props;
int evpi_props_count;
char *evpi_hostname;
};
void evscntl_VPortInfo_free(evscntl_VPortInfo_t *in);
struct EVSInfo
typedef struct evscntl_EVSInfo evscntl_EVSInfo_t;
struct evscntl_EVSInfo {
char *eevsi_name;
char *eevsi_uuid;
char *eevsi_tenantname;
evscntl_PropertyNV_t **eevsi_props;
int eevsi_props_count;
evscntl_EVSStatus_t eevsi_status;
evscntl_VPortInfo_t **eevsi_vports;
int eevsi_vports_count;
evscntl_IPnetInfo_t **eevsi_ipnets;
int eevsi_ipnets_count;
};
void evscntl_EVSInfo_free(evscntl_EVSInfo_t *in);
struct EVSImplInfo
typedef struct evscntl_EVSImplInfo evscntl_EVSImplInfo_t;
struct evscntl_EVSImplInfo {
evscntl_EVSInfo_t *eevsii_evsinfo;
char *eevsii_uplink_port;
char *eevsii_vxlan_localaddr;
char *eevsii_vxlan_mgroup;
char *eevsii_vxlan_ipvers;
};
void evscntl_EVSImplInfo_free(evscntl_EVSImplInfo_t *in);
struct VPortStat
typedef struct evscntl_VPortStat evscntl_VPortStat_t;
struct evscntl_VPortStat {
char *evps_vportname;
char *evps_evsname;
char *evps_tenantname;
char *evps_vnicname;
char *evps_hostname;
unsigned long long evps_rbytes;
unsigned long long evps_ipackets;
unsigned long long evps_idrops;
unsigned long long evps_idropbytes;
unsigned long long evps_obytes;
unsigned long long evps_opackets;
unsigned long long evps_odrops;
unsigned long long evps_odropbytes;
int evps_errcode;
};
void evscntl_VPortStat_free(evscntl_VPortStat_t *in);
struct ControllerProperty
typedef struct evscntl_ControllerProperty
evscntl_ControllerProperty_t;
struct evscntl_ControllerProperty {
char *ecp_name;
evscntl_Permission_t ecp_permission;
char *ecp_current_value;
char *ecp_default_value;
char *ecp_host;
};
void evscntl_ControllerProperty_free(evscntl_ControllerProperty_t *in);
struct L2TypeIdRange
typedef struct evscntl_L2TypeIdRange evscntl_L2TypeIdRange_t;
struct evscntl_L2TypeIdRange {
char *eltir_name;
char *eltir_value;
char *eltir_host;
evscntl_PropertyNV_t **eltir_range;
int eltir_range_count;
};
void evscntl_L2TypeIdRange_free(evscntl_L2TypeIdRange_t *in);
EVSCNTL-1(3rad) RAD Module Definitions EVSCNTL-1(3rad)
NAME
evscntl - API for Elastic Virtual Switch
SYNOPSIS
#include <rad/client/1/evscntl.h>
cc [ flag... ] file... -levscntl1_client [ library... ]
interface EVSController
rc_err_t evscntl_EVSController_createEVS(rc_instance_t *inst,
const char *nvpropstr,
const char *tenantname,
const char *evsname,
evscntl_EVSInfo_t **result,
evscntl_EVSError_t **error);
rc_err_t evscntl_EVSController_deleteEVS(rc_instance_t *inst,
const char *evsname,
const char *tenantname,
evscntl_EVSError_t **error);
rc_err_t evscntl_EVSController_getEVSInfo(rc_instance_t *inst,
const char *filterstr,
evscntl_EVSInfo_t ***result,
int *result_cnt,
evscntl_EVSError_t **error);
rc_err_t evscntl_EVSController_getVPortInfo(rc_instance_t *inst,
const char *filterstr,
evscntl_VPortInfo_t ***result,
int *result_cnt,
evscntl_EVSError_t **error);
rc_err_t evscntl_EVSController_getIPnetInfo(rc_instance_t *inst,
const char *filterstr,
evscntl_IPnetInfo_t ***result,
int *result_cnt,
evscntl_EVSError_t **error);
rc_err_t evscntl_EVSController_getVPortStat(rc_instance_t *inst,
int interval,
int count,
const char *filterstr,
evscntl_VPortStat_t ***result,
int *result_cnt,
evscntl_EVSError_t **error);
rc_err_t evscntl_EVSController_setProperty(rc_instance_t *inst,
const char *nvpropstr,
const char *host,
evscntl_EVSError_t **error);
rc_err_t evscntl_EVSController_getProperty(rc_instance_t *inst,
const char *propstr,
const char *filterstr,
evscntl_ControllerProperty_t ***result,
int *result_cnt,
evscntl_EVSError_t **error);
rc_err_t evscntl_EVSController_getL2TypeIdRange(rc_instance_t *inst,
const char *filterstr,
evscntl_L2TypeIdRange_t ***result,
int *result_cnt,
evscntl_EVSError_t **error);
interface EVS
rc_err_t evscntl_EVS_setProperty(rc_instance_t *inst,
const char *nvpropstr,
evscntl_EVSError_t **error);
rc_err_t evscntl_EVS_getProperty(rc_instance_t *inst,
const char *propstr,
evscntl_Property_t ***result,
int *result_cnt,
evscntl_EVSError_t **error);
rc_err_t evscntl_EVS_addIPnet(rc_instance_t *inst,
const char *nvpropstr,
const char *ipnetname,
evscntl_IPnetInfo_t **result,
evscntl_EVSError_t **error);
rc_err_t evscntl_EVS_removeIPnet(rc_instance_t *inst,
const char *ipnetname,
evscntl_EVSError_t **error);
rc_err_t evscntl_EVS_addVPort(rc_instance_t *inst,
const char *nvpropstr,
const char *vportname,
evscntl_VPortInfo_t **result,
evscntl_EVSError_t **error);
rc_err_t evscntl_EVS_removeVPort(rc_instance_t *inst,
const char *vportname,
const char *nvpropstr,
evscntl_EVSError_t **error);
rc_err_t evscntl_EVS_resetVPort(rc_instance_t *inst,
const char *vportname,
const char *nvpropstr,
evscntl_EVSError_t **error);
rc_err_t evscntl_EVS_assignVPort(rc_instance_t *inst,
const char *vnicname,
const char *hostname,
const char *vportname,
const char *vmpropstr,
evscntl_EVSImplInfo_t **result,
evscntl_EVSError_t **error);
rc_err_t evscntl_EVS_unAssignVPort(rc_instance_t *inst,
const char *vnicname,
const char *hostname,
const char *vmpropstr,
evscntl_EVSError_t **error);
interface VPort
rc_err_t evscntl_VPort_setProperty(rc_instance_t *inst,
const char *nvpropstr,
evscntl_EVSError_t **error);
rc_err_t evscntl_VPort_getProperty(rc_instance_t *inst,
const char *propstr,
evscntl_Property_t ***result,
int *result_cnt,
evscntl_EVSError_t **error);
interface IPnet
rc_err_t evscntl_IPnet_setProperty(rc_instance_t *inst,
const char *nvpropstr,
evscntl_EVSError_t **error);
rc_err_t evscntl_IPnet_getProperty(rc_instance_t *inst,
const char *propstr,
evscntl_Property_t ***result,
int *result_cnt,
evscntl_EVSError_t **error);
Enumerated Types
enum EVSStatus
typedef enum evscntl_EVSStatus {
EEVSS_IDLE = 0,
EEVSS_BUSY = 1,
} evscntl_EVSStatus_t;
enum VPortStatus
typedef enum evscntl_VPortStatus {
EVPS_FREE = 0,
EVPS_USED = 1,
} evscntl_VPortStatus_t;
enum Permission
typedef enum evscntl_Permission {
EP_READ = 1,
EP_WRITE = 2,
EP_READWRITE = 3,
} evscntl_Permission_t;
enum IPVersion
typedef enum evscntl_IPVersion {
EIPV_IPV4 = 0,
EIPV_IPV6 = 1,
} evscntl_IPVersion_t;
Structured Types
struct EVSError
typedef struct evscntl_EVSError evscntl_EVSError_t;
struct evscntl_EVSError {
int eevse_err;
char *eevse_errmsg;
};
void evscntl_EVSError_free(evscntl_EVSError_t *in);
struct PropertyNV
typedef struct evscntl_PropertyNV evscntl_PropertyNV_t;
struct evscntl_PropertyNV {
char *epnv_name;
char *epnv_value;
};
void evscntl_PropertyNV_free(evscntl_PropertyNV_t *in);
struct Property
typedef struct evscntl_Property evscntl_Property_t;
struct evscntl_Property {
char *ep_name;
evscntl_Permission_t ep_permission;
char *ep_current_value;
char *ep_effective_value;
char *ep_default_value;
char *ep_possible_values;
};
void evscntl_Property_free(evscntl_Property_t *in);
struct IPnetInfo
typedef struct evscntl_IPnetInfo evscntl_IPnetInfo_t;
struct evscntl_IPnetInfo {
char *eipi_name;
char *eipi_uuid;
char *eipi_evsname;
char *eipi_evsuuid;
char *eipi_tenantname;
evscntl_PropertyNV_t **eipi_props;
int eipi_props_count;
char *eipi_start;
char *eipi_end;
char *eipi_range;
evscntl_IPVersion_t eipi_ipvers;
};
void evscntl_IPnetInfo_free(evscntl_IPnetInfo_t *in);
struct VPortInfo
typedef struct evscntl_VPortInfo evscntl_VPortInfo_t;
struct evscntl_VPortInfo {
char *evpi_name;
char *evpi_uuid;
char *evpi_evsname;
char *evpi_evsuuid;
char *evpi_tenantname;
evscntl_VPortStatus_t evpi_status;
char *evpi_vnicname;
evscntl_PropertyNV_t **evpi_props;
int evpi_props_count;
char *evpi_hostname;
};
void evscntl_VPortInfo_free(evscntl_VPortInfo_t *in);
struct EVSInfo
typedef struct evscntl_EVSInfo evscntl_EVSInfo_t;
struct evscntl_EVSInfo {
char *eevsi_name;
char *eevsi_uuid;
char *eevsi_tenantname;
evscntl_PropertyNV_t **eevsi_props;
int eevsi_props_count;
evscntl_EVSStatus_t eevsi_status;
evscntl_VPortInfo_t **eevsi_vports;
int eevsi_vports_count;
evscntl_IPnetInfo_t **eevsi_ipnets;
int eevsi_ipnets_count;
};
void evscntl_EVSInfo_free(evscntl_EVSInfo_t *in);
struct EVSImplInfo
typedef struct evscntl_EVSImplInfo evscntl_EVSImplInfo_t;
struct evscntl_EVSImplInfo {
evscntl_EVSInfo_t *eevsii_evsinfo;
char *eevsii_uplink_port;
char *eevsii_vxlan_localaddr;
char *eevsii_vxlan_mgroup;
char *eevsii_vxlan_ipvers;
};
void evscntl_EVSImplInfo_free(evscntl_EVSImplInfo_t *in);
struct VPortStat
typedef struct evscntl_VPortStat evscntl_VPortStat_t;
struct evscntl_VPortStat {
char *evps_vportname;
char *evps_evsname;
char *evps_tenantname;
char *evps_vnicname;
char *evps_hostname;
unsigned long long evps_rbytes;
unsigned long long evps_ipackets;
unsigned long long evps_idrops;
unsigned long long evps_idropbytes;
unsigned long long evps_obytes;
unsigned long long evps_opackets;
unsigned long long evps_odrops;
unsigned long long evps_odropbytes;
int evps_errcode;
};
void evscntl_VPortStat_free(evscntl_VPortStat_t *in);
struct ControllerProperty
typedef struct evscntl_ControllerProperty
evscntl_ControllerProperty_t;
struct evscntl_ControllerProperty {
char *ecp_name;
evscntl_Permission_t ecp_permission;
char *ecp_current_value;
char *ecp_default_value;
char *ecp_host;
};
void evscntl_ControllerProperty_free(evscntl_ControllerProperty_t *in);
struct L2TypeIdRange
typedef struct evscntl_L2TypeIdRange evscntl_L2TypeIdRange_t;
struct evscntl_L2TypeIdRange {
char *eltir_name;
char *eltir_value;
char *eltir_host;
evscntl_PropertyNV_t **eltir_range;
int eltir_range_count;
};
void evscntl_L2TypeIdRange_free(evscntl_L2TypeIdRange_t *in);
DESCRIPTION
API com.oracle.solaris.rad.evscntl [1]
This API exposes Elastic Virtual Switch (EVS) configuration and
administration to rad(8) clients.
The following are sample python clients which illustrate some simple
interactions with the module.
INTERFACES
interface EVSController
The EVSController interface is an administrative API that can be used
at EVS client to administer EVS entities including EVS, VPort, IPnet,
client config, controller config.
EVSController Methods
rc_err_t evscntl_EVSController_createEVS(rc_instance_t *inst,
const char *nvpropstr,
const char *tenantname,
const char *evsname,
evscntl_EVSInfo_t **result,
evscntl_EVSError_t **error);
create an EVS
Create an EVS with the supplied name and properties.
Arguments:
inst -- RAD instance
nvpropstr (nullable) -- a comma-separated name-value pairs of
properties
tenantname (nullable) -- the name of Tenant
evsname (nullable) -- the name of EVS
result
error
rc_err_t evscntl_EVSController_deleteEVS(rc_instance_t *inst,
const char *evsname,
const char *tenantname,
evscntl_EVSError_t **error);
delete an EVS
Arguments:
inst -- RAD instance
evsname -- the name of EVS
tenantname (nullable) -- the name of Tenant
error
rc_err_t evscntl_EVSController_getEVSInfo(rc_instance_t *inst,
const char *filterstr,
evscntl_EVSInfo_t ***result,
int *result_cnt,
evscntl_EVSError_t **error);
Get a list of EVS either for all the EVS managed by the EVS
controller or for the specified EVS.
Arguments:
inst -- RAD instance
filterstr (nullable) -- a comma-separated name-value pairs used
to filter the result
result -- a list of EVS
result_cnt -- Number of items in result array
error
rc_err_t evscntl_EVSController_getVPortInfo(rc_instance_t *inst,
const char *filterstr,
evscntl_VPortInfo_t ***result,
int *result_cnt,
evscntl_EVSError_t **error);
list all VPorts or specified VPort
Arguments:
inst -- RAD instance
filterstr (nullable) -- a comma-separated name-value pairs used
to filter the result
result -- a list of VPort
result_cnt -- Number of items in result array
error
rc_err_t evscntl_EVSController_getIPnetInfo(rc_instance_t *inst,
const char *filterstr,
evscntl_IPnetInfo_t ***result,
int *result_cnt,
evscntl_EVSError_t **error);
get a list of IPnet either for all the IPnets managed by the
EVS controller or for the specified IPnet.
Arguments:
inst -- RAD instance
filterstr (nullable) -- a comma-separated name-value pairs used
to filter the result
result -- a list of IPnet
result_cnt -- Number of items in result array
error
rc_err_t evscntl_EVSController_getVPortStat(rc_instance_t *inst,
int interval,
int count,
const char *filterstr,
evscntl_VPortStat_t ***result,
int *result_cnt,
evscntl_EVSError_t **error);
get a list of stats of VPort either for all the VPort managed
by the EVS controller or for the specified VPort.
Arguments:
inst -- RAD instance
interval -- the interval in seconds at which statistics are
refreshed
count -- specifies the number of times that the statistics are
repeated.
filterstr (nullable) -- a comma-separated name-value pairs used
to filter the result
result -- a list of VPortStat
result_cnt -- Number of items in result array
error
rc_err_t evscntl_EVSController_setProperty(rc_instance_t *inst,
const char *nvpropstr,
const char *host,
evscntl_EVSError_t **error);
modifies the EVS controller's property to the value specified
Arguments:
inst -- RAD instance
nvpropstr -- a name-value pair of property
host (nullable) -- the property being set is applicable only to
the specified host
error
rc_err_t evscntl_EVSController_getProperty(rc_instance_t *inst,
const char *propstr,
const char *filterstr,
evscntl_ControllerProperty_t ***result,
int *result_cnt,
evscntl_EVSError_t **error);
get the current values of one or more properties for the
controller
Arguments:
inst -- RAD instance
propstr (nullable) -- a comma-separated name-value pairs of
properties to get
filterstr (nullable)
result
result_cnt -- Number of items in result array
error
rc_err_t evscntl_EVSController_getL2TypeIdRange(rc_instance_t *inst,
const char *filterstr,
evscntl_L2TypeIdRange_t ***result,
int *result_cnt,
evscntl_EVSError_t **error);
get the range of L2 type IDs (VLAN and VXLAN) as applicable
per-host and for rest of the hosts that do not have per-host
setting
Arguments:
inst -- RAD instance
filterstr (nullable) -- a comma-separated list of filters to
apply.
result
result_cnt -- Number of items in result array
error
EVSController Retrieve
rc_err_t evscntl_EVSController__rad_get_name(adr_name_t **result,
int n,
...);
Obtain RAD name of a EVSController object.
Arguments:
result -- RAD name
n -- Number of key-value pairs provided as variadic arguments
... -- Optional key-value pairs that compose the primary key
rc_err_t evscntl_EVSController__rad_lookup(rc_conn_t *c,
boolean_t strict,
rc_instance_t **result,
int n,
...);
Lookup a EVSController instance.
Construct a RAD name for the interface based on the provided
key-value pairs and perform a lookup. If successful, instance
reference is returned in the result.
Arguments:
c -- RAD connection handle
strict -- Strict (B_TRUE) or relaxed (B_FALSE) versioning
result -- RAD instance
n -- Number of key-value pairs provided as variadic arguments
... -- Optional key-value pairs that compose the primary key
rc_err_t evscntl_EVSController__rad_list(rc_conn_t *c,
boolean_t strict,
adr_pattern_scheme_t scheme,
adr_name_t ***result,
int *result_count,
int n,
...);
List RAD names of a available EVSController instances.
Returns an array and array size of matching object names.
Arguments:
c -- RAD connection handle
strict -- Strict (B_TRUE) or relaxed (B_FALSE) versioning
scheme -- Apply glob (NS_GLOB) or regex (NS_REGEX) matching
result -- Array of RAD names
result_count -- Number of names in result array
n -- Number of key-value pairs provided as variadic arguments
... -- Optional key-value pairs that compose the primary key
interface EVS
EVS Methods
rc_err_t evscntl_EVS_setProperty(rc_instance_t *inst,
const char *nvpropstr,
evscntl_EVSError_t **error);
Sets the values of a property on the specified EVS
Arguments:
inst -- RAD instance
nvpropstr -- the name-value pair of property to set
error
rc_err_t evscntl_EVS_getProperty(rc_instance_t *inst,
const char *propstr,
evscntl_Property_t ***result,
int *result_cnt,
evscntl_EVSError_t **error);
Get the value for the given property or for all the properties
for the specified EVS.
Arguments:
inst -- RAD instance
propstr (nullable) -- a comma-separated list of EVS properties
to get
result -- a list of properties
result_cnt -- Number of items in result array
error
rc_err_t evscntl_EVS_addIPnet(rc_instance_t *inst,
const char *nvpropstr,
const char *ipnetname,
evscntl_IPnetInfo_t **result,
evscntl_EVSError_t **error);
Add an IPnet.
Arguments:
inst -- RAD instance
nvpropstr -- the name-value pair of property to set
ipnetname (nullable) -- the name of IPnet
result
error
rc_err_t evscntl_EVS_removeIPnet(rc_instance_t *inst,
const char *ipnetname,
evscntl_EVSError_t **error);
remove an IPnet
Arguments:
inst -- RAD instance
ipnetname -- the name of IPnet
error
rc_err_t evscntl_EVS_addVPort(rc_instance_t *inst,
const char *nvpropstr,
const char *vportname,
evscntl_VPortInfo_t **result,
evscntl_EVSError_t **error);
add a VPort
Arguments:
inst -- RAD instance
nvpropstr (nullable) -- a comma-separated name-value pair of
properties
vportname (nullable) -- the name of VPort
result -- the information of EVS where we add the VPort to
error
rc_err_t evscntl_EVS_removeVPort(rc_instance_t *inst,
const char *vportname,
const char *nvpropstr,
evscntl_EVSError_t **error);
remove a VPort from an EVS
Arguments:
inst -- RAD instance
vportname -- the name of VPort
nvpropstr (nullable) -- a comma-separated name-value pairs of
properties
error
rc_err_t evscntl_EVS_resetVPort(rc_instance_t *inst,
const char *vportname,
const char *nvpropstr,
evscntl_EVSError_t **error);
Reset a VPort to idle status. Will delete the VPort if the
VPort is generated by system.
Arguments:
inst -- RAD instance
vportname -- the name of VPort
nvpropstr (nullable) -- a comma-separated name-value pairs of
properties
error
rc_err_t evscntl_EVS_assignVPort(rc_instance_t *inst,
const char *vnicname,
const char *hostname,
const char *vportname,
const char *vmpropstr,
evscntl_EVSImplInfo_t **result,
evscntl_EVSError_t **error);
assign a VNIC to a VPort with the supplied EVS name, VPort name
and Tenant name
Arguments:
inst -- RAD instance
vnicname -- the name of VNIC to connect with the VPort
hostname -- the name of the host where the vnic is created
vportname (nullable) -- the name of VPort to assign
vmpropstr (nullable) -- a name-value pair of property
result -- the EVS of the assigned VPort
error
rc_err_t evscntl_EVS_unAssignVPort(rc_instance_t *inst,
const char *vnicname,
const char *hostname,
const char *vmpropstr,
evscntl_EVSError_t **error);
unassign a VNIC from a VPort
Arguments:
inst -- RAD instance
vnicname -- the name of vnic connected to a VPort
hostname -- the name of host where the vnic is created
vmpropstr (nullable) -- a name-value pair of property
error
EVS Retrieve
rc_err_t evscntl_EVS__rad_get_name(adr_name_t **result,
int n,
...);
Obtain RAD name of a EVS object.
Arguments:
result -- RAD name
n -- Number of key-value pairs provided as variadic arguments
... -- Optional key-value pairs that compose the primary key
rc_err_t evscntl_EVS__rad_lookup(rc_conn_t *c,
boolean_t strict,
rc_instance_t **result,
int n,
...);
Lookup a EVS instance.
Construct a RAD name for the interface based on the provided
key-value pairs and perform a lookup. If successful, instance
reference is returned in the result.
Arguments:
c -- RAD connection handle
strict -- Strict (B_TRUE) or relaxed (B_FALSE) versioning
result -- RAD instance
n -- Number of key-value pairs provided as variadic arguments
... -- Optional key-value pairs that compose the primary key
rc_err_t evscntl_EVS__rad_list(rc_conn_t *c,
boolean_t strict,
adr_pattern_scheme_t scheme,
adr_name_t ***result,
int *result_count,
int n,
...);
List RAD names of a available EVS instances.
Returns an array and array size of matching object names.
Arguments:
c -- RAD connection handle
strict -- Strict (B_TRUE) or relaxed (B_FALSE) versioning
scheme -- Apply glob (NS_GLOB) or regex (NS_REGEX) matching
result -- Array of RAD names
result_count -- Number of names in result array
n -- Number of key-value pairs provided as variadic arguments
... -- Optional key-value pairs that compose the primary key
interface VPort
VPort Methods
rc_err_t evscntl_VPort_setProperty(rc_instance_t *inst,
const char *nvpropstr,
evscntl_EVSError_t **error);
Sets the value of a property on the specified VPort
Arguments:
inst -- RAD instance
nvpropstr -- a name-value pair of property
error
rc_err_t evscntl_VPort_getProperty(rc_instance_t *inst,
const char *propstr,
evscntl_Property_t ***result,
int *result_cnt,
evscntl_EVSError_t **error);
Get the value for the given property or for all the properties
for the specified VPort.
Arguments:
inst -- RAD instance
propstr (nullable) -- a comma-separated list of VPort
properties to get
result -- list of VPort property information
result_cnt -- Number of items in result array
error
VPort Retrieve
rc_err_t evscntl_VPort__rad_get_name(adr_name_t **result,
int n,
...);
Obtain RAD name of a VPort object.
Arguments:
result -- RAD name
n -- Number of key-value pairs provided as variadic arguments
... -- Optional key-value pairs that compose the primary key
rc_err_t evscntl_VPort__rad_lookup(rc_conn_t *c,
boolean_t strict,
rc_instance_t **result,
int n,
...);
Lookup a VPort instance.
Construct a RAD name for the interface based on the provided
key-value pairs and perform a lookup. If successful, instance
reference is returned in the result.
Arguments:
c -- RAD connection handle
strict -- Strict (B_TRUE) or relaxed (B_FALSE) versioning
result -- RAD instance
n -- Number of key-value pairs provided as variadic arguments
... -- Optional key-value pairs that compose the primary key
rc_err_t evscntl_VPort__rad_list(rc_conn_t *c,
boolean_t strict,
adr_pattern_scheme_t scheme,
adr_name_t ***result,
int *result_count,
int n,
...);
List RAD names of a available VPort instances.
Returns an array and array size of matching object names.
Arguments:
c -- RAD connection handle
strict -- Strict (B_TRUE) or relaxed (B_FALSE) versioning
scheme -- Apply glob (NS_GLOB) or regex (NS_REGEX) matching
result -- Array of RAD names
result_count -- Number of names in result array
n -- Number of key-value pairs provided as variadic arguments
... -- Optional key-value pairs that compose the primary key
interface IPnet
IPnet Methods
rc_err_t evscntl_IPnet_setProperty(rc_instance_t *inst,
const char *nvpropstr,
evscntl_EVSError_t **error);
Sets the value of a property on the specified IPnet
Arguments:
inst -- RAD instance
nvpropstr -- a name-value pair of property
error
rc_err_t evscntl_IPnet_getProperty(rc_instance_t *inst,
const char *propstr,
evscntl_Property_t ***result,
int *result_cnt,
evscntl_EVSError_t **error);
Get the value for the given property or for all the properties
for the specified IPnet.
Arguments:
inst -- RAD instance
propstr (nullable) -- a comma-separated list of IPnet
properties to get
result -- list of IPnet property information
result_cnt -- Number of items in result array
error
IPnet Retrieve
rc_err_t evscntl_IPnet__rad_get_name(adr_name_t **result,
int n,
...);
Obtain RAD name of a IPnet object.
Arguments:
result -- RAD name
n -- Number of key-value pairs provided as variadic arguments
... -- Optional key-value pairs that compose the primary key
rc_err_t evscntl_IPnet__rad_lookup(rc_conn_t *c,
boolean_t strict,
rc_instance_t **result,
int n,
...);
Lookup a IPnet instance.
Construct a RAD name for the interface based on the provided
key-value pairs and perform a lookup. If successful, instance
reference is returned in the result.
Arguments:
c -- RAD connection handle
strict -- Strict (B_TRUE) or relaxed (B_FALSE) versioning
result -- RAD instance
n -- Number of key-value pairs provided as variadic arguments
... -- Optional key-value pairs that compose the primary key
rc_err_t evscntl_IPnet__rad_list(rc_conn_t *c,
boolean_t strict,
adr_pattern_scheme_t scheme,
adr_name_t ***result,
int *result_count,
int n,
...);
List RAD names of a available IPnet instances.
Returns an array and array size of matching object names.
Arguments:
c -- RAD connection handle
strict -- Strict (B_TRUE) or relaxed (B_FALSE) versioning
scheme -- Apply glob (NS_GLOB) or regex (NS_REGEX) matching
result -- Array of RAD names
result_count -- Number of names in result array
n -- Number of key-value pairs provided as variadic arguments
... -- Optional key-value pairs that compose the primary key
ENUMERATED TYPES
enum EVSStatus -- the status of EVS
typedef enum evscntl_EVSStatus {
EEVSS_IDLE = 0,
EEVSS_BUSY = 1,
} evscntl_EVSStatus_t;
EEVSS_IDLE (0) -- EVS has no VPort in use
EEVSS_BUSY (1) -- EVS has at least one VPort in use
enum VPortStatus -- the status of VPort
typedef enum evscntl_VPortStatus {
EVPS_FREE = 0,
EVPS_USED = 1,
} evscntl_VPortStatus_t;
EVPS_FREE (0) -- VPort is not assigned
EVPS_USED (1) -- VPort is assigned to a vnic
enum Permission -- permission of properties
typedef enum evscntl_Permission {
EP_READ = 1,
EP_WRITE = 2,
EP_READWRITE = 3,
} evscntl_Permission_t;
EP_READ (1) -- read permission
EP_WRITE (2) -- write permission
EP_READWRITE (3) -- read and write permission
enum IPVersion -- the IP version
typedef enum evscntl_IPVersion {
EIPV_IPV4 = 0,
EIPV_IPV6 = 1,
} evscntl_IPVersion_t;
EIPV_IPV4 (0) -- IPv4
EIPV_IPV6 (1) -- IPv6
STRUCTURED TYPES
struct EVSError
typedef struct evscntl_EVSError evscntl_EVSError_t;
struct evscntl_EVSError {
int eevse_err;
char *eevse_errmsg;
};
void evscntl_EVSError_free(evscntl_EVSError_t *in);
Fields:
eevse_err
eevse_errmsg
struct PropertyNV -- Property name and its value
typedef struct evscntl_PropertyNV evscntl_PropertyNV_t;
struct evscntl_PropertyNV {
char *epnv_name;
char *epnv_value;
};
void evscntl_PropertyNV_free(evscntl_PropertyNV_t *in);
Fields:
epnv_name -- the name of property
epnv_value -- the current value of property
struct Property -- Detailed information about a property.
typedef struct evscntl_Property evscntl_Property_t;
struct evscntl_Property {
char *ep_name;
evscntl_Permission_t ep_permission;
char *ep_current_value;
char *ep_effective_value;
char *ep_default_value;
char *ep_possible_values;
};
void evscntl_Property_free(evscntl_Property_t *in);
Fields:
ep_name -- the name of property
ep_permission -- permission to read/wirte the property
ep_current_value -- the current value of property
ep_effective_value -- the effective value of property
ep_default_value -- the default value of property
ep_possible_values -- the comma-separated list of values the
property can have.
struct IPnetInfo -- IPnet. The networking configuration of an EVS which
includes the permissible IPv4 or IPv6 addresses along with the default
router.
typedef struct evscntl_IPnetInfo evscntl_IPnetInfo_t;
struct evscntl_IPnetInfo {
char *eipi_name;
char *eipi_uuid;
char *eipi_evsname;
char *eipi_evsuuid;
char *eipi_tenantname;
evscntl_PropertyNV_t **eipi_props;
int eipi_props_count;
char *eipi_start;
char *eipi_end;
char *eipi_range;
evscntl_IPVersion_t eipi_ipvers;
};
void evscntl_IPnetInfo_free(evscntl_IPnetInfo_t *in);
Fields:
eipi_name -- the name of IPnet
eipi_uuid -- the UUID of IPnet
eipi_evsname -- the name of EVS
eipi_evsuuid -- the UUID of EVS
eipi_tenantname -- the name of the Tenant
eipi_props -- the properties of IPnet
eipi_props_count
eipi_start -- start address of ip address range
eipi_end -- end address of ip address range
eipi_range -- a comma-separated list of available IP addresses that
can be assigned to VPort
eipi_ipvers -- the IP version of IPnet
struct VPortInfo -- Virtual Port. The configuration parameters of a EVS
part which are to be inherited by VNICs connected to the EVS.
typedef struct evscntl_VPortInfo evscntl_VPortInfo_t;
struct evscntl_VPortInfo {
char *evpi_name;
char *evpi_uuid;
char *evpi_evsname;
char *evpi_evsuuid;
char *evpi_tenantname;
evscntl_VPortStatus_t evpi_status;
char *evpi_vnicname;
evscntl_PropertyNV_t **evpi_props;
int evpi_props_count;
char *evpi_hostname;
};
void evscntl_VPortInfo_free(evscntl_VPortInfo_t *in);
Fields:
evpi_name -- the name of VPort
evpi_uuid -- the UUID of VPort
evpi_evsname -- the name of EVS
evpi_evsuuid -- the UUID of EVS associated with this VPort
evpi_tenantname -- the name of EVS' Tenant
evpi_status -- the status of VPort
evpi_vnicname -- name of the VNIC associated with the VPort
evpi_props -- the properties of VPort
evpi_props_count
evpi_hostname -- the host that has the VNIC associated with the
VPort
struct EVSInfo
typedef struct evscntl_EVSInfo evscntl_EVSInfo_t;
struct evscntl_EVSInfo {
char *eevsi_name;
char *eevsi_uuid;
char *eevsi_tenantname;
evscntl_PropertyNV_t **eevsi_props;
int eevsi_props_count;
evscntl_EVSStatus_t eevsi_status;
evscntl_VPortInfo_t **eevsi_vports;
int eevsi_vports_count;
evscntl_IPnetInfo_t **eevsi_ipnets;
int eevsi_ipnets_count;
};
void evscntl_EVSInfo_free(evscntl_EVSInfo_t *in);
Elastic Virtual Switch. A software implentation of a Layer-2 switch
which facilitates inter-communication between Virtual Machines
connected to it.
Fields:
eevsi_name -- the name of EVS
eevsi_uuid -- the UUID of EVS
eevsi_tenantname -- name of the Tenant that owns the EVS
eevsi_props -- the properties of EVS
eevsi_props_count
eevsi_status -- the status of EVS, could be idle or busy
eevsi_vports -- the VPort(s) associated with EVS
eevsi_vports_count
eevsi_ipnets -- the IPnet associated with EVS
eevsi_ipnets_count
struct EVSImplInfo
typedef struct evscntl_EVSImplInfo evscntl_EVSImplInfo_t;
struct evscntl_EVSImplInfo {
evscntl_EVSInfo_t *eevsii_evsinfo;
char *eevsii_uplink_port;
char *eevsii_vxlan_localaddr;
char *eevsii_vxlan_mgroup;
char *eevsii_vxlan_ipvers;
};
void evscntl_EVSImplInfo_free(evscntl_EVSImplInfo_t *in);
Elastic Virtual Switch. A software implentation of a Layer-2 switch
which facilitates inter-communication between Virtual Machines
connected to it. Includes the detailed information of Layer-2
network configuration.
Fields:
eevsii_evsinfo -- general information of EVS
eevsii_uplink_port -- datalink to be used for VLANs or for VXLANs
eevsii_vxlan_localaddr -- IP address on top of which VXLAN datalink
should be created
eevsii_vxlan_mgroup -- multicast address that needs to be used
while creating VXLAN links
eevsii_vxlan_ipvers -- IP version of the address that must be used
for the IP interface that will host VXLAN datalinks
struct VPortStat -- VPort stats
typedef struct evscntl_VPortStat evscntl_VPortStat_t;
struct evscntl_VPortStat {
char *evps_vportname;
char *evps_evsname;
char *evps_tenantname;
char *evps_vnicname;
char *evps_hostname;
unsigned long long evps_rbytes;
unsigned long long evps_ipackets;
unsigned long long evps_idrops;
unsigned long long evps_idropbytes;
unsigned long long evps_obytes;
unsigned long long evps_opackets;
unsigned long long evps_odrops;
unsigned long long evps_odropbytes;
int evps_errcode;
};
void evscntl_VPortStat_free(evscntl_VPortStat_t *in);
Fields:
evps_vportname -- the name of VPort
evps_evsname -- the name of EVS
evps_tenantname -- the name of Tenant that owns the EVS
evps_vnicname -- name of the VNIC associated with the VPort
evps_hostname -- the host that has the VNIC associated with the
VPort
evps_rbytes -- number of incoming byte
evps_ipackets -- number of incoming packet
evps_idrops -- number of incoming packet dropped
evps_idropbytes -- number of incoming bytes dropped
evps_obytes -- number of outgoing byte
evps_opackets -- number of outgoing packet
evps_odrops -- number of outgoing packet dropped
evps_odropbytes -- number of outgoing byte dropped
evps_errcode -- EVS err code
struct ControllerProperty -- Specifies a Controller Property
typedef struct evscntl_ControllerProperty
evscntl_ControllerProperty_t;
struct evscntl_ControllerProperty {
char *ecp_name;
evscntl_Permission_t ecp_permission;
char *ecp_current_value;
char *ecp_default_value;
char *ecp_host;
};
void evscntl_ControllerProperty_free(evscntl_ControllerProperty_t *in);
Fields:
ecp_name -- the name of property
ecp_permission -- permission to read/wirte the property
ecp_current_value -- the value of property
ecp_default_value -- the default value of property
ecp_host -- the hostname for host-specific property
struct L2TypeIdRange
typedef struct evscntl_L2TypeIdRange evscntl_L2TypeIdRange_t;
struct evscntl_L2TypeIdRange {
char *eltir_name;
char *eltir_value;
char *eltir_host;
evscntl_PropertyNV_t **eltir_range;
int eltir_range_count;
};
void evscntl_L2TypeIdRange_free(evscntl_L2TypeIdRange_t *in);
Captures the L2 Type (VLAN and VXLAN) ID range -- for a host and
(uplink-port or vxlan-addr) -- for rest of the hosts that do not
have per-host setting
Fields:
eltir_name -- the name of property: uplink-port or vxlan-addr
eltir_value -- the value of property
eltir_host -- the name of the host
eltir_range -- List of range values. Currently covers vlan-range
and vxlan-range.
eltir_range_count
VERSION
1.2
ATTRIBUTES
See attributes(7) for descriptions of the following attributes:
+--------------------+-------------------------------------------------+
| ATTRIBUTE TYPE | ATTRIBUTE VALUE |
+--------------------+-------------------------------------------------+
|Availability | system/management/rad/module/rad-evs-controller |
+--------------------+-------------------------------------------------+
|Interface Stability | Private |
+--------------------+-------------------------------------------------+
SEE ALSO
rad(8)
NOTES
1. Accessing Python documentation for this module:
$ pydoc rad.bindings.com.oracle.solaris.rad.evscntl_1
Solaris 11.4 2017-02-01 EVSCNTL-1(3rad)