class Openwsman::Transport
Transport
reflects details of the http(s) transport layer between client and server.
Public Class Methods
called when authentication credentials missing or wrong
# File openwsman/openwsman.rb, line 63 def Transport.auth_request_callback client, auth_type # override in client code # return Array of [ username, password ] # return nil to abort authentication end
Public Instance Methods
Get the HTTP agent identifier string
char *agent() { return wsman_transport_get_agent ((WsManClient *)$self); } %rename("username") get_username(); %newobject get_username; /* * Server credentials * * Get the username part of the http transport credentials * * call-seq: * transport.username -> String * */ char *get_username() { return wsman_transport_get_userName((WsManClient *)$self); } %rename("username=") set_username(char *user_name); /* * Server credentials * * Set the username part of the http transport credentials * * call-seq: * transport.username = "Username" * */ void set_username(char *user_name) { wsman_transport_set_userName((WsManClient *)$self, user_name); } %rename("password") get_password(); %newobject get_password; /* * Server credentials * * Get the password part of the http transport credentials * * call-seq: * transport.password -> String * */ char *get_password() { return wsman_transport_get_password((WsManClient *)$self); } %rename("password=") set_password(char *password); /* * Server credentials * * Set the password part of the http transport credentials * * call-seq: * transport.password = "Password" * */ void set_password(char *password) { wsman_transport_set_password((WsManClient *)$self, password); } %rename("proxy_username") get_proxy_username(); %newobject get_proxy_username; /* * Windows clients: HTTP proxy credentials * * Get the username part of the http proxy credentials * * call-seq: * transport.proxy_username -> String * */ char *get_proxy_username() { return wsman_transport_get_proxy_username((WsManClient *)$self ); } %rename("proxy_username=") set_proxy_username(char *proxy_username); /* * Windows clients: HTTP proxy credentials * * Set the username part of the http proxy credentials * * call-seq: * transport.proxy_username = "proxy_username" * */ void set_proxy_username(char *proxy_username) { wsman_transport_set_proxy_username((WsManClient *)$self, proxy_username ); } %rename("proxy_password") get_proxy_password(); %newobject get_proxy_password; /* * Windows clients: HTTP proxy credentials * * Get the password part of the http proxy credentials * * call-seq: * transport.proxy_password -> String * */ char *get_proxy_password() { return wsman_transport_get_proxy_password((WsManClient *)$self ); } %rename("proxy_password=") set_proxy_password(char *proxy_password); /* * Windows clients: HTTP proxy credentials * * Set the password part of the http proxy credentials * * call-seq: * transport.proxy_password = "proxy_password" * */ void set_proxy_password(char *proxy_password) { wsman_transport_set_proxy_password((WsManClient *)$self, proxy_password ); } %rename("auth_method=") set_auth_method( const char *am); /* * Set the authentication method * * Value must be one of: * * Openwsman::NO_AUTH_STR * * Openwsman::BASIC_AUTH_STR * * Openwsman::DIGEST_AUTH_STR * * Openwsman::PASS_AUTH_STR * * Openwsman::NTLM_AUTH_STR * * Openwsman::GSSNEGOTIATE_AUTH_STR * */ void set_auth_method(const char *am) { wsman_transport_set_auth_method((WsManClient *)$self, am); } %newobject auth_method; /* * Set the authentication method * * call-seq: * transport.auth_method -> String * */ char *auth_method() { return wsman_transport_get_auth_method ((WsManClient *)$self); } /* * Set the authentication method string corresponding to the given * auth method id * * Value must be one of: * * Openwsman::NO_AUTH * * Openwsman::BASIC_AUTH * * Openwsman::DIGEST_AUTH * * Openwsman::PASS_AUTH * * Openwsman::NTLM_AUTH * * Openwsman::GSSNEGOTIATE_AUTH * * call-seq: * transport.auth_name(Integer) -> String * */ static const char *auth_name(int auth) { return wsmc_transport_get_auth_name(auth); } /* * Get the authentication method integer id * */ int auth_value() { return wsmc_transport_get_auth_value((WsManClient *)$self); } /* * Get string corresponding to given error code * * call-seq: * transport.error_string(Integer) -> String * */ static char *error_string(int err) { return wsman_transport_get_last_error_string(err); } %rename("timeout=") set_timeout(unsigned long timeout); /* * Set the transport timeout in seconds * * ====== Note * This is the http layer timeout. Not to be confused with the * WS-Management operation timeout set via Openwsman::ClientOptions.timeout * */ void set_timeout(unsigned long timeout) { wsman_transport_set_timeout((WsManClient *)$self, timeout); } /* * Get the transport timeout in seconds * * call-seq: * transport.timeout -> Integer * */ unsigned long timeout() { return wsman_transport_get_timeout((WsManClient *)$self); } %rename("verify_peer=") set_verify_peer( VALUE rvalue ); /* * verify the peer in SSL communication ? * * If passed +false+, +nil+, or 0: disable peer verification * else: enable peer verification * */ void set_verify_peer( VALUE rvalue ) { unsigned int value; if ((rvalue == Qfalse) || (rvalue == Qnil)) { value = 0; } else if ((TYPE(rvalue) == T_FIXNUM) && (FIX2INT(rvalue) == 0)) { value = 0; } else { value = 1; } wsman_transport_set_verify_peer((WsManClient *)$self, value); } %rename("verify_peer?") verify_peer(); %typemap(out) unsigned int verify_peer "$result = ($1 != 0) ? Qtrue : Qfalse;"; /* * Peer to be verified ? * * call-seq: * transport.verify_peer? -> Boolean * */ unsigned int verify_peer() { return wsman_transport_get_verify_peer((WsManClient *)$self); } %rename("verify_host=") set_verify_host(VALUE rvalue); /* * verify the host in SSL communication ? * * If passed +false+, +nil+, or 0: disable peer verification * else: enable peer verification * */ void set_verify_host( VALUE rvalue ) { unsigned int value; if ((rvalue == Qfalse) || (rvalue == Qnil)) { value = 0; } else if ((TYPE(rvalue) == T_FIXNUM) && (FIX2INT(rvalue) == 0)) { value = 0; } else { value = 1; } wsman_transport_set_verify_host((WsManClient *)$self, value); } %rename("verify_host?") verify_host(); %typemap(out) unsigned int verify_host "$result = ($1 != 0) ? Qtrue : Qfalse;"; /* * Host to be verified ? * * call-seq: * transport.verify_host? -> Boolean * */ unsigned int verify_host() { return wsman_transport_get_verify_host((WsManClient *)$self); } %rename("proxy=") set_proxy(const char *proxy); /* * Set http proxy URL * * Pass nil to disable proxy communication * * ====== Example * transport.proxy = "http://your.proxy.com:80" * */ void set_proxy(const char *proxy) { wsman_transport_set_proxy((WsManClient *)$self, proxy); } %newobject proxy; /* * Get http proxy URL * */ char *proxy() { return wsman_transport_get_proxy((WsManClient *)$self); } %rename("proxyauth=") set_proxyauth(const char *pauth); /* * Linux clients: HTTP proxy credentials * * Set the proxy username and password * * ====== Example * transport.proxyauth = "username:password" * */ void set_proxyauth(const char *pauth) { wsman_transport_set_proxyauth((WsManClient *)$self, pauth); } %newobject proxyauth; /* * Linux clients: HTTP proxy credentials * * Get the proxy username and password as "username:password" * * call-seq: * transport.proxyauth -> String * */ char *proxyauth(){ return wsman_transport_get_proxyauth((WsManClient *)$self); } %rename("cainfo=") set_cainfo(const char *cainfo); /* * Set the certification authority (CAINFO) * */ void set_cainfo(const char *cainfo) { wsman_transport_set_cainfo((WsManClient *)$self, cainfo); } %newobject cainfo; /* * Get the certification authority (CAINFO) * * call-seq: * transport.cainfo -> String * */ char *cainfo() { return wsman_transport_get_cainfo((WsManClient *)$self); } %rename("certhumbprint=") set_certhumbprint(const char *arg); /* * Set the certification thumbprint * */ void set_certhumbprint(const char *arg) { wsman_transport_set_certhumbprint((WsManClient *)$self, arg); } %newobject certhumbprint; /* * Set the certification thumbprint * * call-seq: * transport.certhumbprint -> String * */ char *certhumbprint() { return wsman_transport_get_certhumbprint((WsManClient *)$self); } %rename("capath=") set_capath(const char *capath); /* * Set the path to the certification authority (CAINFO) store * */ void set_capath(const char *capath) { wsman_transport_set_capath((WsManClient *)$self, capath); } %newobject capath; /* * Get the path to the certification authority (CAINFO) store * */ char *capath() { return wsman_transport_get_capath((WsManClient *)$self); } %rename("caoid=") set_caoid(const char *oid); /* * Windows client * * Set the CA OID * * ====== Reference * http://support.microsoft.com/kb/287547 * */ void set_caoid(const char *oid) { wsman_transport_set_caoid((WsManClient *)$self, oid); } %newobject caoid; /* * Windows client * * Get the CA OID * */ char *caoid() { return wsman_transport_get_caoid((WsManClient *)$self); } #ifdef _WIN32 %rename("calocal=") set_calocal(BOOL local); /* * Windows client * * Use local CA ? * */ void set_calocal(BOOL local) { wsman_transport_set_calocal((WsManClient *)$self, local); } /* * Windows client * * Use local CA ? * * call-seq: * transport.calocal -> Boolean * */ BOOL calocal() { return wsman_transport_get_calocal((WsManClient *)$self); } #endif %rename("cert=") set_cert(const char *cert); /* * Set the certificate * */ void set_cert(const char *cert) { wsman_transport_set_cert((WsManClient *)$self, cert); } %newobject cert; /* * Get the certificate * */ char *cert() { return wsman_transport_get_cert((WsManClient *)$self); } %rename("key=") set_key(const char *key); /* * Set the key * */ void set_key(const char *key) { wsman_transport_set_key((WsManClient *)$self, key); } %newobject key; /* * Get the key * */ char *key() { return wsman_transport_get_key((WsManClient *)$self); } }
Set the HTTP agent identifier (User-agent:) string
This is how the client will show up in the servers http log. Defaults to “Openwsman”
void set_agent(const char *agent) { wsman_transport_set_agent((WsManClient *)$self, agent); } %newobject agent; /* * Get the HTTP agent identifier string * * call-seq: * transport.agent -> String * */ char *agent() { return wsman_transport_get_agent ((WsManClient *)$self); } %rename("username") get_username(); %newobject get_username; /* * Server credentials * * Get the username part of the http transport credentials * * call-seq: * transport.username -> String * */ char *get_username() { return wsman_transport_get_userName((WsManClient *)$self); } %rename("username=") set_username(char *user_name); /* * Server credentials * * Set the username part of the http transport credentials * * call-seq: * transport.username = "Username" * */ void set_username(char *user_name) { wsman_transport_set_userName((WsManClient *)$self, user_name); } %rename("password") get_password(); %newobject get_password; /* * Server credentials * * Get the password part of the http transport credentials * * call-seq: * transport.password -> String * */ char *get_password() { return wsman_transport_get_password((WsManClient *)$self); } %rename("password=") set_password(char *password); /* * Server credentials * * Set the password part of the http transport credentials * * call-seq: * transport.password = "Password" * */ void set_password(char *password) { wsman_transport_set_password((WsManClient *)$self, password); } %rename("proxy_username") get_proxy_username(); %newobject get_proxy_username; /* * Windows clients: HTTP proxy credentials * * Get the username part of the http proxy credentials * * call-seq: * transport.proxy_username -> String * */ char *get_proxy_username() { return wsman_transport_get_proxy_username((WsManClient *)$self ); } %rename("proxy_username=") set_proxy_username(char *proxy_username); /* * Windows clients: HTTP proxy credentials * * Set the username part of the http proxy credentials * * call-seq: * transport.proxy_username = "proxy_username" * */ void set_proxy_username(char *proxy_username) { wsman_transport_set_proxy_username((WsManClient *)$self, proxy_username ); } %rename("proxy_password") get_proxy_password(); %newobject get_proxy_password; /* * Windows clients: HTTP proxy credentials * * Get the password part of the http proxy credentials * * call-seq: * transport.proxy_password -> String * */ char *get_proxy_password() { return wsman_transport_get_proxy_password((WsManClient *)$self ); } %rename("proxy_password=") set_proxy_password(char *proxy_password); /* * Windows clients: HTTP proxy credentials * * Set the password part of the http proxy credentials * * call-seq: * transport.proxy_password = "proxy_password" * */ void set_proxy_password(char *proxy_password) { wsman_transport_set_proxy_password((WsManClient *)$self, proxy_password ); } %rename("auth_method=") set_auth_method( const char *am); /* * Set the authentication method * * Value must be one of: * * Openwsman::NO_AUTH_STR * * Openwsman::BASIC_AUTH_STR * * Openwsman::DIGEST_AUTH_STR * * Openwsman::PASS_AUTH_STR * * Openwsman::NTLM_AUTH_STR * * Openwsman::GSSNEGOTIATE_AUTH_STR * */ void set_auth_method(const char *am) { wsman_transport_set_auth_method((WsManClient *)$self, am); } %newobject auth_method; /* * Set the authentication method * * call-seq: * transport.auth_method -> String * */ char *auth_method() { return wsman_transport_get_auth_method ((WsManClient *)$self); } /* * Set the authentication method string corresponding to the given * auth method id * * Value must be one of: * * Openwsman::NO_AUTH * * Openwsman::BASIC_AUTH * * Openwsman::DIGEST_AUTH * * Openwsman::PASS_AUTH * * Openwsman::NTLM_AUTH * * Openwsman::GSSNEGOTIATE_AUTH * * call-seq: * transport.auth_name(Integer) -> String * */ static const char *auth_name(int auth) { return wsmc_transport_get_auth_name(auth); } /* * Get the authentication method integer id * */ int auth_value() { return wsmc_transport_get_auth_value((WsManClient *)$self); } /* * Get string corresponding to given error code * * call-seq: * transport.error_string(Integer) -> String * */ static char *error_string(int err) { return wsman_transport_get_last_error_string(err); } %rename("timeout=") set_timeout(unsigned long timeout); /* * Set the transport timeout in seconds * * ====== Note * This is the http layer timeout. Not to be confused with the * WS-Management operation timeout set via Openwsman::ClientOptions.timeout * */ void set_timeout(unsigned long timeout) { wsman_transport_set_timeout((WsManClient *)$self, timeout); } /* * Get the transport timeout in seconds * * call-seq: * transport.timeout -> Integer * */ unsigned long timeout() { return wsman_transport_get_timeout((WsManClient *)$self); } %rename("verify_peer=") set_verify_peer( VALUE rvalue ); /* * verify the peer in SSL communication ? * * If passed +false+, +nil+, or 0: disable peer verification * else: enable peer verification * */ void set_verify_peer( VALUE rvalue ) { unsigned int value; if ((rvalue == Qfalse) || (rvalue == Qnil)) { value = 0; } else if ((TYPE(rvalue) == T_FIXNUM) && (FIX2INT(rvalue) == 0)) { value = 0; } else { value = 1; } wsman_transport_set_verify_peer((WsManClient *)$self, value); } %rename("verify_peer?") verify_peer(); %typemap(out) unsigned int verify_peer "$result = ($1 != 0) ? Qtrue : Qfalse;"; /* * Peer to be verified ? * * call-seq: * transport.verify_peer? -> Boolean * */ unsigned int verify_peer() { return wsman_transport_get_verify_peer((WsManClient *)$self); } %rename("verify_host=") set_verify_host(VALUE rvalue); /* * verify the host in SSL communication ? * * If passed +false+, +nil+, or 0: disable peer verification * else: enable peer verification * */ void set_verify_host( VALUE rvalue ) { unsigned int value; if ((rvalue == Qfalse) || (rvalue == Qnil)) { value = 0; } else if ((TYPE(rvalue) == T_FIXNUM) && (FIX2INT(rvalue) == 0)) { value = 0; } else { value = 1; } wsman_transport_set_verify_host((WsManClient *)$self, value); } %rename("verify_host?") verify_host(); %typemap(out) unsigned int verify_host "$result = ($1 != 0) ? Qtrue : Qfalse;"; /* * Host to be verified ? * * call-seq: * transport.verify_host? -> Boolean * */ unsigned int verify_host() { return wsman_transport_get_verify_host((WsManClient *)$self); } %rename("proxy=") set_proxy(const char *proxy); /* * Set http proxy URL * * Pass nil to disable proxy communication * * ====== Example * transport.proxy = "http://your.proxy.com:80" * */ void set_proxy(const char *proxy) { wsman_transport_set_proxy((WsManClient *)$self, proxy); } %newobject proxy; /* * Get http proxy URL * */ char *proxy() { return wsman_transport_get_proxy((WsManClient *)$self); } %rename("proxyauth=") set_proxyauth(const char *pauth); /* * Linux clients: HTTP proxy credentials * * Set the proxy username and password * * ====== Example * transport.proxyauth = "username:password" * */ void set_proxyauth(const char *pauth) { wsman_transport_set_proxyauth((WsManClient *)$self, pauth); } %newobject proxyauth; /* * Linux clients: HTTP proxy credentials * * Get the proxy username and password as "username:password" * * call-seq: * transport.proxyauth -> String * */ char *proxyauth(){ return wsman_transport_get_proxyauth((WsManClient *)$self); } %rename("cainfo=") set_cainfo(const char *cainfo); /* * Set the certification authority (CAINFO) * */ void set_cainfo(const char *cainfo) { wsman_transport_set_cainfo((WsManClient *)$self, cainfo); } %newobject cainfo; /* * Get the certification authority (CAINFO) * * call-seq: * transport.cainfo -> String * */ char *cainfo() { return wsman_transport_get_cainfo((WsManClient *)$self); } %rename("certhumbprint=") set_certhumbprint(const char *arg); /* * Set the certification thumbprint * */ void set_certhumbprint(const char *arg) { wsman_transport_set_certhumbprint((WsManClient *)$self, arg); } %newobject certhumbprint; /* * Set the certification thumbprint * * call-seq: * transport.certhumbprint -> String * */ char *certhumbprint() { return wsman_transport_get_certhumbprint((WsManClient *)$self); } %rename("capath=") set_capath(const char *capath); /* * Set the path to the certification authority (CAINFO) store * */ void set_capath(const char *capath) { wsman_transport_set_capath((WsManClient *)$self, capath); } %newobject capath; /* * Get the path to the certification authority (CAINFO) store * */ char *capath() { return wsman_transport_get_capath((WsManClient *)$self); } %rename("caoid=") set_caoid(const char *oid); /* * Windows client * * Set the CA OID * * ====== Reference * http://support.microsoft.com/kb/287547 * */ void set_caoid(const char *oid) { wsman_transport_set_caoid((WsManClient *)$self, oid); } %newobject caoid; /* * Windows client * * Get the CA OID * */ char *caoid() { return wsman_transport_get_caoid((WsManClient *)$self); } #ifdef _WIN32 %rename("calocal=") set_calocal(BOOL local); /* * Windows client * * Use local CA ? * */ void set_calocal(BOOL local) { wsman_transport_set_calocal((WsManClient *)$self, local); } /* * Windows client * * Use local CA ? * * call-seq: * transport.calocal -> Boolean * */ BOOL calocal() { return wsman_transport_get_calocal((WsManClient *)$self); } #endif %rename("cert=") set_cert(const char *cert); /* * Set the certificate * */ void set_cert(const char *cert) { wsman_transport_set_cert((WsManClient *)$self, cert); } %newobject cert; /* * Get the certificate * */ char *cert() { return wsman_transport_get_cert((WsManClient *)$self); } %rename("key=") set_key(const char *key); /* * Set the key * */ void set_key(const char *key) { wsman_transport_set_key((WsManClient *)$self, key); } %newobject key; /* * Get the key * */ char *key() { return wsman_transport_get_key((WsManClient *)$self); } }
Set the authentication method
char *auth_method() { return wsman_transport_get_auth_method ((WsManClient *)$self); } /* * Set the authentication method string corresponding to the given * auth method id * * Value must be one of: * * Openwsman::NO_AUTH * * Openwsman::BASIC_AUTH * * Openwsman::DIGEST_AUTH * * Openwsman::PASS_AUTH * * Openwsman::NTLM_AUTH * * Openwsman::GSSNEGOTIATE_AUTH * * call-seq: * transport.auth_name(Integer) -> String * */ static const char *auth_name(int auth) { return wsmc_transport_get_auth_name(auth); } /* * Get the authentication method integer id * */ int auth_value() { return wsmc_transport_get_auth_value((WsManClient *)$self); } /* * Get string corresponding to given error code * * call-seq: * transport.error_string(Integer) -> String * */ static char *error_string(int err) { return wsman_transport_get_last_error_string(err); } %rename("timeout=") set_timeout(unsigned long timeout); /* * Set the transport timeout in seconds * * ====== Note * This is the http layer timeout. Not to be confused with the * WS-Management operation timeout set via Openwsman::ClientOptions.timeout * */ void set_timeout(unsigned long timeout) { wsman_transport_set_timeout((WsManClient *)$self, timeout); } /* * Get the transport timeout in seconds * * call-seq: * transport.timeout -> Integer * */ unsigned long timeout() { return wsman_transport_get_timeout((WsManClient *)$self); } %rename("verify_peer=") set_verify_peer( VALUE rvalue ); /* * verify the peer in SSL communication ? * * If passed +false+, +nil+, or 0: disable peer verification * else: enable peer verification * */ void set_verify_peer( VALUE rvalue ) { unsigned int value; if ((rvalue == Qfalse) || (rvalue == Qnil)) { value = 0; } else if ((TYPE(rvalue) == T_FIXNUM) && (FIX2INT(rvalue) == 0)) { value = 0; } else { value = 1; } wsman_transport_set_verify_peer((WsManClient *)$self, value); } %rename("verify_peer?") verify_peer(); %typemap(out) unsigned int verify_peer "$result = ($1 != 0) ? Qtrue : Qfalse;"; /* * Peer to be verified ? * * call-seq: * transport.verify_peer? -> Boolean * */ unsigned int verify_peer() { return wsman_transport_get_verify_peer((WsManClient *)$self); } %rename("verify_host=") set_verify_host(VALUE rvalue); /* * verify the host in SSL communication ? * * If passed +false+, +nil+, or 0: disable peer verification * else: enable peer verification * */ void set_verify_host( VALUE rvalue ) { unsigned int value; if ((rvalue == Qfalse) || (rvalue == Qnil)) { value = 0; } else if ((TYPE(rvalue) == T_FIXNUM) && (FIX2INT(rvalue) == 0)) { value = 0; } else { value = 1; } wsman_transport_set_verify_host((WsManClient *)$self, value); } %rename("verify_host?") verify_host(); %typemap(out) unsigned int verify_host "$result = ($1 != 0) ? Qtrue : Qfalse;"; /* * Host to be verified ? * * call-seq: * transport.verify_host? -> Boolean * */ unsigned int verify_host() { return wsman_transport_get_verify_host((WsManClient *)$self); } %rename("proxy=") set_proxy(const char *proxy); /* * Set http proxy URL * * Pass nil to disable proxy communication * * ====== Example * transport.proxy = "http://your.proxy.com:80" * */ void set_proxy(const char *proxy) { wsman_transport_set_proxy((WsManClient *)$self, proxy); } %newobject proxy; /* * Get http proxy URL * */ char *proxy() { return wsman_transport_get_proxy((WsManClient *)$self); } %rename("proxyauth=") set_proxyauth(const char *pauth); /* * Linux clients: HTTP proxy credentials * * Set the proxy username and password * * ====== Example * transport.proxyauth = "username:password" * */ void set_proxyauth(const char *pauth) { wsman_transport_set_proxyauth((WsManClient *)$self, pauth); } %newobject proxyauth; /* * Linux clients: HTTP proxy credentials * * Get the proxy username and password as "username:password" * * call-seq: * transport.proxyauth -> String * */ char *proxyauth(){ return wsman_transport_get_proxyauth((WsManClient *)$self); } %rename("cainfo=") set_cainfo(const char *cainfo); /* * Set the certification authority (CAINFO) * */ void set_cainfo(const char *cainfo) { wsman_transport_set_cainfo((WsManClient *)$self, cainfo); } %newobject cainfo; /* * Get the certification authority (CAINFO) * * call-seq: * transport.cainfo -> String * */ char *cainfo() { return wsman_transport_get_cainfo((WsManClient *)$self); } %rename("certhumbprint=") set_certhumbprint(const char *arg); /* * Set the certification thumbprint * */ void set_certhumbprint(const char *arg) { wsman_transport_set_certhumbprint((WsManClient *)$self, arg); } %newobject certhumbprint; /* * Set the certification thumbprint * * call-seq: * transport.certhumbprint -> String * */ char *certhumbprint() { return wsman_transport_get_certhumbprint((WsManClient *)$self); } %rename("capath=") set_capath(const char *capath); /* * Set the path to the certification authority (CAINFO) store * */ void set_capath(const char *capath) { wsman_transport_set_capath((WsManClient *)$self, capath); } %newobject capath; /* * Get the path to the certification authority (CAINFO) store * */ char *capath() { return wsman_transport_get_capath((WsManClient *)$self); } %rename("caoid=") set_caoid(const char *oid); /* * Windows client * * Set the CA OID * * ====== Reference * http://support.microsoft.com/kb/287547 * */ void set_caoid(const char *oid) { wsman_transport_set_caoid((WsManClient *)$self, oid); } %newobject caoid; /* * Windows client * * Get the CA OID * */ char *caoid() { return wsman_transport_get_caoid((WsManClient *)$self); } #ifdef _WIN32 %rename("calocal=") set_calocal(BOOL local); /* * Windows client * * Use local CA ? * */ void set_calocal(BOOL local) { wsman_transport_set_calocal((WsManClient *)$self, local); } /* * Windows client * * Use local CA ? * * call-seq: * transport.calocal -> Boolean * */ BOOL calocal() { return wsman_transport_get_calocal((WsManClient *)$self); } #endif %rename("cert=") set_cert(const char *cert); /* * Set the certificate * */ void set_cert(const char *cert) { wsman_transport_set_cert((WsManClient *)$self, cert); } %newobject cert; /* * Get the certificate * */ char *cert() { return wsman_transport_get_cert((WsManClient *)$self); } %rename("key=") set_key(const char *key); /* * Set the key * */ void set_key(const char *key) { wsman_transport_set_key((WsManClient *)$self, key); } %newobject key; /* * Get the key * */ char *key() { return wsman_transport_get_key((WsManClient *)$self); } }
Set the authentication method
Value must be one of:
-
Openwsman::NO_AUTH_STR
-
Openwsman::BASIC_AUTH_STR
-
Openwsman::DIGEST_AUTH_STR
-
Openwsman::PASS_AUTH_STR
-
Openwsman::NTLM_AUTH_STR
-
Openwsman::GSSNEGOTIATE_AUTH_STR
void set_auth_method(const char *am) { wsman_transport_set_auth_method((WsManClient *)$self, am); } %newobject auth_method; /* * Set the authentication method * * call-seq: * transport.auth_method -> String * */ char *auth_method() { return wsman_transport_get_auth_method ((WsManClient *)$self); } /* * Set the authentication method string corresponding to the given * auth method id * * Value must be one of: * * Openwsman::NO_AUTH * * Openwsman::BASIC_AUTH * * Openwsman::DIGEST_AUTH * * Openwsman::PASS_AUTH * * Openwsman::NTLM_AUTH * * Openwsman::GSSNEGOTIATE_AUTH * * call-seq: * transport.auth_name(Integer) -> String * */ static const char *auth_name(int auth) { return wsmc_transport_get_auth_name(auth); } /* * Get the authentication method integer id * */ int auth_value() { return wsmc_transport_get_auth_value((WsManClient *)$self); } /* * Get string corresponding to given error code * * call-seq: * transport.error_string(Integer) -> String * */ static char *error_string(int err) { return wsman_transport_get_last_error_string(err); } %rename("timeout=") set_timeout(unsigned long timeout); /* * Set the transport timeout in seconds * * ====== Note * This is the http layer timeout. Not to be confused with the * WS-Management operation timeout set via Openwsman::ClientOptions.timeout * */ void set_timeout(unsigned long timeout) { wsman_transport_set_timeout((WsManClient *)$self, timeout); } /* * Get the transport timeout in seconds * * call-seq: * transport.timeout -> Integer * */ unsigned long timeout() { return wsman_transport_get_timeout((WsManClient *)$self); } %rename("verify_peer=") set_verify_peer( VALUE rvalue ); /* * verify the peer in SSL communication ? * * If passed +false+, +nil+, or 0: disable peer verification * else: enable peer verification * */ void set_verify_peer( VALUE rvalue ) { unsigned int value; if ((rvalue == Qfalse) || (rvalue == Qnil)) { value = 0; } else if ((TYPE(rvalue) == T_FIXNUM) && (FIX2INT(rvalue) == 0)) { value = 0; } else { value = 1; } wsman_transport_set_verify_peer((WsManClient *)$self, value); } %rename("verify_peer?") verify_peer(); %typemap(out) unsigned int verify_peer "$result = ($1 != 0) ? Qtrue : Qfalse;"; /* * Peer to be verified ? * * call-seq: * transport.verify_peer? -> Boolean * */ unsigned int verify_peer() { return wsman_transport_get_verify_peer((WsManClient *)$self); } %rename("verify_host=") set_verify_host(VALUE rvalue); /* * verify the host in SSL communication ? * * If passed +false+, +nil+, or 0: disable peer verification * else: enable peer verification * */ void set_verify_host( VALUE rvalue ) { unsigned int value; if ((rvalue == Qfalse) || (rvalue == Qnil)) { value = 0; } else if ((TYPE(rvalue) == T_FIXNUM) && (FIX2INT(rvalue) == 0)) { value = 0; } else { value = 1; } wsman_transport_set_verify_host((WsManClient *)$self, value); } %rename("verify_host?") verify_host(); %typemap(out) unsigned int verify_host "$result = ($1 != 0) ? Qtrue : Qfalse;"; /* * Host to be verified ? * * call-seq: * transport.verify_host? -> Boolean * */ unsigned int verify_host() { return wsman_transport_get_verify_host((WsManClient *)$self); } %rename("proxy=") set_proxy(const char *proxy); /* * Set http proxy URL * * Pass nil to disable proxy communication * * ====== Example * transport.proxy = "http://your.proxy.com:80" * */ void set_proxy(const char *proxy) { wsman_transport_set_proxy((WsManClient *)$self, proxy); } %newobject proxy; /* * Get http proxy URL * */ char *proxy() { return wsman_transport_get_proxy((WsManClient *)$self); } %rename("proxyauth=") set_proxyauth(const char *pauth); /* * Linux clients: HTTP proxy credentials * * Set the proxy username and password * * ====== Example * transport.proxyauth = "username:password" * */ void set_proxyauth(const char *pauth) { wsman_transport_set_proxyauth((WsManClient *)$self, pauth); } %newobject proxyauth; /* * Linux clients: HTTP proxy credentials * * Get the proxy username and password as "username:password" * * call-seq: * transport.proxyauth -> String * */ char *proxyauth(){ return wsman_transport_get_proxyauth((WsManClient *)$self); } %rename("cainfo=") set_cainfo(const char *cainfo); /* * Set the certification authority (CAINFO) * */ void set_cainfo(const char *cainfo) { wsman_transport_set_cainfo((WsManClient *)$self, cainfo); } %newobject cainfo; /* * Get the certification authority (CAINFO) * * call-seq: * transport.cainfo -> String * */ char *cainfo() { return wsman_transport_get_cainfo((WsManClient *)$self); } %rename("certhumbprint=") set_certhumbprint(const char *arg); /* * Set the certification thumbprint * */ void set_certhumbprint(const char *arg) { wsman_transport_set_certhumbprint((WsManClient *)$self, arg); } %newobject certhumbprint; /* * Set the certification thumbprint * * call-seq: * transport.certhumbprint -> String * */ char *certhumbprint() { return wsman_transport_get_certhumbprint((WsManClient *)$self); } %rename("capath=") set_capath(const char *capath); /* * Set the path to the certification authority (CAINFO) store * */ void set_capath(const char *capath) { wsman_transport_set_capath((WsManClient *)$self, capath); } %newobject capath; /* * Get the path to the certification authority (CAINFO) store * */ char *capath() { return wsman_transport_get_capath((WsManClient *)$self); } %rename("caoid=") set_caoid(const char *oid); /* * Windows client * * Set the CA OID * * ====== Reference * http://support.microsoft.com/kb/287547 * */ void set_caoid(const char *oid) { wsman_transport_set_caoid((WsManClient *)$self, oid); } %newobject caoid; /* * Windows client * * Get the CA OID * */ char *caoid() { return wsman_transport_get_caoid((WsManClient *)$self); } #ifdef _WIN32 %rename("calocal=") set_calocal(BOOL local); /* * Windows client * * Use local CA ? * */ void set_calocal(BOOL local) { wsman_transport_set_calocal((WsManClient *)$self, local); } /* * Windows client * * Use local CA ? * * call-seq: * transport.calocal -> Boolean * */ BOOL calocal() { return wsman_transport_get_calocal((WsManClient *)$self); } #endif %rename("cert=") set_cert(const char *cert); /* * Set the certificate * */ void set_cert(const char *cert) { wsman_transport_set_cert((WsManClient *)$self, cert); } %newobject cert; /* * Get the certificate * */ char *cert() { return wsman_transport_get_cert((WsManClient *)$self); } %rename("key=") set_key(const char *key); /* * Set the key * */ void set_key(const char *key) { wsman_transport_set_key((WsManClient *)$self, key); } %newobject key; /* * Get the key * */ char *key() { return wsman_transport_get_key((WsManClient *)$self); } }
Set the authentication method string corresponding to the given auth method id
Value must be one of:
-
Openwsman::NO_AUTH
-
Openwsman::BASIC_AUTH
-
Openwsman::DIGEST_AUTH
-
Openwsman::PASS_AUTH
-
Openwsman::NTLM_AUTH
-
Openwsman::GSSNEGOTIATE_AUTH
static const char *auth_name(int auth) { return wsmc_transport_get_auth_name(auth); } /* * Get the authentication method integer id * */ int auth_value() { return wsmc_transport_get_auth_value((WsManClient *)$self); } /* * Get string corresponding to given error code * * call-seq: * transport.error_string(Integer) -> String * */ static char *error_string(int err) { return wsman_transport_get_last_error_string(err); } %rename("timeout=") set_timeout(unsigned long timeout); /* * Set the transport timeout in seconds * * ====== Note * This is the http layer timeout. Not to be confused with the * WS-Management operation timeout set via Openwsman::ClientOptions.timeout * */ void set_timeout(unsigned long timeout) { wsman_transport_set_timeout((WsManClient *)$self, timeout); } /* * Get the transport timeout in seconds * * call-seq: * transport.timeout -> Integer * */ unsigned long timeout() { return wsman_transport_get_timeout((WsManClient *)$self); } %rename("verify_peer=") set_verify_peer( VALUE rvalue ); /* * verify the peer in SSL communication ? * * If passed +false+, +nil+, or 0: disable peer verification * else: enable peer verification * */ void set_verify_peer( VALUE rvalue ) { unsigned int value; if ((rvalue == Qfalse) || (rvalue == Qnil)) { value = 0; } else if ((TYPE(rvalue) == T_FIXNUM) && (FIX2INT(rvalue) == 0)) { value = 0; } else { value = 1; } wsman_transport_set_verify_peer((WsManClient *)$self, value); } %rename("verify_peer?") verify_peer(); %typemap(out) unsigned int verify_peer "$result = ($1 != 0) ? Qtrue : Qfalse;"; /* * Peer to be verified ? * * call-seq: * transport.verify_peer? -> Boolean * */ unsigned int verify_peer() { return wsman_transport_get_verify_peer((WsManClient *)$self); } %rename("verify_host=") set_verify_host(VALUE rvalue); /* * verify the host in SSL communication ? * * If passed +false+, +nil+, or 0: disable peer verification * else: enable peer verification * */ void set_verify_host( VALUE rvalue ) { unsigned int value; if ((rvalue == Qfalse) || (rvalue == Qnil)) { value = 0; } else if ((TYPE(rvalue) == T_FIXNUM) && (FIX2INT(rvalue) == 0)) { value = 0; } else { value = 1; } wsman_transport_set_verify_host((WsManClient *)$self, value); } %rename("verify_host?") verify_host(); %typemap(out) unsigned int verify_host "$result = ($1 != 0) ? Qtrue : Qfalse;"; /* * Host to be verified ? * * call-seq: * transport.verify_host? -> Boolean * */ unsigned int verify_host() { return wsman_transport_get_verify_host((WsManClient *)$self); } %rename("proxy=") set_proxy(const char *proxy); /* * Set http proxy URL * * Pass nil to disable proxy communication * * ====== Example * transport.proxy = "http://your.proxy.com:80" * */ void set_proxy(const char *proxy) { wsman_transport_set_proxy((WsManClient *)$self, proxy); } %newobject proxy; /* * Get http proxy URL * */ char *proxy() { return wsman_transport_get_proxy((WsManClient *)$self); } %rename("proxyauth=") set_proxyauth(const char *pauth); /* * Linux clients: HTTP proxy credentials * * Set the proxy username and password * * ====== Example * transport.proxyauth = "username:password" * */ void set_proxyauth(const char *pauth) { wsman_transport_set_proxyauth((WsManClient *)$self, pauth); } %newobject proxyauth; /* * Linux clients: HTTP proxy credentials * * Get the proxy username and password as "username:password" * * call-seq: * transport.proxyauth -> String * */ char *proxyauth(){ return wsman_transport_get_proxyauth((WsManClient *)$self); } %rename("cainfo=") set_cainfo(const char *cainfo); /* * Set the certification authority (CAINFO) * */ void set_cainfo(const char *cainfo) { wsman_transport_set_cainfo((WsManClient *)$self, cainfo); } %newobject cainfo; /* * Get the certification authority (CAINFO) * * call-seq: * transport.cainfo -> String * */ char *cainfo() { return wsman_transport_get_cainfo((WsManClient *)$self); } %rename("certhumbprint=") set_certhumbprint(const char *arg); /* * Set the certification thumbprint * */ void set_certhumbprint(const char *arg) { wsman_transport_set_certhumbprint((WsManClient *)$self, arg); } %newobject certhumbprint; /* * Set the certification thumbprint * * call-seq: * transport.certhumbprint -> String * */ char *certhumbprint() { return wsman_transport_get_certhumbprint((WsManClient *)$self); } %rename("capath=") set_capath(const char *capath); /* * Set the path to the certification authority (CAINFO) store * */ void set_capath(const char *capath) { wsman_transport_set_capath((WsManClient *)$self, capath); } %newobject capath; /* * Get the path to the certification authority (CAINFO) store * */ char *capath() { return wsman_transport_get_capath((WsManClient *)$self); } %rename("caoid=") set_caoid(const char *oid); /* * Windows client * * Set the CA OID * * ====== Reference * http://support.microsoft.com/kb/287547 * */ void set_caoid(const char *oid) { wsman_transport_set_caoid((WsManClient *)$self, oid); } %newobject caoid; /* * Windows client * * Get the CA OID * */ char *caoid() { return wsman_transport_get_caoid((WsManClient *)$self); } #ifdef _WIN32 %rename("calocal=") set_calocal(BOOL local); /* * Windows client * * Use local CA ? * */ void set_calocal(BOOL local) { wsman_transport_set_calocal((WsManClient *)$self, local); } /* * Windows client * * Use local CA ? * * call-seq: * transport.calocal -> Boolean * */ BOOL calocal() { return wsman_transport_get_calocal((WsManClient *)$self); } #endif %rename("cert=") set_cert(const char *cert); /* * Set the certificate * */ void set_cert(const char *cert) { wsman_transport_set_cert((WsManClient *)$self, cert); } %newobject cert; /* * Get the certificate * */ char *cert() { return wsman_transport_get_cert((WsManClient *)$self); } %rename("key=") set_key(const char *key); /* * Set the key * */ void set_key(const char *key) { wsman_transport_set_key((WsManClient *)$self, key); } %newobject key; /* * Get the key * */ char *key() { return wsman_transport_get_key((WsManClient *)$self); } }
Get the authentication method integer id
int auth_value() { return wsmc_transport_get_auth_value((WsManClient *)$self); } /* * Get string corresponding to given error code * * call-seq: * transport.error_string(Integer) -> String * */ static char *error_string(int err) { return wsman_transport_get_last_error_string(err); } %rename("timeout=") set_timeout(unsigned long timeout); /* * Set the transport timeout in seconds * * ====== Note * This is the http layer timeout. Not to be confused with the * WS-Management operation timeout set via Openwsman::ClientOptions.timeout * */ void set_timeout(unsigned long timeout) { wsman_transport_set_timeout((WsManClient *)$self, timeout); } /* * Get the transport timeout in seconds * * call-seq: * transport.timeout -> Integer * */ unsigned long timeout() { return wsman_transport_get_timeout((WsManClient *)$self); } %rename("verify_peer=") set_verify_peer( VALUE rvalue ); /* * verify the peer in SSL communication ? * * If passed +false+, +nil+, or 0: disable peer verification * else: enable peer verification * */ void set_verify_peer( VALUE rvalue ) { unsigned int value; if ((rvalue == Qfalse) || (rvalue == Qnil)) { value = 0; } else if ((TYPE(rvalue) == T_FIXNUM) && (FIX2INT(rvalue) == 0)) { value = 0; } else { value = 1; } wsman_transport_set_verify_peer((WsManClient *)$self, value); } %rename("verify_peer?") verify_peer(); %typemap(out) unsigned int verify_peer "$result = ($1 != 0) ? Qtrue : Qfalse;"; /* * Peer to be verified ? * * call-seq: * transport.verify_peer? -> Boolean * */ unsigned int verify_peer() { return wsman_transport_get_verify_peer((WsManClient *)$self); } %rename("verify_host=") set_verify_host(VALUE rvalue); /* * verify the host in SSL communication ? * * If passed +false+, +nil+, or 0: disable peer verification * else: enable peer verification * */ void set_verify_host( VALUE rvalue ) { unsigned int value; if ((rvalue == Qfalse) || (rvalue == Qnil)) { value = 0; } else if ((TYPE(rvalue) == T_FIXNUM) && (FIX2INT(rvalue) == 0)) { value = 0; } else { value = 1; } wsman_transport_set_verify_host((WsManClient *)$self, value); } %rename("verify_host?") verify_host(); %typemap(out) unsigned int verify_host "$result = ($1 != 0) ? Qtrue : Qfalse;"; /* * Host to be verified ? * * call-seq: * transport.verify_host? -> Boolean * */ unsigned int verify_host() { return wsman_transport_get_verify_host((WsManClient *)$self); } %rename("proxy=") set_proxy(const char *proxy); /* * Set http proxy URL * * Pass nil to disable proxy communication * * ====== Example * transport.proxy = "http://your.proxy.com:80" * */ void set_proxy(const char *proxy) { wsman_transport_set_proxy((WsManClient *)$self, proxy); } %newobject proxy; /* * Get http proxy URL * */ char *proxy() { return wsman_transport_get_proxy((WsManClient *)$self); } %rename("proxyauth=") set_proxyauth(const char *pauth); /* * Linux clients: HTTP proxy credentials * * Set the proxy username and password * * ====== Example * transport.proxyauth = "username:password" * */ void set_proxyauth(const char *pauth) { wsman_transport_set_proxyauth((WsManClient *)$self, pauth); } %newobject proxyauth; /* * Linux clients: HTTP proxy credentials * * Get the proxy username and password as "username:password" * * call-seq: * transport.proxyauth -> String * */ char *proxyauth(){ return wsman_transport_get_proxyauth((WsManClient *)$self); } %rename("cainfo=") set_cainfo(const char *cainfo); /* * Set the certification authority (CAINFO) * */ void set_cainfo(const char *cainfo) { wsman_transport_set_cainfo((WsManClient *)$self, cainfo); } %newobject cainfo; /* * Get the certification authority (CAINFO) * * call-seq: * transport.cainfo -> String * */ char *cainfo() { return wsman_transport_get_cainfo((WsManClient *)$self); } %rename("certhumbprint=") set_certhumbprint(const char *arg); /* * Set the certification thumbprint * */ void set_certhumbprint(const char *arg) { wsman_transport_set_certhumbprint((WsManClient *)$self, arg); } %newobject certhumbprint; /* * Set the certification thumbprint * * call-seq: * transport.certhumbprint -> String * */ char *certhumbprint() { return wsman_transport_get_certhumbprint((WsManClient *)$self); } %rename("capath=") set_capath(const char *capath); /* * Set the path to the certification authority (CAINFO) store * */ void set_capath(const char *capath) { wsman_transport_set_capath((WsManClient *)$self, capath); } %newobject capath; /* * Get the path to the certification authority (CAINFO) store * */ char *capath() { return wsman_transport_get_capath((WsManClient *)$self); } %rename("caoid=") set_caoid(const char *oid); /* * Windows client * * Set the CA OID * * ====== Reference * http://support.microsoft.com/kb/287547 * */ void set_caoid(const char *oid) { wsman_transport_set_caoid((WsManClient *)$self, oid); } %newobject caoid; /* * Windows client * * Get the CA OID * */ char *caoid() { return wsman_transport_get_caoid((WsManClient *)$self); } #ifdef _WIN32 %rename("calocal=") set_calocal(BOOL local); /* * Windows client * * Use local CA ? * */ void set_calocal(BOOL local) { wsman_transport_set_calocal((WsManClient *)$self, local); } /* * Windows client * * Use local CA ? * * call-seq: * transport.calocal -> Boolean * */ BOOL calocal() { return wsman_transport_get_calocal((WsManClient *)$self); } #endif %rename("cert=") set_cert(const char *cert); /* * Set the certificate * */ void set_cert(const char *cert) { wsman_transport_set_cert((WsManClient *)$self, cert); } %newobject cert; /* * Get the certificate * */ char *cert() { return wsman_transport_get_cert((WsManClient *)$self); } %rename("key=") set_key(const char *key); /* * Set the key * */ void set_key(const char *key) { wsman_transport_set_key((WsManClient *)$self, key); } %newobject key; /* * Get the key * */ char *key() { return wsman_transport_get_key((WsManClient *)$self); } }
Get the certification authority (CAINFO)
char *cainfo() { return wsman_transport_get_cainfo((WsManClient *)$self); } %rename("certhumbprint=") set_certhumbprint(const char *arg); /* * Set the certification thumbprint * */ void set_certhumbprint(const char *arg) { wsman_transport_set_certhumbprint((WsManClient *)$self, arg); } %newobject certhumbprint; /* * Set the certification thumbprint * * call-seq: * transport.certhumbprint -> String * */ char *certhumbprint() { return wsman_transport_get_certhumbprint((WsManClient *)$self); } %rename("capath=") set_capath(const char *capath); /* * Set the path to the certification authority (CAINFO) store * */ void set_capath(const char *capath) { wsman_transport_set_capath((WsManClient *)$self, capath); } %newobject capath; /* * Get the path to the certification authority (CAINFO) store * */ char *capath() { return wsman_transport_get_capath((WsManClient *)$self); } %rename("caoid=") set_caoid(const char *oid); /* * Windows client * * Set the CA OID * * ====== Reference * http://support.microsoft.com/kb/287547 * */ void set_caoid(const char *oid) { wsman_transport_set_caoid((WsManClient *)$self, oid); } %newobject caoid; /* * Windows client * * Get the CA OID * */ char *caoid() { return wsman_transport_get_caoid((WsManClient *)$self); } #ifdef _WIN32 %rename("calocal=") set_calocal(BOOL local); /* * Windows client * * Use local CA ? * */ void set_calocal(BOOL local) { wsman_transport_set_calocal((WsManClient *)$self, local); } /* * Windows client * * Use local CA ? * * call-seq: * transport.calocal -> Boolean * */ BOOL calocal() { return wsman_transport_get_calocal((WsManClient *)$self); } #endif %rename("cert=") set_cert(const char *cert); /* * Set the certificate * */ void set_cert(const char *cert) { wsman_transport_set_cert((WsManClient *)$self, cert); } %newobject cert; /* * Get the certificate * */ char *cert() { return wsman_transport_get_cert((WsManClient *)$self); } %rename("key=") set_key(const char *key); /* * Set the key * */ void set_key(const char *key) { wsman_transport_set_key((WsManClient *)$self, key); } %newobject key; /* * Get the key * */ char *key() { return wsman_transport_get_key((WsManClient *)$self); } }
Set the certification authority (CAINFO)
void set_cainfo(const char *cainfo) { wsman_transport_set_cainfo((WsManClient *)$self, cainfo); } %newobject cainfo; /* * Get the certification authority (CAINFO) * * call-seq: * transport.cainfo -> String * */ char *cainfo() { return wsman_transport_get_cainfo((WsManClient *)$self); } %rename("certhumbprint=") set_certhumbprint(const char *arg); /* * Set the certification thumbprint * */ void set_certhumbprint(const char *arg) { wsman_transport_set_certhumbprint((WsManClient *)$self, arg); } %newobject certhumbprint; /* * Set the certification thumbprint * * call-seq: * transport.certhumbprint -> String * */ char *certhumbprint() { return wsman_transport_get_certhumbprint((WsManClient *)$self); } %rename("capath=") set_capath(const char *capath); /* * Set the path to the certification authority (CAINFO) store * */ void set_capath(const char *capath) { wsman_transport_set_capath((WsManClient *)$self, capath); } %newobject capath; /* * Get the path to the certification authority (CAINFO) store * */ char *capath() { return wsman_transport_get_capath((WsManClient *)$self); } %rename("caoid=") set_caoid(const char *oid); /* * Windows client * * Set the CA OID * * ====== Reference * http://support.microsoft.com/kb/287547 * */ void set_caoid(const char *oid) { wsman_transport_set_caoid((WsManClient *)$self, oid); } %newobject caoid; /* * Windows client * * Get the CA OID * */ char *caoid() { return wsman_transport_get_caoid((WsManClient *)$self); } #ifdef _WIN32 %rename("calocal=") set_calocal(BOOL local); /* * Windows client * * Use local CA ? * */ void set_calocal(BOOL local) { wsman_transport_set_calocal((WsManClient *)$self, local); } /* * Windows client * * Use local CA ? * * call-seq: * transport.calocal -> Boolean * */ BOOL calocal() { return wsman_transport_get_calocal((WsManClient *)$self); } #endif %rename("cert=") set_cert(const char *cert); /* * Set the certificate * */ void set_cert(const char *cert) { wsman_transport_set_cert((WsManClient *)$self, cert); } %newobject cert; /* * Get the certificate * */ char *cert() { return wsman_transport_get_cert((WsManClient *)$self); } %rename("key=") set_key(const char *key); /* * Set the key * */ void set_key(const char *key) { wsman_transport_set_key((WsManClient *)$self, key); } %newobject key; /* * Get the key * */ char *key() { return wsman_transport_get_key((WsManClient *)$self); } }
Windows client
Use local CA ?
BOOL calocal() { return wsman_transport_get_calocal((WsManClient *)$self); } #endif %rename("cert=") set_cert(const char *cert); /* * Set the certificate * */ void set_cert(const char *cert) { wsman_transport_set_cert((WsManClient *)$self, cert); } %newobject cert; /* * Get the certificate * */ char *cert() { return wsman_transport_get_cert((WsManClient *)$self); } %rename("key=") set_key(const char *key); /* * Set the key * */ void set_key(const char *key) { wsman_transport_set_key((WsManClient *)$self, key); } %newobject key; /* * Get the key * */ char *key() { return wsman_transport_get_key((WsManClient *)$self); } }
Windows client
Use local CA ?
void set_calocal(BOOL local) { wsman_transport_set_calocal((WsManClient *)$self, local); } /* * Windows client * * Use local CA ? * * call-seq: * transport.calocal -> Boolean * */ BOOL calocal() { return wsman_transport_get_calocal((WsManClient *)$self); } #endif %rename("cert=") set_cert(const char *cert); /* * Set the certificate * */ void set_cert(const char *cert) { wsman_transport_set_cert((WsManClient *)$self, cert); } %newobject cert; /* * Get the certificate * */ char *cert() { return wsman_transport_get_cert((WsManClient *)$self); } %rename("key=") set_key(const char *key); /* * Set the key * */ void set_key(const char *key) { wsman_transport_set_key((WsManClient *)$self, key); } %newobject key; /* * Get the key * */ char *key() { return wsman_transport_get_key((WsManClient *)$self); } }
Windows client
Get the CA OID
char *caoid() { return wsman_transport_get_caoid((WsManClient *)$self); } #ifdef _WIN32 %rename("calocal=") set_calocal(BOOL local); /* * Windows client * * Use local CA ? * */ void set_calocal(BOOL local) { wsman_transport_set_calocal((WsManClient *)$self, local); } /* * Windows client * * Use local CA ? * * call-seq: * transport.calocal -> Boolean * */ BOOL calocal() { return wsman_transport_get_calocal((WsManClient *)$self); } #endif %rename("cert=") set_cert(const char *cert); /* * Set the certificate * */ void set_cert(const char *cert) { wsman_transport_set_cert((WsManClient *)$self, cert); } %newobject cert; /* * Get the certificate * */ char *cert() { return wsman_transport_get_cert((WsManClient *)$self); } %rename("key=") set_key(const char *key); /* * Set the key * */ void set_key(const char *key) { wsman_transport_set_key((WsManClient *)$self, key); } %newobject key; /* * Get the key * */ char *key() { return wsman_transport_get_key((WsManClient *)$self); } }
Windows client
Set the CA OID
Reference¶ ↑
support.microsoft.com/kb/287547
void set_caoid(const char *oid) { wsman_transport_set_caoid((WsManClient *)$self, oid); } %newobject caoid; /* * Windows client * * Get the CA OID * */ char *caoid() { return wsman_transport_get_caoid((WsManClient *)$self); } #ifdef _WIN32 %rename("calocal=") set_calocal(BOOL local); /* * Windows client * * Use local CA ? * */ void set_calocal(BOOL local) { wsman_transport_set_calocal((WsManClient *)$self, local); } /* * Windows client * * Use local CA ? * * call-seq: * transport.calocal -> Boolean * */ BOOL calocal() { return wsman_transport_get_calocal((WsManClient *)$self); } #endif %rename("cert=") set_cert(const char *cert); /* * Set the certificate * */ void set_cert(const char *cert) { wsman_transport_set_cert((WsManClient *)$self, cert); } %newobject cert; /* * Get the certificate * */ char *cert() { return wsman_transport_get_cert((WsManClient *)$self); } %rename("key=") set_key(const char *key); /* * Set the key * */ void set_key(const char *key) { wsman_transport_set_key((WsManClient *)$self, key); } %newobject key; /* * Get the key * */ char *key() { return wsman_transport_get_key((WsManClient *)$self); } }
Get the path to the certification authority (CAINFO) store
char *capath() { return wsman_transport_get_capath((WsManClient *)$self); } %rename("caoid=") set_caoid(const char *oid); /* * Windows client * * Set the CA OID * * ====== Reference * http://support.microsoft.com/kb/287547 * */ void set_caoid(const char *oid) { wsman_transport_set_caoid((WsManClient *)$self, oid); } %newobject caoid; /* * Windows client * * Get the CA OID * */ char *caoid() { return wsman_transport_get_caoid((WsManClient *)$self); } #ifdef _WIN32 %rename("calocal=") set_calocal(BOOL local); /* * Windows client * * Use local CA ? * */ void set_calocal(BOOL local) { wsman_transport_set_calocal((WsManClient *)$self, local); } /* * Windows client * * Use local CA ? * * call-seq: * transport.calocal -> Boolean * */ BOOL calocal() { return wsman_transport_get_calocal((WsManClient *)$self); } #endif %rename("cert=") set_cert(const char *cert); /* * Set the certificate * */ void set_cert(const char *cert) { wsman_transport_set_cert((WsManClient *)$self, cert); } %newobject cert; /* * Get the certificate * */ char *cert() { return wsman_transport_get_cert((WsManClient *)$self); } %rename("key=") set_key(const char *key); /* * Set the key * */ void set_key(const char *key) { wsman_transport_set_key((WsManClient *)$self, key); } %newobject key; /* * Get the key * */ char *key() { return wsman_transport_get_key((WsManClient *)$self); } }
Set the path to the certification authority (CAINFO) store
void set_capath(const char *capath) { wsman_transport_set_capath((WsManClient *)$self, capath); } %newobject capath; /* * Get the path to the certification authority (CAINFO) store * */ char *capath() { return wsman_transport_get_capath((WsManClient *)$self); } %rename("caoid=") set_caoid(const char *oid); /* * Windows client * * Set the CA OID * * ====== Reference * http://support.microsoft.com/kb/287547 * */ void set_caoid(const char *oid) { wsman_transport_set_caoid((WsManClient *)$self, oid); } %newobject caoid; /* * Windows client * * Get the CA OID * */ char *caoid() { return wsman_transport_get_caoid((WsManClient *)$self); } #ifdef _WIN32 %rename("calocal=") set_calocal(BOOL local); /* * Windows client * * Use local CA ? * */ void set_calocal(BOOL local) { wsman_transport_set_calocal((WsManClient *)$self, local); } /* * Windows client * * Use local CA ? * * call-seq: * transport.calocal -> Boolean * */ BOOL calocal() { return wsman_transport_get_calocal((WsManClient *)$self); } #endif %rename("cert=") set_cert(const char *cert); /* * Set the certificate * */ void set_cert(const char *cert) { wsman_transport_set_cert((WsManClient *)$self, cert); } %newobject cert; /* * Get the certificate * */ char *cert() { return wsman_transport_get_cert((WsManClient *)$self); } %rename("key=") set_key(const char *key); /* * Set the key * */ void set_key(const char *key) { wsman_transport_set_key((WsManClient *)$self, key); } %newobject key; /* * Get the key * */ char *key() { return wsman_transport_get_key((WsManClient *)$self); } }
Get the certificate
char *cert() { return wsman_transport_get_cert((WsManClient *)$self); } %rename("key=") set_key(const char *key); /* * Set the key * */ void set_key(const char *key) { wsman_transport_set_key((WsManClient *)$self, key); } %newobject key; /* * Get the key * */ char *key() { return wsman_transport_get_key((WsManClient *)$self); } }
Set the certificate
void set_cert(const char *cert) { wsman_transport_set_cert((WsManClient *)$self, cert); } %newobject cert; /* * Get the certificate * */ char *cert() { return wsman_transport_get_cert((WsManClient *)$self); } %rename("key=") set_key(const char *key); /* * Set the key * */ void set_key(const char *key) { wsman_transport_set_key((WsManClient *)$self, key); } %newobject key; /* * Get the key * */ char *key() { return wsman_transport_get_key((WsManClient *)$self); } }
Set the certification thumbprint
char *certhumbprint() { return wsman_transport_get_certhumbprint((WsManClient *)$self); } %rename("capath=") set_capath(const char *capath); /* * Set the path to the certification authority (CAINFO) store * */ void set_capath(const char *capath) { wsman_transport_set_capath((WsManClient *)$self, capath); } %newobject capath; /* * Get the path to the certification authority (CAINFO) store * */ char *capath() { return wsman_transport_get_capath((WsManClient *)$self); } %rename("caoid=") set_caoid(const char *oid); /* * Windows client * * Set the CA OID * * ====== Reference * http://support.microsoft.com/kb/287547 * */ void set_caoid(const char *oid) { wsman_transport_set_caoid((WsManClient *)$self, oid); } %newobject caoid; /* * Windows client * * Get the CA OID * */ char *caoid() { return wsman_transport_get_caoid((WsManClient *)$self); } #ifdef _WIN32 %rename("calocal=") set_calocal(BOOL local); /* * Windows client * * Use local CA ? * */ void set_calocal(BOOL local) { wsman_transport_set_calocal((WsManClient *)$self, local); } /* * Windows client * * Use local CA ? * * call-seq: * transport.calocal -> Boolean * */ BOOL calocal() { return wsman_transport_get_calocal((WsManClient *)$self); } #endif %rename("cert=") set_cert(const char *cert); /* * Set the certificate * */ void set_cert(const char *cert) { wsman_transport_set_cert((WsManClient *)$self, cert); } %newobject cert; /* * Get the certificate * */ char *cert() { return wsman_transport_get_cert((WsManClient *)$self); } %rename("key=") set_key(const char *key); /* * Set the key * */ void set_key(const char *key) { wsman_transport_set_key((WsManClient *)$self, key); } %newobject key; /* * Get the key * */ char *key() { return wsman_transport_get_key((WsManClient *)$self); } }
Set the certification thumbprint
void set_certhumbprint(const char *arg) { wsman_transport_set_certhumbprint((WsManClient *)$self, arg); } %newobject certhumbprint; /* * Set the certification thumbprint * * call-seq: * transport.certhumbprint -> String * */ char *certhumbprint() { return wsman_transport_get_certhumbprint((WsManClient *)$self); } %rename("capath=") set_capath(const char *capath); /* * Set the path to the certification authority (CAINFO) store * */ void set_capath(const char *capath) { wsman_transport_set_capath((WsManClient *)$self, capath); } %newobject capath; /* * Get the path to the certification authority (CAINFO) store * */ char *capath() { return wsman_transport_get_capath((WsManClient *)$self); } %rename("caoid=") set_caoid(const char *oid); /* * Windows client * * Set the CA OID * * ====== Reference * http://support.microsoft.com/kb/287547 * */ void set_caoid(const char *oid) { wsman_transport_set_caoid((WsManClient *)$self, oid); } %newobject caoid; /* * Windows client * * Get the CA OID * */ char *caoid() { return wsman_transport_get_caoid((WsManClient *)$self); } #ifdef _WIN32 %rename("calocal=") set_calocal(BOOL local); /* * Windows client * * Use local CA ? * */ void set_calocal(BOOL local) { wsman_transport_set_calocal((WsManClient *)$self, local); } /* * Windows client * * Use local CA ? * * call-seq: * transport.calocal -> Boolean * */ BOOL calocal() { return wsman_transport_get_calocal((WsManClient *)$self); } #endif %rename("cert=") set_cert(const char *cert); /* * Set the certificate * */ void set_cert(const char *cert) { wsman_transport_set_cert((WsManClient *)$self, cert); } %newobject cert; /* * Get the certificate * */ char *cert() { return wsman_transport_get_cert((WsManClient *)$self); } %rename("key=") set_key(const char *key); /* * Set the key * */ void set_key(const char *key) { wsman_transport_set_key((WsManClient *)$self, key); } %newobject key; /* * Get the key * */ char *key() { return wsman_transport_get_key((WsManClient *)$self); } }
Close the transport. No further communication possible.
void close() { wsman_transport_close_transport((WsManClient *)$self); } %rename("agent=") set_agent(const char *agent); /* * Set the HTTP agent identifier (User-agent:) string * * This is how the client will show up in the servers http log. * Defaults to "Openwsman" * * call-seq: * transport.agent = "Client identifier" * */ void set_agent(const char *agent) { wsman_transport_set_agent((WsManClient *)$self, agent); } %newobject agent; /* * Get the HTTP agent identifier string * * call-seq: * transport.agent -> String * */ char *agent() { return wsman_transport_get_agent ((WsManClient *)$self); } %rename("username") get_username(); %newobject get_username; /* * Server credentials * * Get the username part of the http transport credentials * * call-seq: * transport.username -> String * */ char *get_username() { return wsman_transport_get_userName((WsManClient *)$self); } %rename("username=") set_username(char *user_name); /* * Server credentials * * Set the username part of the http transport credentials * * call-seq: * transport.username = "Username" * */ void set_username(char *user_name) { wsman_transport_set_userName((WsManClient *)$self, user_name); } %rename("password") get_password(); %newobject get_password; /* * Server credentials * * Get the password part of the http transport credentials * * call-seq: * transport.password -> String * */ char *get_password() { return wsman_transport_get_password((WsManClient *)$self); } %rename("password=") set_password(char *password); /* * Server credentials * * Set the password part of the http transport credentials * * call-seq: * transport.password = "Password" * */ void set_password(char *password) { wsman_transport_set_password((WsManClient *)$self, password); } %rename("proxy_username") get_proxy_username(); %newobject get_proxy_username; /* * Windows clients: HTTP proxy credentials * * Get the username part of the http proxy credentials * * call-seq: * transport.proxy_username -> String * */ char *get_proxy_username() { return wsman_transport_get_proxy_username((WsManClient *)$self ); } %rename("proxy_username=") set_proxy_username(char *proxy_username); /* * Windows clients: HTTP proxy credentials * * Set the username part of the http proxy credentials * * call-seq: * transport.proxy_username = "proxy_username" * */ void set_proxy_username(char *proxy_username) { wsman_transport_set_proxy_username((WsManClient *)$self, proxy_username ); } %rename("proxy_password") get_proxy_password(); %newobject get_proxy_password; /* * Windows clients: HTTP proxy credentials * * Get the password part of the http proxy credentials * * call-seq: * transport.proxy_password -> String * */ char *get_proxy_password() { return wsman_transport_get_proxy_password((WsManClient *)$self ); } %rename("proxy_password=") set_proxy_password(char *proxy_password); /* * Windows clients: HTTP proxy credentials * * Set the password part of the http proxy credentials * * call-seq: * transport.proxy_password = "proxy_password" * */ void set_proxy_password(char *proxy_password) { wsman_transport_set_proxy_password((WsManClient *)$self, proxy_password ); } %rename("auth_method=") set_auth_method( const char *am); /* * Set the authentication method * * Value must be one of: * * Openwsman::NO_AUTH_STR * * Openwsman::BASIC_AUTH_STR * * Openwsman::DIGEST_AUTH_STR * * Openwsman::PASS_AUTH_STR * * Openwsman::NTLM_AUTH_STR * * Openwsman::GSSNEGOTIATE_AUTH_STR * */ void set_auth_method(const char *am) { wsman_transport_set_auth_method((WsManClient *)$self, am); } %newobject auth_method; /* * Set the authentication method * * call-seq: * transport.auth_method -> String * */ char *auth_method() { return wsman_transport_get_auth_method ((WsManClient *)$self); } /* * Set the authentication method string corresponding to the given * auth method id * * Value must be one of: * * Openwsman::NO_AUTH * * Openwsman::BASIC_AUTH * * Openwsman::DIGEST_AUTH * * Openwsman::PASS_AUTH * * Openwsman::NTLM_AUTH * * Openwsman::GSSNEGOTIATE_AUTH * * call-seq: * transport.auth_name(Integer) -> String * */ static const char *auth_name(int auth) { return wsmc_transport_get_auth_name(auth); } /* * Get the authentication method integer id * */ int auth_value() { return wsmc_transport_get_auth_value((WsManClient *)$self); } /* * Get string corresponding to given error code * * call-seq: * transport.error_string(Integer) -> String * */ static char *error_string(int err) { return wsman_transport_get_last_error_string(err); } %rename("timeout=") set_timeout(unsigned long timeout); /* * Set the transport timeout in seconds * * ====== Note * This is the http layer timeout. Not to be confused with the * WS-Management operation timeout set via Openwsman::ClientOptions.timeout * */ void set_timeout(unsigned long timeout) { wsman_transport_set_timeout((WsManClient *)$self, timeout); } /* * Get the transport timeout in seconds * * call-seq: * transport.timeout -> Integer * */ unsigned long timeout() { return wsman_transport_get_timeout((WsManClient *)$self); } %rename("verify_peer=") set_verify_peer( VALUE rvalue ); /* * verify the peer in SSL communication ? * * If passed +false+, +nil+, or 0: disable peer verification * else: enable peer verification * */ void set_verify_peer( VALUE rvalue ) { unsigned int value; if ((rvalue == Qfalse) || (rvalue == Qnil)) { value = 0; } else if ((TYPE(rvalue) == T_FIXNUM) && (FIX2INT(rvalue) == 0)) { value = 0; } else { value = 1; } wsman_transport_set_verify_peer((WsManClient *)$self, value); } %rename("verify_peer?") verify_peer(); %typemap(out) unsigned int verify_peer "$result = ($1 != 0) ? Qtrue : Qfalse;"; /* * Peer to be verified ? * * call-seq: * transport.verify_peer? -> Boolean * */ unsigned int verify_peer() { return wsman_transport_get_verify_peer((WsManClient *)$self); } %rename("verify_host=") set_verify_host(VALUE rvalue); /* * verify the host in SSL communication ? * * If passed +false+, +nil+, or 0: disable peer verification * else: enable peer verification * */ void set_verify_host( VALUE rvalue ) { unsigned int value; if ((rvalue == Qfalse) || (rvalue == Qnil)) { value = 0; } else if ((TYPE(rvalue) == T_FIXNUM) && (FIX2INT(rvalue) == 0)) { value = 0; } else { value = 1; } wsman_transport_set_verify_host((WsManClient *)$self, value); } %rename("verify_host?") verify_host(); %typemap(out) unsigned int verify_host "$result = ($1 != 0) ? Qtrue : Qfalse;"; /* * Host to be verified ? * * call-seq: * transport.verify_host? -> Boolean * */ unsigned int verify_host() { return wsman_transport_get_verify_host((WsManClient *)$self); } %rename("proxy=") set_proxy(const char *proxy); /* * Set http proxy URL * * Pass nil to disable proxy communication * * ====== Example * transport.proxy = "http://your.proxy.com:80" * */ void set_proxy(const char *proxy) { wsman_transport_set_proxy((WsManClient *)$self, proxy); } %newobject proxy; /* * Get http proxy URL * */ char *proxy() { return wsman_transport_get_proxy((WsManClient *)$self); } %rename("proxyauth=") set_proxyauth(const char *pauth); /* * Linux clients: HTTP proxy credentials * * Set the proxy username and password * * ====== Example * transport.proxyauth = "username:password" * */ void set_proxyauth(const char *pauth) { wsman_transport_set_proxyauth((WsManClient *)$self, pauth); } %newobject proxyauth; /* * Linux clients: HTTP proxy credentials * * Get the proxy username and password as "username:password" * * call-seq: * transport.proxyauth -> String * */ char *proxyauth(){ return wsman_transport_get_proxyauth((WsManClient *)$self); } %rename("cainfo=") set_cainfo(const char *cainfo); /* * Set the certification authority (CAINFO) * */ void set_cainfo(const char *cainfo) { wsman_transport_set_cainfo((WsManClient *)$self, cainfo); } %newobject cainfo; /* * Get the certification authority (CAINFO) * * call-seq: * transport.cainfo -> String * */ char *cainfo() { return wsman_transport_get_cainfo((WsManClient *)$self); } %rename("certhumbprint=") set_certhumbprint(const char *arg); /* * Set the certification thumbprint * */ void set_certhumbprint(const char *arg) { wsman_transport_set_certhumbprint((WsManClient *)$self, arg); } %newobject certhumbprint; /* * Set the certification thumbprint * * call-seq: * transport.certhumbprint -> String * */ char *certhumbprint() { return wsman_transport_get_certhumbprint((WsManClient *)$self); } %rename("capath=") set_capath(const char *capath); /* * Set the path to the certification authority (CAINFO) store * */ void set_capath(const char *capath) { wsman_transport_set_capath((WsManClient *)$self, capath); } %newobject capath; /* * Get the path to the certification authority (CAINFO) store * */ char *capath() { return wsman_transport_get_capath((WsManClient *)$self); } %rename("caoid=") set_caoid(const char *oid); /* * Windows client * * Set the CA OID * * ====== Reference * http://support.microsoft.com/kb/287547 * */ void set_caoid(const char *oid) { wsman_transport_set_caoid((WsManClient *)$self, oid); } %newobject caoid; /* * Windows client * * Get the CA OID * */ char *caoid() { return wsman_transport_get_caoid((WsManClient *)$self); } #ifdef _WIN32 %rename("calocal=") set_calocal(BOOL local); /* * Windows client * * Use local CA ? * */ void set_calocal(BOOL local) { wsman_transport_set_calocal((WsManClient *)$self, local); } /* * Windows client * * Use local CA ? * * call-seq: * transport.calocal -> Boolean * */ BOOL calocal() { return wsman_transport_get_calocal((WsManClient *)$self); } #endif %rename("cert=") set_cert(const char *cert); /* * Set the certificate * */ void set_cert(const char *cert) { wsman_transport_set_cert((WsManClient *)$self, cert); } %newobject cert; /* * Get the certificate * */ char *cert() { return wsman_transport_get_cert((WsManClient *)$self); } %rename("key=") set_key(const char *key); /* * Set the key * */ void set_key(const char *key) { wsman_transport_set_key((WsManClient *)$self, key); } %newobject key; /* * Get the key * */ char *key() { return wsman_transport_get_key((WsManClient *)$self); } }
Get string corresponding to given error code
static char *error_string(int err) { return wsman_transport_get_last_error_string(err); } %rename("timeout=") set_timeout(unsigned long timeout); /* * Set the transport timeout in seconds * * ====== Note * This is the http layer timeout. Not to be confused with the * WS-Management operation timeout set via Openwsman::ClientOptions.timeout * */ void set_timeout(unsigned long timeout) { wsman_transport_set_timeout((WsManClient *)$self, timeout); } /* * Get the transport timeout in seconds * * call-seq: * transport.timeout -> Integer * */ unsigned long timeout() { return wsman_transport_get_timeout((WsManClient *)$self); } %rename("verify_peer=") set_verify_peer( VALUE rvalue ); /* * verify the peer in SSL communication ? * * If passed +false+, +nil+, or 0: disable peer verification * else: enable peer verification * */ void set_verify_peer( VALUE rvalue ) { unsigned int value; if ((rvalue == Qfalse) || (rvalue == Qnil)) { value = 0; } else if ((TYPE(rvalue) == T_FIXNUM) && (FIX2INT(rvalue) == 0)) { value = 0; } else { value = 1; } wsman_transport_set_verify_peer((WsManClient *)$self, value); } %rename("verify_peer?") verify_peer(); %typemap(out) unsigned int verify_peer "$result = ($1 != 0) ? Qtrue : Qfalse;"; /* * Peer to be verified ? * * call-seq: * transport.verify_peer? -> Boolean * */ unsigned int verify_peer() { return wsman_transport_get_verify_peer((WsManClient *)$self); } %rename("verify_host=") set_verify_host(VALUE rvalue); /* * verify the host in SSL communication ? * * If passed +false+, +nil+, or 0: disable peer verification * else: enable peer verification * */ void set_verify_host( VALUE rvalue ) { unsigned int value; if ((rvalue == Qfalse) || (rvalue == Qnil)) { value = 0; } else if ((TYPE(rvalue) == T_FIXNUM) && (FIX2INT(rvalue) == 0)) { value = 0; } else { value = 1; } wsman_transport_set_verify_host((WsManClient *)$self, value); } %rename("verify_host?") verify_host(); %typemap(out) unsigned int verify_host "$result = ($1 != 0) ? Qtrue : Qfalse;"; /* * Host to be verified ? * * call-seq: * transport.verify_host? -> Boolean * */ unsigned int verify_host() { return wsman_transport_get_verify_host((WsManClient *)$self); } %rename("proxy=") set_proxy(const char *proxy); /* * Set http proxy URL * * Pass nil to disable proxy communication * * ====== Example * transport.proxy = "http://your.proxy.com:80" * */ void set_proxy(const char *proxy) { wsman_transport_set_proxy((WsManClient *)$self, proxy); } %newobject proxy; /* * Get http proxy URL * */ char *proxy() { return wsman_transport_get_proxy((WsManClient *)$self); } %rename("proxyauth=") set_proxyauth(const char *pauth); /* * Linux clients: HTTP proxy credentials * * Set the proxy username and password * * ====== Example * transport.proxyauth = "username:password" * */ void set_proxyauth(const char *pauth) { wsman_transport_set_proxyauth((WsManClient *)$self, pauth); } %newobject proxyauth; /* * Linux clients: HTTP proxy credentials * * Get the proxy username and password as "username:password" * * call-seq: * transport.proxyauth -> String * */ char *proxyauth(){ return wsman_transport_get_proxyauth((WsManClient *)$self); } %rename("cainfo=") set_cainfo(const char *cainfo); /* * Set the certification authority (CAINFO) * */ void set_cainfo(const char *cainfo) { wsman_transport_set_cainfo((WsManClient *)$self, cainfo); } %newobject cainfo; /* * Get the certification authority (CAINFO) * * call-seq: * transport.cainfo -> String * */ char *cainfo() { return wsman_transport_get_cainfo((WsManClient *)$self); } %rename("certhumbprint=") set_certhumbprint(const char *arg); /* * Set the certification thumbprint * */ void set_certhumbprint(const char *arg) { wsman_transport_set_certhumbprint((WsManClient *)$self, arg); } %newobject certhumbprint; /* * Set the certification thumbprint * * call-seq: * transport.certhumbprint -> String * */ char *certhumbprint() { return wsman_transport_get_certhumbprint((WsManClient *)$self); } %rename("capath=") set_capath(const char *capath); /* * Set the path to the certification authority (CAINFO) store * */ void set_capath(const char *capath) { wsman_transport_set_capath((WsManClient *)$self, capath); } %newobject capath; /* * Get the path to the certification authority (CAINFO) store * */ char *capath() { return wsman_transport_get_capath((WsManClient *)$self); } %rename("caoid=") set_caoid(const char *oid); /* * Windows client * * Set the CA OID * * ====== Reference * http://support.microsoft.com/kb/287547 * */ void set_caoid(const char *oid) { wsman_transport_set_caoid((WsManClient *)$self, oid); } %newobject caoid; /* * Windows client * * Get the CA OID * */ char *caoid() { return wsman_transport_get_caoid((WsManClient *)$self); } #ifdef _WIN32 %rename("calocal=") set_calocal(BOOL local); /* * Windows client * * Use local CA ? * */ void set_calocal(BOOL local) { wsman_transport_set_calocal((WsManClient *)$self, local); } /* * Windows client * * Use local CA ? * * call-seq: * transport.calocal -> Boolean * */ BOOL calocal() { return wsman_transport_get_calocal((WsManClient *)$self); } #endif %rename("cert=") set_cert(const char *cert); /* * Set the certificate * */ void set_cert(const char *cert) { wsman_transport_set_cert((WsManClient *)$self, cert); } %newobject cert; /* * Get the certificate * */ char *cert() { return wsman_transport_get_cert((WsManClient *)$self); } %rename("key=") set_key(const char *key); /* * Set the key * */ void set_key(const char *key) { wsman_transport_set_key((WsManClient *)$self, key); } %newobject key; /* * Get the key * */ char *key() { return wsman_transport_get_key((WsManClient *)$self); } }
Check if the passed method id is valid for authentication
int is_auth_method(int method) { return wsman_is_auth_method((WsManClient *)$self, method); } /* * Close the transport. No further communication possible. * */ void close() { wsman_transport_close_transport((WsManClient *)$self); } %rename("agent=") set_agent(const char *agent); /* * Set the HTTP agent identifier (User-agent:) string * * This is how the client will show up in the servers http log. * Defaults to "Openwsman" * * call-seq: * transport.agent = "Client identifier" * */ void set_agent(const char *agent) { wsman_transport_set_agent((WsManClient *)$self, agent); } %newobject agent; /* * Get the HTTP agent identifier string * * call-seq: * transport.agent -> String * */ char *agent() { return wsman_transport_get_agent ((WsManClient *)$self); } %rename("username") get_username(); %newobject get_username; /* * Server credentials * * Get the username part of the http transport credentials * * call-seq: * transport.username -> String * */ char *get_username() { return wsman_transport_get_userName((WsManClient *)$self); } %rename("username=") set_username(char *user_name); /* * Server credentials * * Set the username part of the http transport credentials * * call-seq: * transport.username = "Username" * */ void set_username(char *user_name) { wsman_transport_set_userName((WsManClient *)$self, user_name); } %rename("password") get_password(); %newobject get_password; /* * Server credentials * * Get the password part of the http transport credentials * * call-seq: * transport.password -> String * */ char *get_password() { return wsman_transport_get_password((WsManClient *)$self); } %rename("password=") set_password(char *password); /* * Server credentials * * Set the password part of the http transport credentials * * call-seq: * transport.password = "Password" * */ void set_password(char *password) { wsman_transport_set_password((WsManClient *)$self, password); } %rename("proxy_username") get_proxy_username(); %newobject get_proxy_username; /* * Windows clients: HTTP proxy credentials * * Get the username part of the http proxy credentials * * call-seq: * transport.proxy_username -> String * */ char *get_proxy_username() { return wsman_transport_get_proxy_username((WsManClient *)$self ); } %rename("proxy_username=") set_proxy_username(char *proxy_username); /* * Windows clients: HTTP proxy credentials * * Set the username part of the http proxy credentials * * call-seq: * transport.proxy_username = "proxy_username" * */ void set_proxy_username(char *proxy_username) { wsman_transport_set_proxy_username((WsManClient *)$self, proxy_username ); } %rename("proxy_password") get_proxy_password(); %newobject get_proxy_password; /* * Windows clients: HTTP proxy credentials * * Get the password part of the http proxy credentials * * call-seq: * transport.proxy_password -> String * */ char *get_proxy_password() { return wsman_transport_get_proxy_password((WsManClient *)$self ); } %rename("proxy_password=") set_proxy_password(char *proxy_password); /* * Windows clients: HTTP proxy credentials * * Set the password part of the http proxy credentials * * call-seq: * transport.proxy_password = "proxy_password" * */ void set_proxy_password(char *proxy_password) { wsman_transport_set_proxy_password((WsManClient *)$self, proxy_password ); } %rename("auth_method=") set_auth_method( const char *am); /* * Set the authentication method * * Value must be one of: * * Openwsman::NO_AUTH_STR * * Openwsman::BASIC_AUTH_STR * * Openwsman::DIGEST_AUTH_STR * * Openwsman::PASS_AUTH_STR * * Openwsman::NTLM_AUTH_STR * * Openwsman::GSSNEGOTIATE_AUTH_STR * */ void set_auth_method(const char *am) { wsman_transport_set_auth_method((WsManClient *)$self, am); } %newobject auth_method; /* * Set the authentication method * * call-seq: * transport.auth_method -> String * */ char *auth_method() { return wsman_transport_get_auth_method ((WsManClient *)$self); } /* * Set the authentication method string corresponding to the given * auth method id * * Value must be one of: * * Openwsman::NO_AUTH * * Openwsman::BASIC_AUTH * * Openwsman::DIGEST_AUTH * * Openwsman::PASS_AUTH * * Openwsman::NTLM_AUTH * * Openwsman::GSSNEGOTIATE_AUTH * * call-seq: * transport.auth_name(Integer) -> String * */ static const char *auth_name(int auth) { return wsmc_transport_get_auth_name(auth); } /* * Get the authentication method integer id * */ int auth_value() { return wsmc_transport_get_auth_value((WsManClient *)$self); } /* * Get string corresponding to given error code * * call-seq: * transport.error_string(Integer) -> String * */ static char *error_string(int err) { return wsman_transport_get_last_error_string(err); } %rename("timeout=") set_timeout(unsigned long timeout); /* * Set the transport timeout in seconds * * ====== Note * This is the http layer timeout. Not to be confused with the * WS-Management operation timeout set via Openwsman::ClientOptions.timeout * */ void set_timeout(unsigned long timeout) { wsman_transport_set_timeout((WsManClient *)$self, timeout); } /* * Get the transport timeout in seconds * * call-seq: * transport.timeout -> Integer * */ unsigned long timeout() { return wsman_transport_get_timeout((WsManClient *)$self); } %rename("verify_peer=") set_verify_peer( VALUE rvalue ); /* * verify the peer in SSL communication ? * * If passed +false+, +nil+, or 0: disable peer verification * else: enable peer verification * */ void set_verify_peer( VALUE rvalue ) { unsigned int value; if ((rvalue == Qfalse) || (rvalue == Qnil)) { value = 0; } else if ((TYPE(rvalue) == T_FIXNUM) && (FIX2INT(rvalue) == 0)) { value = 0; } else { value = 1; } wsman_transport_set_verify_peer((WsManClient *)$self, value); } %rename("verify_peer?") verify_peer(); %typemap(out) unsigned int verify_peer "$result = ($1 != 0) ? Qtrue : Qfalse;"; /* * Peer to be verified ? * * call-seq: * transport.verify_peer? -> Boolean * */ unsigned int verify_peer() { return wsman_transport_get_verify_peer((WsManClient *)$self); } %rename("verify_host=") set_verify_host(VALUE rvalue); /* * verify the host in SSL communication ? * * If passed +false+, +nil+, or 0: disable peer verification * else: enable peer verification * */ void set_verify_host( VALUE rvalue ) { unsigned int value; if ((rvalue == Qfalse) || (rvalue == Qnil)) { value = 0; } else if ((TYPE(rvalue) == T_FIXNUM) && (FIX2INT(rvalue) == 0)) { value = 0; } else { value = 1; } wsman_transport_set_verify_host((WsManClient *)$self, value); } %rename("verify_host?") verify_host(); %typemap(out) unsigned int verify_host "$result = ($1 != 0) ? Qtrue : Qfalse;"; /* * Host to be verified ? * * call-seq: * transport.verify_host? -> Boolean * */ unsigned int verify_host() { return wsman_transport_get_verify_host((WsManClient *)$self); } %rename("proxy=") set_proxy(const char *proxy); /* * Set http proxy URL * * Pass nil to disable proxy communication * * ====== Example * transport.proxy = "http://your.proxy.com:80" * */ void set_proxy(const char *proxy) { wsman_transport_set_proxy((WsManClient *)$self, proxy); } %newobject proxy; /* * Get http proxy URL * */ char *proxy() { return wsman_transport_get_proxy((WsManClient *)$self); } %rename("proxyauth=") set_proxyauth(const char *pauth); /* * Linux clients: HTTP proxy credentials * * Set the proxy username and password * * ====== Example * transport.proxyauth = "username:password" * */ void set_proxyauth(const char *pauth) { wsman_transport_set_proxyauth((WsManClient *)$self, pauth); } %newobject proxyauth; /* * Linux clients: HTTP proxy credentials * * Get the proxy username and password as "username:password" * * call-seq: * transport.proxyauth -> String * */ char *proxyauth(){ return wsman_transport_get_proxyauth((WsManClient *)$self); } %rename("cainfo=") set_cainfo(const char *cainfo); /* * Set the certification authority (CAINFO) * */ void set_cainfo(const char *cainfo) { wsman_transport_set_cainfo((WsManClient *)$self, cainfo); } %newobject cainfo; /* * Get the certification authority (CAINFO) * * call-seq: * transport.cainfo -> String * */ char *cainfo() { return wsman_transport_get_cainfo((WsManClient *)$self); } %rename("certhumbprint=") set_certhumbprint(const char *arg); /* * Set the certification thumbprint * */ void set_certhumbprint(const char *arg) { wsman_transport_set_certhumbprint((WsManClient *)$self, arg); } %newobject certhumbprint; /* * Set the certification thumbprint * * call-seq: * transport.certhumbprint -> String * */ char *certhumbprint() { return wsman_transport_get_certhumbprint((WsManClient *)$self); } %rename("capath=") set_capath(const char *capath); /* * Set the path to the certification authority (CAINFO) store * */ void set_capath(const char *capath) { wsman_transport_set_capath((WsManClient *)$self, capath); } %newobject capath; /* * Get the path to the certification authority (CAINFO) store * */ char *capath() { return wsman_transport_get_capath((WsManClient *)$self); } %rename("caoid=") set_caoid(const char *oid); /* * Windows client * * Set the CA OID * * ====== Reference * http://support.microsoft.com/kb/287547 * */ void set_caoid(const char *oid) { wsman_transport_set_caoid((WsManClient *)$self, oid); } %newobject caoid; /* * Windows client * * Get the CA OID * */ char *caoid() { return wsman_transport_get_caoid((WsManClient *)$self); } #ifdef _WIN32 %rename("calocal=") set_calocal(BOOL local); /* * Windows client * * Use local CA ? * */ void set_calocal(BOOL local) { wsman_transport_set_calocal((WsManClient *)$self, local); } /* * Windows client * * Use local CA ? * * call-seq: * transport.calocal -> Boolean * */ BOOL calocal() { return wsman_transport_get_calocal((WsManClient *)$self); } #endif %rename("cert=") set_cert(const char *cert); /* * Set the certificate * */ void set_cert(const char *cert) { wsman_transport_set_cert((WsManClient *)$self, cert); } %newobject cert; /* * Get the certificate * */ char *cert() { return wsman_transport_get_cert((WsManClient *)$self); } %rename("key=") set_key(const char *key); /* * Set the key * */ void set_key(const char *key) { wsman_transport_set_key((WsManClient *)$self, key); } %newobject key; /* * Get the key * */ char *key() { return wsman_transport_get_key((WsManClient *)$self); } }
Get the key
char *key() { return wsman_transport_get_key((WsManClient *)$self); } }
Set the key
void set_key(const char *key) { wsman_transport_set_key((WsManClient *)$self, key); } %newobject key; /* * Get the key * */ char *key() { return wsman_transport_get_key((WsManClient *)$self); } }
Server credentials
Get the password part of the http transport credentials
char *get_password() { return wsman_transport_get_password((WsManClient *)$self); } %rename("password=") set_password(char *password); /* * Server credentials * * Set the password part of the http transport credentials * * call-seq: * transport.password = "Password" * */ void set_password(char *password) { wsman_transport_set_password((WsManClient *)$self, password); } %rename("proxy_username") get_proxy_username(); %newobject get_proxy_username; /* * Windows clients: HTTP proxy credentials * * Get the username part of the http proxy credentials * * call-seq: * transport.proxy_username -> String * */ char *get_proxy_username() { return wsman_transport_get_proxy_username((WsManClient *)$self ); } %rename("proxy_username=") set_proxy_username(char *proxy_username); /* * Windows clients: HTTP proxy credentials * * Set the username part of the http proxy credentials * * call-seq: * transport.proxy_username = "proxy_username" * */ void set_proxy_username(char *proxy_username) { wsman_transport_set_proxy_username((WsManClient *)$self, proxy_username ); } %rename("proxy_password") get_proxy_password(); %newobject get_proxy_password; /* * Windows clients: HTTP proxy credentials * * Get the password part of the http proxy credentials * * call-seq: * transport.proxy_password -> String * */ char *get_proxy_password() { return wsman_transport_get_proxy_password((WsManClient *)$self ); } %rename("proxy_password=") set_proxy_password(char *proxy_password); /* * Windows clients: HTTP proxy credentials * * Set the password part of the http proxy credentials * * call-seq: * transport.proxy_password = "proxy_password" * */ void set_proxy_password(char *proxy_password) { wsman_transport_set_proxy_password((WsManClient *)$self, proxy_password ); } %rename("auth_method=") set_auth_method( const char *am); /* * Set the authentication method * * Value must be one of: * * Openwsman::NO_AUTH_STR * * Openwsman::BASIC_AUTH_STR * * Openwsman::DIGEST_AUTH_STR * * Openwsman::PASS_AUTH_STR * * Openwsman::NTLM_AUTH_STR * * Openwsman::GSSNEGOTIATE_AUTH_STR * */ void set_auth_method(const char *am) { wsman_transport_set_auth_method((WsManClient *)$self, am); } %newobject auth_method; /* * Set the authentication method * * call-seq: * transport.auth_method -> String * */ char *auth_method() { return wsman_transport_get_auth_method ((WsManClient *)$self); } /* * Set the authentication method string corresponding to the given * auth method id * * Value must be one of: * * Openwsman::NO_AUTH * * Openwsman::BASIC_AUTH * * Openwsman::DIGEST_AUTH * * Openwsman::PASS_AUTH * * Openwsman::NTLM_AUTH * * Openwsman::GSSNEGOTIATE_AUTH * * call-seq: * transport.auth_name(Integer) -> String * */ static const char *auth_name(int auth) { return wsmc_transport_get_auth_name(auth); } /* * Get the authentication method integer id * */ int auth_value() { return wsmc_transport_get_auth_value((WsManClient *)$self); } /* * Get string corresponding to given error code * * call-seq: * transport.error_string(Integer) -> String * */ static char *error_string(int err) { return wsman_transport_get_last_error_string(err); } %rename("timeout=") set_timeout(unsigned long timeout); /* * Set the transport timeout in seconds * * ====== Note * This is the http layer timeout. Not to be confused with the * WS-Management operation timeout set via Openwsman::ClientOptions.timeout * */ void set_timeout(unsigned long timeout) { wsman_transport_set_timeout((WsManClient *)$self, timeout); } /* * Get the transport timeout in seconds * * call-seq: * transport.timeout -> Integer * */ unsigned long timeout() { return wsman_transport_get_timeout((WsManClient *)$self); } %rename("verify_peer=") set_verify_peer( VALUE rvalue ); /* * verify the peer in SSL communication ? * * If passed +false+, +nil+, or 0: disable peer verification * else: enable peer verification * */ void set_verify_peer( VALUE rvalue ) { unsigned int value; if ((rvalue == Qfalse) || (rvalue == Qnil)) { value = 0; } else if ((TYPE(rvalue) == T_FIXNUM) && (FIX2INT(rvalue) == 0)) { value = 0; } else { value = 1; } wsman_transport_set_verify_peer((WsManClient *)$self, value); } %rename("verify_peer?") verify_peer(); %typemap(out) unsigned int verify_peer "$result = ($1 != 0) ? Qtrue : Qfalse;"; /* * Peer to be verified ? * * call-seq: * transport.verify_peer? -> Boolean * */ unsigned int verify_peer() { return wsman_transport_get_verify_peer((WsManClient *)$self); } %rename("verify_host=") set_verify_host(VALUE rvalue); /* * verify the host in SSL communication ? * * If passed +false+, +nil+, or 0: disable peer verification * else: enable peer verification * */ void set_verify_host( VALUE rvalue ) { unsigned int value; if ((rvalue == Qfalse) || (rvalue == Qnil)) { value = 0; } else if ((TYPE(rvalue) == T_FIXNUM) && (FIX2INT(rvalue) == 0)) { value = 0; } else { value = 1; } wsman_transport_set_verify_host((WsManClient *)$self, value); } %rename("verify_host?") verify_host(); %typemap(out) unsigned int verify_host "$result = ($1 != 0) ? Qtrue : Qfalse;"; /* * Host to be verified ? * * call-seq: * transport.verify_host? -> Boolean * */ unsigned int verify_host() { return wsman_transport_get_verify_host((WsManClient *)$self); } %rename("proxy=") set_proxy(const char *proxy); /* * Set http proxy URL * * Pass nil to disable proxy communication * * ====== Example * transport.proxy = "http://your.proxy.com:80" * */ void set_proxy(const char *proxy) { wsman_transport_set_proxy((WsManClient *)$self, proxy); } %newobject proxy; /* * Get http proxy URL * */ char *proxy() { return wsman_transport_get_proxy((WsManClient *)$self); } %rename("proxyauth=") set_proxyauth(const char *pauth); /* * Linux clients: HTTP proxy credentials * * Set the proxy username and password * * ====== Example * transport.proxyauth = "username:password" * */ void set_proxyauth(const char *pauth) { wsman_transport_set_proxyauth((WsManClient *)$self, pauth); } %newobject proxyauth; /* * Linux clients: HTTP proxy credentials * * Get the proxy username and password as "username:password" * * call-seq: * transport.proxyauth -> String * */ char *proxyauth(){ return wsman_transport_get_proxyauth((WsManClient *)$self); } %rename("cainfo=") set_cainfo(const char *cainfo); /* * Set the certification authority (CAINFO) * */ void set_cainfo(const char *cainfo) { wsman_transport_set_cainfo((WsManClient *)$self, cainfo); } %newobject cainfo; /* * Get the certification authority (CAINFO) * * call-seq: * transport.cainfo -> String * */ char *cainfo() { return wsman_transport_get_cainfo((WsManClient *)$self); } %rename("certhumbprint=") set_certhumbprint(const char *arg); /* * Set the certification thumbprint * */ void set_certhumbprint(const char *arg) { wsman_transport_set_certhumbprint((WsManClient *)$self, arg); } %newobject certhumbprint; /* * Set the certification thumbprint * * call-seq: * transport.certhumbprint -> String * */ char *certhumbprint() { return wsman_transport_get_certhumbprint((WsManClient *)$self); } %rename("capath=") set_capath(const char *capath); /* * Set the path to the certification authority (CAINFO) store * */ void set_capath(const char *capath) { wsman_transport_set_capath((WsManClient *)$self, capath); } %newobject capath; /* * Get the path to the certification authority (CAINFO) store * */ char *capath() { return wsman_transport_get_capath((WsManClient *)$self); } %rename("caoid=") set_caoid(const char *oid); /* * Windows client * * Set the CA OID * * ====== Reference * http://support.microsoft.com/kb/287547 * */ void set_caoid(const char *oid) { wsman_transport_set_caoid((WsManClient *)$self, oid); } %newobject caoid; /* * Windows client * * Get the CA OID * */ char *caoid() { return wsman_transport_get_caoid((WsManClient *)$self); } #ifdef _WIN32 %rename("calocal=") set_calocal(BOOL local); /* * Windows client * * Use local CA ? * */ void set_calocal(BOOL local) { wsman_transport_set_calocal((WsManClient *)$self, local); } /* * Windows client * * Use local CA ? * * call-seq: * transport.calocal -> Boolean * */ BOOL calocal() { return wsman_transport_get_calocal((WsManClient *)$self); } #endif %rename("cert=") set_cert(const char *cert); /* * Set the certificate * */ void set_cert(const char *cert) { wsman_transport_set_cert((WsManClient *)$self, cert); } %newobject cert; /* * Get the certificate * */ char *cert() { return wsman_transport_get_cert((WsManClient *)$self); } %rename("key=") set_key(const char *key); /* * Set the key * */ void set_key(const char *key) { wsman_transport_set_key((WsManClient *)$self, key); } %newobject key; /* * Get the key * */ char *key() { return wsman_transport_get_key((WsManClient *)$self); } }
Server credentials
Set the password part of the http transport credentials
void set_password(char *password) { wsman_transport_set_password((WsManClient *)$self, password); } %rename("proxy_username") get_proxy_username(); %newobject get_proxy_username; /* * Windows clients: HTTP proxy credentials * * Get the username part of the http proxy credentials * * call-seq: * transport.proxy_username -> String * */ char *get_proxy_username() { return wsman_transport_get_proxy_username((WsManClient *)$self ); } %rename("proxy_username=") set_proxy_username(char *proxy_username); /* * Windows clients: HTTP proxy credentials * * Set the username part of the http proxy credentials * * call-seq: * transport.proxy_username = "proxy_username" * */ void set_proxy_username(char *proxy_username) { wsman_transport_set_proxy_username((WsManClient *)$self, proxy_username ); } %rename("proxy_password") get_proxy_password(); %newobject get_proxy_password; /* * Windows clients: HTTP proxy credentials * * Get the password part of the http proxy credentials * * call-seq: * transport.proxy_password -> String * */ char *get_proxy_password() { return wsman_transport_get_proxy_password((WsManClient *)$self ); } %rename("proxy_password=") set_proxy_password(char *proxy_password); /* * Windows clients: HTTP proxy credentials * * Set the password part of the http proxy credentials * * call-seq: * transport.proxy_password = "proxy_password" * */ void set_proxy_password(char *proxy_password) { wsman_transport_set_proxy_password((WsManClient *)$self, proxy_password ); } %rename("auth_method=") set_auth_method( const char *am); /* * Set the authentication method * * Value must be one of: * * Openwsman::NO_AUTH_STR * * Openwsman::BASIC_AUTH_STR * * Openwsman::DIGEST_AUTH_STR * * Openwsman::PASS_AUTH_STR * * Openwsman::NTLM_AUTH_STR * * Openwsman::GSSNEGOTIATE_AUTH_STR * */ void set_auth_method(const char *am) { wsman_transport_set_auth_method((WsManClient *)$self, am); } %newobject auth_method; /* * Set the authentication method * * call-seq: * transport.auth_method -> String * */ char *auth_method() { return wsman_transport_get_auth_method ((WsManClient *)$self); } /* * Set the authentication method string corresponding to the given * auth method id * * Value must be one of: * * Openwsman::NO_AUTH * * Openwsman::BASIC_AUTH * * Openwsman::DIGEST_AUTH * * Openwsman::PASS_AUTH * * Openwsman::NTLM_AUTH * * Openwsman::GSSNEGOTIATE_AUTH * * call-seq: * transport.auth_name(Integer) -> String * */ static const char *auth_name(int auth) { return wsmc_transport_get_auth_name(auth); } /* * Get the authentication method integer id * */ int auth_value() { return wsmc_transport_get_auth_value((WsManClient *)$self); } /* * Get string corresponding to given error code * * call-seq: * transport.error_string(Integer) -> String * */ static char *error_string(int err) { return wsman_transport_get_last_error_string(err); } %rename("timeout=") set_timeout(unsigned long timeout); /* * Set the transport timeout in seconds * * ====== Note * This is the http layer timeout. Not to be confused with the * WS-Management operation timeout set via Openwsman::ClientOptions.timeout * */ void set_timeout(unsigned long timeout) { wsman_transport_set_timeout((WsManClient *)$self, timeout); } /* * Get the transport timeout in seconds * * call-seq: * transport.timeout -> Integer * */ unsigned long timeout() { return wsman_transport_get_timeout((WsManClient *)$self); } %rename("verify_peer=") set_verify_peer( VALUE rvalue ); /* * verify the peer in SSL communication ? * * If passed +false+, +nil+, or 0: disable peer verification * else: enable peer verification * */ void set_verify_peer( VALUE rvalue ) { unsigned int value; if ((rvalue == Qfalse) || (rvalue == Qnil)) { value = 0; } else if ((TYPE(rvalue) == T_FIXNUM) && (FIX2INT(rvalue) == 0)) { value = 0; } else { value = 1; } wsman_transport_set_verify_peer((WsManClient *)$self, value); } %rename("verify_peer?") verify_peer(); %typemap(out) unsigned int verify_peer "$result = ($1 != 0) ? Qtrue : Qfalse;"; /* * Peer to be verified ? * * call-seq: * transport.verify_peer? -> Boolean * */ unsigned int verify_peer() { return wsman_transport_get_verify_peer((WsManClient *)$self); } %rename("verify_host=") set_verify_host(VALUE rvalue); /* * verify the host in SSL communication ? * * If passed +false+, +nil+, or 0: disable peer verification * else: enable peer verification * */ void set_verify_host( VALUE rvalue ) { unsigned int value; if ((rvalue == Qfalse) || (rvalue == Qnil)) { value = 0; } else if ((TYPE(rvalue) == T_FIXNUM) && (FIX2INT(rvalue) == 0)) { value = 0; } else { value = 1; } wsman_transport_set_verify_host((WsManClient *)$self, value); } %rename("verify_host?") verify_host(); %typemap(out) unsigned int verify_host "$result = ($1 != 0) ? Qtrue : Qfalse;"; /* * Host to be verified ? * * call-seq: * transport.verify_host? -> Boolean * */ unsigned int verify_host() { return wsman_transport_get_verify_host((WsManClient *)$self); } %rename("proxy=") set_proxy(const char *proxy); /* * Set http proxy URL * * Pass nil to disable proxy communication * * ====== Example * transport.proxy = "http://your.proxy.com:80" * */ void set_proxy(const char *proxy) { wsman_transport_set_proxy((WsManClient *)$self, proxy); } %newobject proxy; /* * Get http proxy URL * */ char *proxy() { return wsman_transport_get_proxy((WsManClient *)$self); } %rename("proxyauth=") set_proxyauth(const char *pauth); /* * Linux clients: HTTP proxy credentials * * Set the proxy username and password * * ====== Example * transport.proxyauth = "username:password" * */ void set_proxyauth(const char *pauth) { wsman_transport_set_proxyauth((WsManClient *)$self, pauth); } %newobject proxyauth; /* * Linux clients: HTTP proxy credentials * * Get the proxy username and password as "username:password" * * call-seq: * transport.proxyauth -> String * */ char *proxyauth(){ return wsman_transport_get_proxyauth((WsManClient *)$self); } %rename("cainfo=") set_cainfo(const char *cainfo); /* * Set the certification authority (CAINFO) * */ void set_cainfo(const char *cainfo) { wsman_transport_set_cainfo((WsManClient *)$self, cainfo); } %newobject cainfo; /* * Get the certification authority (CAINFO) * * call-seq: * transport.cainfo -> String * */ char *cainfo() { return wsman_transport_get_cainfo((WsManClient *)$self); } %rename("certhumbprint=") set_certhumbprint(const char *arg); /* * Set the certification thumbprint * */ void set_certhumbprint(const char *arg) { wsman_transport_set_certhumbprint((WsManClient *)$self, arg); } %newobject certhumbprint; /* * Set the certification thumbprint * * call-seq: * transport.certhumbprint -> String * */ char *certhumbprint() { return wsman_transport_get_certhumbprint((WsManClient *)$self); } %rename("capath=") set_capath(const char *capath); /* * Set the path to the certification authority (CAINFO) store * */ void set_capath(const char *capath) { wsman_transport_set_capath((WsManClient *)$self, capath); } %newobject capath; /* * Get the path to the certification authority (CAINFO) store * */ char *capath() { return wsman_transport_get_capath((WsManClient *)$self); } %rename("caoid=") set_caoid(const char *oid); /* * Windows client * * Set the CA OID * * ====== Reference * http://support.microsoft.com/kb/287547 * */ void set_caoid(const char *oid) { wsman_transport_set_caoid((WsManClient *)$self, oid); } %newobject caoid; /* * Windows client * * Get the CA OID * */ char *caoid() { return wsman_transport_get_caoid((WsManClient *)$self); } #ifdef _WIN32 %rename("calocal=") set_calocal(BOOL local); /* * Windows client * * Use local CA ? * */ void set_calocal(BOOL local) { wsman_transport_set_calocal((WsManClient *)$self, local); } /* * Windows client * * Use local CA ? * * call-seq: * transport.calocal -> Boolean * */ BOOL calocal() { return wsman_transport_get_calocal((WsManClient *)$self); } #endif %rename("cert=") set_cert(const char *cert); /* * Set the certificate * */ void set_cert(const char *cert) { wsman_transport_set_cert((WsManClient *)$self, cert); } %newobject cert; /* * Get the certificate * */ char *cert() { return wsman_transport_get_cert((WsManClient *)$self); } %rename("key=") set_key(const char *key); /* * Set the key * */ void set_key(const char *key) { wsman_transport_set_key((WsManClient *)$self, key); } %newobject key; /* * Get the key * */ char *key() { return wsman_transport_get_key((WsManClient *)$self); } }
Get http proxy URL
char *proxy() { return wsman_transport_get_proxy((WsManClient *)$self); } %rename("proxyauth=") set_proxyauth(const char *pauth); /* * Linux clients: HTTP proxy credentials * * Set the proxy username and password * * ====== Example * transport.proxyauth = "username:password" * */ void set_proxyauth(const char *pauth) { wsman_transport_set_proxyauth((WsManClient *)$self, pauth); } %newobject proxyauth; /* * Linux clients: HTTP proxy credentials * * Get the proxy username and password as "username:password" * * call-seq: * transport.proxyauth -> String * */ char *proxyauth(){ return wsman_transport_get_proxyauth((WsManClient *)$self); } %rename("cainfo=") set_cainfo(const char *cainfo); /* * Set the certification authority (CAINFO) * */ void set_cainfo(const char *cainfo) { wsman_transport_set_cainfo((WsManClient *)$self, cainfo); } %newobject cainfo; /* * Get the certification authority (CAINFO) * * call-seq: * transport.cainfo -> String * */ char *cainfo() { return wsman_transport_get_cainfo((WsManClient *)$self); } %rename("certhumbprint=") set_certhumbprint(const char *arg); /* * Set the certification thumbprint * */ void set_certhumbprint(const char *arg) { wsman_transport_set_certhumbprint((WsManClient *)$self, arg); } %newobject certhumbprint; /* * Set the certification thumbprint * * call-seq: * transport.certhumbprint -> String * */ char *certhumbprint() { return wsman_transport_get_certhumbprint((WsManClient *)$self); } %rename("capath=") set_capath(const char *capath); /* * Set the path to the certification authority (CAINFO) store * */ void set_capath(const char *capath) { wsman_transport_set_capath((WsManClient *)$self, capath); } %newobject capath; /* * Get the path to the certification authority (CAINFO) store * */ char *capath() { return wsman_transport_get_capath((WsManClient *)$self); } %rename("caoid=") set_caoid(const char *oid); /* * Windows client * * Set the CA OID * * ====== Reference * http://support.microsoft.com/kb/287547 * */ void set_caoid(const char *oid) { wsman_transport_set_caoid((WsManClient *)$self, oid); } %newobject caoid; /* * Windows client * * Get the CA OID * */ char *caoid() { return wsman_transport_get_caoid((WsManClient *)$self); } #ifdef _WIN32 %rename("calocal=") set_calocal(BOOL local); /* * Windows client * * Use local CA ? * */ void set_calocal(BOOL local) { wsman_transport_set_calocal((WsManClient *)$self, local); } /* * Windows client * * Use local CA ? * * call-seq: * transport.calocal -> Boolean * */ BOOL calocal() { return wsman_transport_get_calocal((WsManClient *)$self); } #endif %rename("cert=") set_cert(const char *cert); /* * Set the certificate * */ void set_cert(const char *cert) { wsman_transport_set_cert((WsManClient *)$self, cert); } %newobject cert; /* * Get the certificate * */ char *cert() { return wsman_transport_get_cert((WsManClient *)$self); } %rename("key=") set_key(const char *key); /* * Set the key * */ void set_key(const char *key) { wsman_transport_set_key((WsManClient *)$self, key); } %newobject key; /* * Get the key * */ char *key() { return wsman_transport_get_key((WsManClient *)$self); } }
Set http proxy URL
Pass nil to disable proxy communication
Example¶ ↑
transport.proxy = "http://your.proxy.com:80"
void set_proxy(const char *proxy) { wsman_transport_set_proxy((WsManClient *)$self, proxy); } %newobject proxy; /* * Get http proxy URL * */ char *proxy() { return wsman_transport_get_proxy((WsManClient *)$self); } %rename("proxyauth=") set_proxyauth(const char *pauth); /* * Linux clients: HTTP proxy credentials * * Set the proxy username and password * * ====== Example * transport.proxyauth = "username:password" * */ void set_proxyauth(const char *pauth) { wsman_transport_set_proxyauth((WsManClient *)$self, pauth); } %newobject proxyauth; /* * Linux clients: HTTP proxy credentials * * Get the proxy username and password as "username:password" * * call-seq: * transport.proxyauth -> String * */ char *proxyauth(){ return wsman_transport_get_proxyauth((WsManClient *)$self); } %rename("cainfo=") set_cainfo(const char *cainfo); /* * Set the certification authority (CAINFO) * */ void set_cainfo(const char *cainfo) { wsman_transport_set_cainfo((WsManClient *)$self, cainfo); } %newobject cainfo; /* * Get the certification authority (CAINFO) * * call-seq: * transport.cainfo -> String * */ char *cainfo() { return wsman_transport_get_cainfo((WsManClient *)$self); } %rename("certhumbprint=") set_certhumbprint(const char *arg); /* * Set the certification thumbprint * */ void set_certhumbprint(const char *arg) { wsman_transport_set_certhumbprint((WsManClient *)$self, arg); } %newobject certhumbprint; /* * Set the certification thumbprint * * call-seq: * transport.certhumbprint -> String * */ char *certhumbprint() { return wsman_transport_get_certhumbprint((WsManClient *)$self); } %rename("capath=") set_capath(const char *capath); /* * Set the path to the certification authority (CAINFO) store * */ void set_capath(const char *capath) { wsman_transport_set_capath((WsManClient *)$self, capath); } %newobject capath; /* * Get the path to the certification authority (CAINFO) store * */ char *capath() { return wsman_transport_get_capath((WsManClient *)$self); } %rename("caoid=") set_caoid(const char *oid); /* * Windows client * * Set the CA OID * * ====== Reference * http://support.microsoft.com/kb/287547 * */ void set_caoid(const char *oid) { wsman_transport_set_caoid((WsManClient *)$self, oid); } %newobject caoid; /* * Windows client * * Get the CA OID * */ char *caoid() { return wsman_transport_get_caoid((WsManClient *)$self); } #ifdef _WIN32 %rename("calocal=") set_calocal(BOOL local); /* * Windows client * * Use local CA ? * */ void set_calocal(BOOL local) { wsman_transport_set_calocal((WsManClient *)$self, local); } /* * Windows client * * Use local CA ? * * call-seq: * transport.calocal -> Boolean * */ BOOL calocal() { return wsman_transport_get_calocal((WsManClient *)$self); } #endif %rename("cert=") set_cert(const char *cert); /* * Set the certificate * */ void set_cert(const char *cert) { wsman_transport_set_cert((WsManClient *)$self, cert); } %newobject cert; /* * Get the certificate * */ char *cert() { return wsman_transport_get_cert((WsManClient *)$self); } %rename("key=") set_key(const char *key); /* * Set the key * */ void set_key(const char *key) { wsman_transport_set_key((WsManClient *)$self, key); } %newobject key; /* * Get the key * */ char *key() { return wsman_transport_get_key((WsManClient *)$self); } }
Windows clients: HTTP proxy credentials
Get the password part of the http proxy credentials
char *get_proxy_password() { return wsman_transport_get_proxy_password((WsManClient *)$self ); } %rename("proxy_password=") set_proxy_password(char *proxy_password); /* * Windows clients: HTTP proxy credentials * * Set the password part of the http proxy credentials * * call-seq: * transport.proxy_password = "proxy_password" * */ void set_proxy_password(char *proxy_password) { wsman_transport_set_proxy_password((WsManClient *)$self, proxy_password ); } %rename("auth_method=") set_auth_method( const char *am); /* * Set the authentication method * * Value must be one of: * * Openwsman::NO_AUTH_STR * * Openwsman::BASIC_AUTH_STR * * Openwsman::DIGEST_AUTH_STR * * Openwsman::PASS_AUTH_STR * * Openwsman::NTLM_AUTH_STR * * Openwsman::GSSNEGOTIATE_AUTH_STR * */ void set_auth_method(const char *am) { wsman_transport_set_auth_method((WsManClient *)$self, am); } %newobject auth_method; /* * Set the authentication method * * call-seq: * transport.auth_method -> String * */ char *auth_method() { return wsman_transport_get_auth_method ((WsManClient *)$self); } /* * Set the authentication method string corresponding to the given * auth method id * * Value must be one of: * * Openwsman::NO_AUTH * * Openwsman::BASIC_AUTH * * Openwsman::DIGEST_AUTH * * Openwsman::PASS_AUTH * * Openwsman::NTLM_AUTH * * Openwsman::GSSNEGOTIATE_AUTH * * call-seq: * transport.auth_name(Integer) -> String * */ static const char *auth_name(int auth) { return wsmc_transport_get_auth_name(auth); } /* * Get the authentication method integer id * */ int auth_value() { return wsmc_transport_get_auth_value((WsManClient *)$self); } /* * Get string corresponding to given error code * * call-seq: * transport.error_string(Integer) -> String * */ static char *error_string(int err) { return wsman_transport_get_last_error_string(err); } %rename("timeout=") set_timeout(unsigned long timeout); /* * Set the transport timeout in seconds * * ====== Note * This is the http layer timeout. Not to be confused with the * WS-Management operation timeout set via Openwsman::ClientOptions.timeout * */ void set_timeout(unsigned long timeout) { wsman_transport_set_timeout((WsManClient *)$self, timeout); } /* * Get the transport timeout in seconds * * call-seq: * transport.timeout -> Integer * */ unsigned long timeout() { return wsman_transport_get_timeout((WsManClient *)$self); } %rename("verify_peer=") set_verify_peer( VALUE rvalue ); /* * verify the peer in SSL communication ? * * If passed +false+, +nil+, or 0: disable peer verification * else: enable peer verification * */ void set_verify_peer( VALUE rvalue ) { unsigned int value; if ((rvalue == Qfalse) || (rvalue == Qnil)) { value = 0; } else if ((TYPE(rvalue) == T_FIXNUM) && (FIX2INT(rvalue) == 0)) { value = 0; } else { value = 1; } wsman_transport_set_verify_peer((WsManClient *)$self, value); } %rename("verify_peer?") verify_peer(); %typemap(out) unsigned int verify_peer "$result = ($1 != 0) ? Qtrue : Qfalse;"; /* * Peer to be verified ? * * call-seq: * transport.verify_peer? -> Boolean * */ unsigned int verify_peer() { return wsman_transport_get_verify_peer((WsManClient *)$self); } %rename("verify_host=") set_verify_host(VALUE rvalue); /* * verify the host in SSL communication ? * * If passed +false+, +nil+, or 0: disable peer verification * else: enable peer verification * */ void set_verify_host( VALUE rvalue ) { unsigned int value; if ((rvalue == Qfalse) || (rvalue == Qnil)) { value = 0; } else if ((TYPE(rvalue) == T_FIXNUM) && (FIX2INT(rvalue) == 0)) { value = 0; } else { value = 1; } wsman_transport_set_verify_host((WsManClient *)$self, value); } %rename("verify_host?") verify_host(); %typemap(out) unsigned int verify_host "$result = ($1 != 0) ? Qtrue : Qfalse;"; /* * Host to be verified ? * * call-seq: * transport.verify_host? -> Boolean * */ unsigned int verify_host() { return wsman_transport_get_verify_host((WsManClient *)$self); } %rename("proxy=") set_proxy(const char *proxy); /* * Set http proxy URL * * Pass nil to disable proxy communication * * ====== Example * transport.proxy = "http://your.proxy.com:80" * */ void set_proxy(const char *proxy) { wsman_transport_set_proxy((WsManClient *)$self, proxy); } %newobject proxy; /* * Get http proxy URL * */ char *proxy() { return wsman_transport_get_proxy((WsManClient *)$self); } %rename("proxyauth=") set_proxyauth(const char *pauth); /* * Linux clients: HTTP proxy credentials * * Set the proxy username and password * * ====== Example * transport.proxyauth = "username:password" * */ void set_proxyauth(const char *pauth) { wsman_transport_set_proxyauth((WsManClient *)$self, pauth); } %newobject proxyauth; /* * Linux clients: HTTP proxy credentials * * Get the proxy username and password as "username:password" * * call-seq: * transport.proxyauth -> String * */ char *proxyauth(){ return wsman_transport_get_proxyauth((WsManClient *)$self); } %rename("cainfo=") set_cainfo(const char *cainfo); /* * Set the certification authority (CAINFO) * */ void set_cainfo(const char *cainfo) { wsman_transport_set_cainfo((WsManClient *)$self, cainfo); } %newobject cainfo; /* * Get the certification authority (CAINFO) * * call-seq: * transport.cainfo -> String * */ char *cainfo() { return wsman_transport_get_cainfo((WsManClient *)$self); } %rename("certhumbprint=") set_certhumbprint(const char *arg); /* * Set the certification thumbprint * */ void set_certhumbprint(const char *arg) { wsman_transport_set_certhumbprint((WsManClient *)$self, arg); } %newobject certhumbprint; /* * Set the certification thumbprint * * call-seq: * transport.certhumbprint -> String * */ char *certhumbprint() { return wsman_transport_get_certhumbprint((WsManClient *)$self); } %rename("capath=") set_capath(const char *capath); /* * Set the path to the certification authority (CAINFO) store * */ void set_capath(const char *capath) { wsman_transport_set_capath((WsManClient *)$self, capath); } %newobject capath; /* * Get the path to the certification authority (CAINFO) store * */ char *capath() { return wsman_transport_get_capath((WsManClient *)$self); } %rename("caoid=") set_caoid(const char *oid); /* * Windows client * * Set the CA OID * * ====== Reference * http://support.microsoft.com/kb/287547 * */ void set_caoid(const char *oid) { wsman_transport_set_caoid((WsManClient *)$self, oid); } %newobject caoid; /* * Windows client * * Get the CA OID * */ char *caoid() { return wsman_transport_get_caoid((WsManClient *)$self); } #ifdef _WIN32 %rename("calocal=") set_calocal(BOOL local); /* * Windows client * * Use local CA ? * */ void set_calocal(BOOL local) { wsman_transport_set_calocal((WsManClient *)$self, local); } /* * Windows client * * Use local CA ? * * call-seq: * transport.calocal -> Boolean * */ BOOL calocal() { return wsman_transport_get_calocal((WsManClient *)$self); } #endif %rename("cert=") set_cert(const char *cert); /* * Set the certificate * */ void set_cert(const char *cert) { wsman_transport_set_cert((WsManClient *)$self, cert); } %newobject cert; /* * Get the certificate * */ char *cert() { return wsman_transport_get_cert((WsManClient *)$self); } %rename("key=") set_key(const char *key); /* * Set the key * */ void set_key(const char *key) { wsman_transport_set_key((WsManClient *)$self, key); } %newobject key; /* * Get the key * */ char *key() { return wsman_transport_get_key((WsManClient *)$self); } }
Windows clients: HTTP proxy credentials
Set the password part of the http proxy credentials
void set_proxy_password(char *proxy_password) { wsman_transport_set_proxy_password((WsManClient *)$self, proxy_password ); } %rename("auth_method=") set_auth_method( const char *am); /* * Set the authentication method * * Value must be one of: * * Openwsman::NO_AUTH_STR * * Openwsman::BASIC_AUTH_STR * * Openwsman::DIGEST_AUTH_STR * * Openwsman::PASS_AUTH_STR * * Openwsman::NTLM_AUTH_STR * * Openwsman::GSSNEGOTIATE_AUTH_STR * */ void set_auth_method(const char *am) { wsman_transport_set_auth_method((WsManClient *)$self, am); } %newobject auth_method; /* * Set the authentication method * * call-seq: * transport.auth_method -> String * */ char *auth_method() { return wsman_transport_get_auth_method ((WsManClient *)$self); } /* * Set the authentication method string corresponding to the given * auth method id * * Value must be one of: * * Openwsman::NO_AUTH * * Openwsman::BASIC_AUTH * * Openwsman::DIGEST_AUTH * * Openwsman::PASS_AUTH * * Openwsman::NTLM_AUTH * * Openwsman::GSSNEGOTIATE_AUTH * * call-seq: * transport.auth_name(Integer) -> String * */ static const char *auth_name(int auth) { return wsmc_transport_get_auth_name(auth); } /* * Get the authentication method integer id * */ int auth_value() { return wsmc_transport_get_auth_value((WsManClient *)$self); } /* * Get string corresponding to given error code * * call-seq: * transport.error_string(Integer) -> String * */ static char *error_string(int err) { return wsman_transport_get_last_error_string(err); } %rename("timeout=") set_timeout(unsigned long timeout); /* * Set the transport timeout in seconds * * ====== Note * This is the http layer timeout. Not to be confused with the * WS-Management operation timeout set via Openwsman::ClientOptions.timeout * */ void set_timeout(unsigned long timeout) { wsman_transport_set_timeout((WsManClient *)$self, timeout); } /* * Get the transport timeout in seconds * * call-seq: * transport.timeout -> Integer * */ unsigned long timeout() { return wsman_transport_get_timeout((WsManClient *)$self); } %rename("verify_peer=") set_verify_peer( VALUE rvalue ); /* * verify the peer in SSL communication ? * * If passed +false+, +nil+, or 0: disable peer verification * else: enable peer verification * */ void set_verify_peer( VALUE rvalue ) { unsigned int value; if ((rvalue == Qfalse) || (rvalue == Qnil)) { value = 0; } else if ((TYPE(rvalue) == T_FIXNUM) && (FIX2INT(rvalue) == 0)) { value = 0; } else { value = 1; } wsman_transport_set_verify_peer((WsManClient *)$self, value); } %rename("verify_peer?") verify_peer(); %typemap(out) unsigned int verify_peer "$result = ($1 != 0) ? Qtrue : Qfalse;"; /* * Peer to be verified ? * * call-seq: * transport.verify_peer? -> Boolean * */ unsigned int verify_peer() { return wsman_transport_get_verify_peer((WsManClient *)$self); } %rename("verify_host=") set_verify_host(VALUE rvalue); /* * verify the host in SSL communication ? * * If passed +false+, +nil+, or 0: disable peer verification * else: enable peer verification * */ void set_verify_host( VALUE rvalue ) { unsigned int value; if ((rvalue == Qfalse) || (rvalue == Qnil)) { value = 0; } else if ((TYPE(rvalue) == T_FIXNUM) && (FIX2INT(rvalue) == 0)) { value = 0; } else { value = 1; } wsman_transport_set_verify_host((WsManClient *)$self, value); } %rename("verify_host?") verify_host(); %typemap(out) unsigned int verify_host "$result = ($1 != 0) ? Qtrue : Qfalse;"; /* * Host to be verified ? * * call-seq: * transport.verify_host? -> Boolean * */ unsigned int verify_host() { return wsman_transport_get_verify_host((WsManClient *)$self); } %rename("proxy=") set_proxy(const char *proxy); /* * Set http proxy URL * * Pass nil to disable proxy communication * * ====== Example * transport.proxy = "http://your.proxy.com:80" * */ void set_proxy(const char *proxy) { wsman_transport_set_proxy((WsManClient *)$self, proxy); } %newobject proxy; /* * Get http proxy URL * */ char *proxy() { return wsman_transport_get_proxy((WsManClient *)$self); } %rename("proxyauth=") set_proxyauth(const char *pauth); /* * Linux clients: HTTP proxy credentials * * Set the proxy username and password * * ====== Example * transport.proxyauth = "username:password" * */ void set_proxyauth(const char *pauth) { wsman_transport_set_proxyauth((WsManClient *)$self, pauth); } %newobject proxyauth; /* * Linux clients: HTTP proxy credentials * * Get the proxy username and password as "username:password" * * call-seq: * transport.proxyauth -> String * */ char *proxyauth(){ return wsman_transport_get_proxyauth((WsManClient *)$self); } %rename("cainfo=") set_cainfo(const char *cainfo); /* * Set the certification authority (CAINFO) * */ void set_cainfo(const char *cainfo) { wsman_transport_set_cainfo((WsManClient *)$self, cainfo); } %newobject cainfo; /* * Get the certification authority (CAINFO) * * call-seq: * transport.cainfo -> String * */ char *cainfo() { return wsman_transport_get_cainfo((WsManClient *)$self); } %rename("certhumbprint=") set_certhumbprint(const char *arg); /* * Set the certification thumbprint * */ void set_certhumbprint(const char *arg) { wsman_transport_set_certhumbprint((WsManClient *)$self, arg); } %newobject certhumbprint; /* * Set the certification thumbprint * * call-seq: * transport.certhumbprint -> String * */ char *certhumbprint() { return wsman_transport_get_certhumbprint((WsManClient *)$self); } %rename("capath=") set_capath(const char *capath); /* * Set the path to the certification authority (CAINFO) store * */ void set_capath(const char *capath) { wsman_transport_set_capath((WsManClient *)$self, capath); } %newobject capath; /* * Get the path to the certification authority (CAINFO) store * */ char *capath() { return wsman_transport_get_capath((WsManClient *)$self); } %rename("caoid=") set_caoid(const char *oid); /* * Windows client * * Set the CA OID * * ====== Reference * http://support.microsoft.com/kb/287547 * */ void set_caoid(const char *oid) { wsman_transport_set_caoid((WsManClient *)$self, oid); } %newobject caoid; /* * Windows client * * Get the CA OID * */ char *caoid() { return wsman_transport_get_caoid((WsManClient *)$self); } #ifdef _WIN32 %rename("calocal=") set_calocal(BOOL local); /* * Windows client * * Use local CA ? * */ void set_calocal(BOOL local) { wsman_transport_set_calocal((WsManClient *)$self, local); } /* * Windows client * * Use local CA ? * * call-seq: * transport.calocal -> Boolean * */ BOOL calocal() { return wsman_transport_get_calocal((WsManClient *)$self); } #endif %rename("cert=") set_cert(const char *cert); /* * Set the certificate * */ void set_cert(const char *cert) { wsman_transport_set_cert((WsManClient *)$self, cert); } %newobject cert; /* * Get the certificate * */ char *cert() { return wsman_transport_get_cert((WsManClient *)$self); } %rename("key=") set_key(const char *key); /* * Set the key * */ void set_key(const char *key) { wsman_transport_set_key((WsManClient *)$self, key); } %newobject key; /* * Get the key * */ char *key() { return wsman_transport_get_key((WsManClient *)$self); } }
Windows clients: HTTP proxy credentials
Get the username part of the http proxy credentials
char *get_proxy_username() { return wsman_transport_get_proxy_username((WsManClient *)$self ); } %rename("proxy_username=") set_proxy_username(char *proxy_username); /* * Windows clients: HTTP proxy credentials * * Set the username part of the http proxy credentials * * call-seq: * transport.proxy_username = "proxy_username" * */ void set_proxy_username(char *proxy_username) { wsman_transport_set_proxy_username((WsManClient *)$self, proxy_username ); } %rename("proxy_password") get_proxy_password(); %newobject get_proxy_password; /* * Windows clients: HTTP proxy credentials * * Get the password part of the http proxy credentials * * call-seq: * transport.proxy_password -> String * */ char *get_proxy_password() { return wsman_transport_get_proxy_password((WsManClient *)$self ); } %rename("proxy_password=") set_proxy_password(char *proxy_password); /* * Windows clients: HTTP proxy credentials * * Set the password part of the http proxy credentials * * call-seq: * transport.proxy_password = "proxy_password" * */ void set_proxy_password(char *proxy_password) { wsman_transport_set_proxy_password((WsManClient *)$self, proxy_password ); } %rename("auth_method=") set_auth_method( const char *am); /* * Set the authentication method * * Value must be one of: * * Openwsman::NO_AUTH_STR * * Openwsman::BASIC_AUTH_STR * * Openwsman::DIGEST_AUTH_STR * * Openwsman::PASS_AUTH_STR * * Openwsman::NTLM_AUTH_STR * * Openwsman::GSSNEGOTIATE_AUTH_STR * */ void set_auth_method(const char *am) { wsman_transport_set_auth_method((WsManClient *)$self, am); } %newobject auth_method; /* * Set the authentication method * * call-seq: * transport.auth_method -> String * */ char *auth_method() { return wsman_transport_get_auth_method ((WsManClient *)$self); } /* * Set the authentication method string corresponding to the given * auth method id * * Value must be one of: * * Openwsman::NO_AUTH * * Openwsman::BASIC_AUTH * * Openwsman::DIGEST_AUTH * * Openwsman::PASS_AUTH * * Openwsman::NTLM_AUTH * * Openwsman::GSSNEGOTIATE_AUTH * * call-seq: * transport.auth_name(Integer) -> String * */ static const char *auth_name(int auth) { return wsmc_transport_get_auth_name(auth); } /* * Get the authentication method integer id * */ int auth_value() { return wsmc_transport_get_auth_value((WsManClient *)$self); } /* * Get string corresponding to given error code * * call-seq: * transport.error_string(Integer) -> String * */ static char *error_string(int err) { return wsman_transport_get_last_error_string(err); } %rename("timeout=") set_timeout(unsigned long timeout); /* * Set the transport timeout in seconds * * ====== Note * This is the http layer timeout. Not to be confused with the * WS-Management operation timeout set via Openwsman::ClientOptions.timeout * */ void set_timeout(unsigned long timeout) { wsman_transport_set_timeout((WsManClient *)$self, timeout); } /* * Get the transport timeout in seconds * * call-seq: * transport.timeout -> Integer * */ unsigned long timeout() { return wsman_transport_get_timeout((WsManClient *)$self); } %rename("verify_peer=") set_verify_peer( VALUE rvalue ); /* * verify the peer in SSL communication ? * * If passed +false+, +nil+, or 0: disable peer verification * else: enable peer verification * */ void set_verify_peer( VALUE rvalue ) { unsigned int value; if ((rvalue == Qfalse) || (rvalue == Qnil)) { value = 0; } else if ((TYPE(rvalue) == T_FIXNUM) && (FIX2INT(rvalue) == 0)) { value = 0; } else { value = 1; } wsman_transport_set_verify_peer((WsManClient *)$self, value); } %rename("verify_peer?") verify_peer(); %typemap(out) unsigned int verify_peer "$result = ($1 != 0) ? Qtrue : Qfalse;"; /* * Peer to be verified ? * * call-seq: * transport.verify_peer? -> Boolean * */ unsigned int verify_peer() { return wsman_transport_get_verify_peer((WsManClient *)$self); } %rename("verify_host=") set_verify_host(VALUE rvalue); /* * verify the host in SSL communication ? * * If passed +false+, +nil+, or 0: disable peer verification * else: enable peer verification * */ void set_verify_host( VALUE rvalue ) { unsigned int value; if ((rvalue == Qfalse) || (rvalue == Qnil)) { value = 0; } else if ((TYPE(rvalue) == T_FIXNUM) && (FIX2INT(rvalue) == 0)) { value = 0; } else { value = 1; } wsman_transport_set_verify_host((WsManClient *)$self, value); } %rename("verify_host?") verify_host(); %typemap(out) unsigned int verify_host "$result = ($1 != 0) ? Qtrue : Qfalse;"; /* * Host to be verified ? * * call-seq: * transport.verify_host? -> Boolean * */ unsigned int verify_host() { return wsman_transport_get_verify_host((WsManClient *)$self); } %rename("proxy=") set_proxy(const char *proxy); /* * Set http proxy URL * * Pass nil to disable proxy communication * * ====== Example * transport.proxy = "http://your.proxy.com:80" * */ void set_proxy(const char *proxy) { wsman_transport_set_proxy((WsManClient *)$self, proxy); } %newobject proxy; /* * Get http proxy URL * */ char *proxy() { return wsman_transport_get_proxy((WsManClient *)$self); } %rename("proxyauth=") set_proxyauth(const char *pauth); /* * Linux clients: HTTP proxy credentials * * Set the proxy username and password * * ====== Example * transport.proxyauth = "username:password" * */ void set_proxyauth(const char *pauth) { wsman_transport_set_proxyauth((WsManClient *)$self, pauth); } %newobject proxyauth; /* * Linux clients: HTTP proxy credentials * * Get the proxy username and password as "username:password" * * call-seq: * transport.proxyauth -> String * */ char *proxyauth(){ return wsman_transport_get_proxyauth((WsManClient *)$self); } %rename("cainfo=") set_cainfo(const char *cainfo); /* * Set the certification authority (CAINFO) * */ void set_cainfo(const char *cainfo) { wsman_transport_set_cainfo((WsManClient *)$self, cainfo); } %newobject cainfo; /* * Get the certification authority (CAINFO) * * call-seq: * transport.cainfo -> String * */ char *cainfo() { return wsman_transport_get_cainfo((WsManClient *)$self); } %rename("certhumbprint=") set_certhumbprint(const char *arg); /* * Set the certification thumbprint * */ void set_certhumbprint(const char *arg) { wsman_transport_set_certhumbprint((WsManClient *)$self, arg); } %newobject certhumbprint; /* * Set the certification thumbprint * * call-seq: * transport.certhumbprint -> String * */ char *certhumbprint() { return wsman_transport_get_certhumbprint((WsManClient *)$self); } %rename("capath=") set_capath(const char *capath); /* * Set the path to the certification authority (CAINFO) store * */ void set_capath(const char *capath) { wsman_transport_set_capath((WsManClient *)$self, capath); } %newobject capath; /* * Get the path to the certification authority (CAINFO) store * */ char *capath() { return wsman_transport_get_capath((WsManClient *)$self); } %rename("caoid=") set_caoid(const char *oid); /* * Windows client * * Set the CA OID * * ====== Reference * http://support.microsoft.com/kb/287547 * */ void set_caoid(const char *oid) { wsman_transport_set_caoid((WsManClient *)$self, oid); } %newobject caoid; /* * Windows client * * Get the CA OID * */ char *caoid() { return wsman_transport_get_caoid((WsManClient *)$self); } #ifdef _WIN32 %rename("calocal=") set_calocal(BOOL local); /* * Windows client * * Use local CA ? * */ void set_calocal(BOOL local) { wsman_transport_set_calocal((WsManClient *)$self, local); } /* * Windows client * * Use local CA ? * * call-seq: * transport.calocal -> Boolean * */ BOOL calocal() { return wsman_transport_get_calocal((WsManClient *)$self); } #endif %rename("cert=") set_cert(const char *cert); /* * Set the certificate * */ void set_cert(const char *cert) { wsman_transport_set_cert((WsManClient *)$self, cert); } %newobject cert; /* * Get the certificate * */ char *cert() { return wsman_transport_get_cert((WsManClient *)$self); } %rename("key=") set_key(const char *key); /* * Set the key * */ void set_key(const char *key) { wsman_transport_set_key((WsManClient *)$self, key); } %newobject key; /* * Get the key * */ char *key() { return wsman_transport_get_key((WsManClient *)$self); } }
Windows clients: HTTP proxy credentials
Set the username part of the http proxy credentials
void set_proxy_username(char *proxy_username) { wsman_transport_set_proxy_username((WsManClient *)$self, proxy_username ); } %rename("proxy_password") get_proxy_password(); %newobject get_proxy_password; /* * Windows clients: HTTP proxy credentials * * Get the password part of the http proxy credentials * * call-seq: * transport.proxy_password -> String * */ char *get_proxy_password() { return wsman_transport_get_proxy_password((WsManClient *)$self ); } %rename("proxy_password=") set_proxy_password(char *proxy_password); /* * Windows clients: HTTP proxy credentials * * Set the password part of the http proxy credentials * * call-seq: * transport.proxy_password = "proxy_password" * */ void set_proxy_password(char *proxy_password) { wsman_transport_set_proxy_password((WsManClient *)$self, proxy_password ); } %rename("auth_method=") set_auth_method( const char *am); /* * Set the authentication method * * Value must be one of: * * Openwsman::NO_AUTH_STR * * Openwsman::BASIC_AUTH_STR * * Openwsman::DIGEST_AUTH_STR * * Openwsman::PASS_AUTH_STR * * Openwsman::NTLM_AUTH_STR * * Openwsman::GSSNEGOTIATE_AUTH_STR * */ void set_auth_method(const char *am) { wsman_transport_set_auth_method((WsManClient *)$self, am); } %newobject auth_method; /* * Set the authentication method * * call-seq: * transport.auth_method -> String * */ char *auth_method() { return wsman_transport_get_auth_method ((WsManClient *)$self); } /* * Set the authentication method string corresponding to the given * auth method id * * Value must be one of: * * Openwsman::NO_AUTH * * Openwsman::BASIC_AUTH * * Openwsman::DIGEST_AUTH * * Openwsman::PASS_AUTH * * Openwsman::NTLM_AUTH * * Openwsman::GSSNEGOTIATE_AUTH * * call-seq: * transport.auth_name(Integer) -> String * */ static const char *auth_name(int auth) { return wsmc_transport_get_auth_name(auth); } /* * Get the authentication method integer id * */ int auth_value() { return wsmc_transport_get_auth_value((WsManClient *)$self); } /* * Get string corresponding to given error code * * call-seq: * transport.error_string(Integer) -> String * */ static char *error_string(int err) { return wsman_transport_get_last_error_string(err); } %rename("timeout=") set_timeout(unsigned long timeout); /* * Set the transport timeout in seconds * * ====== Note * This is the http layer timeout. Not to be confused with the * WS-Management operation timeout set via Openwsman::ClientOptions.timeout * */ void set_timeout(unsigned long timeout) { wsman_transport_set_timeout((WsManClient *)$self, timeout); } /* * Get the transport timeout in seconds * * call-seq: * transport.timeout -> Integer * */ unsigned long timeout() { return wsman_transport_get_timeout((WsManClient *)$self); } %rename("verify_peer=") set_verify_peer( VALUE rvalue ); /* * verify the peer in SSL communication ? * * If passed +false+, +nil+, or 0: disable peer verification * else: enable peer verification * */ void set_verify_peer( VALUE rvalue ) { unsigned int value; if ((rvalue == Qfalse) || (rvalue == Qnil)) { value = 0; } else if ((TYPE(rvalue) == T_FIXNUM) && (FIX2INT(rvalue) == 0)) { value = 0; } else { value = 1; } wsman_transport_set_verify_peer((WsManClient *)$self, value); } %rename("verify_peer?") verify_peer(); %typemap(out) unsigned int verify_peer "$result = ($1 != 0) ? Qtrue : Qfalse;"; /* * Peer to be verified ? * * call-seq: * transport.verify_peer? -> Boolean * */ unsigned int verify_peer() { return wsman_transport_get_verify_peer((WsManClient *)$self); } %rename("verify_host=") set_verify_host(VALUE rvalue); /* * verify the host in SSL communication ? * * If passed +false+, +nil+, or 0: disable peer verification * else: enable peer verification * */ void set_verify_host( VALUE rvalue ) { unsigned int value; if ((rvalue == Qfalse) || (rvalue == Qnil)) { value = 0; } else if ((TYPE(rvalue) == T_FIXNUM) && (FIX2INT(rvalue) == 0)) { value = 0; } else { value = 1; } wsman_transport_set_verify_host((WsManClient *)$self, value); } %rename("verify_host?") verify_host(); %typemap(out) unsigned int verify_host "$result = ($1 != 0) ? Qtrue : Qfalse;"; /* * Host to be verified ? * * call-seq: * transport.verify_host? -> Boolean * */ unsigned int verify_host() { return wsman_transport_get_verify_host((WsManClient *)$self); } %rename("proxy=") set_proxy(const char *proxy); /* * Set http proxy URL * * Pass nil to disable proxy communication * * ====== Example * transport.proxy = "http://your.proxy.com:80" * */ void set_proxy(const char *proxy) { wsman_transport_set_proxy((WsManClient *)$self, proxy); } %newobject proxy; /* * Get http proxy URL * */ char *proxy() { return wsman_transport_get_proxy((WsManClient *)$self); } %rename("proxyauth=") set_proxyauth(const char *pauth); /* * Linux clients: HTTP proxy credentials * * Set the proxy username and password * * ====== Example * transport.proxyauth = "username:password" * */ void set_proxyauth(const char *pauth) { wsman_transport_set_proxyauth((WsManClient *)$self, pauth); } %newobject proxyauth; /* * Linux clients: HTTP proxy credentials * * Get the proxy username and password as "username:password" * * call-seq: * transport.proxyauth -> String * */ char *proxyauth(){ return wsman_transport_get_proxyauth((WsManClient *)$self); } %rename("cainfo=") set_cainfo(const char *cainfo); /* * Set the certification authority (CAINFO) * */ void set_cainfo(const char *cainfo) { wsman_transport_set_cainfo((WsManClient *)$self, cainfo); } %newobject cainfo; /* * Get the certification authority (CAINFO) * * call-seq: * transport.cainfo -> String * */ char *cainfo() { return wsman_transport_get_cainfo((WsManClient *)$self); } %rename("certhumbprint=") set_certhumbprint(const char *arg); /* * Set the certification thumbprint * */ void set_certhumbprint(const char *arg) { wsman_transport_set_certhumbprint((WsManClient *)$self, arg); } %newobject certhumbprint; /* * Set the certification thumbprint * * call-seq: * transport.certhumbprint -> String * */ char *certhumbprint() { return wsman_transport_get_certhumbprint((WsManClient *)$self); } %rename("capath=") set_capath(const char *capath); /* * Set the path to the certification authority (CAINFO) store * */ void set_capath(const char *capath) { wsman_transport_set_capath((WsManClient *)$self, capath); } %newobject capath; /* * Get the path to the certification authority (CAINFO) store * */ char *capath() { return wsman_transport_get_capath((WsManClient *)$self); } %rename("caoid=") set_caoid(const char *oid); /* * Windows client * * Set the CA OID * * ====== Reference * http://support.microsoft.com/kb/287547 * */ void set_caoid(const char *oid) { wsman_transport_set_caoid((WsManClient *)$self, oid); } %newobject caoid; /* * Windows client * * Get the CA OID * */ char *caoid() { return wsman_transport_get_caoid((WsManClient *)$self); } #ifdef _WIN32 %rename("calocal=") set_calocal(BOOL local); /* * Windows client * * Use local CA ? * */ void set_calocal(BOOL local) { wsman_transport_set_calocal((WsManClient *)$self, local); } /* * Windows client * * Use local CA ? * * call-seq: * transport.calocal -> Boolean * */ BOOL calocal() { return wsman_transport_get_calocal((WsManClient *)$self); } #endif %rename("cert=") set_cert(const char *cert); /* * Set the certificate * */ void set_cert(const char *cert) { wsman_transport_set_cert((WsManClient *)$self, cert); } %newobject cert; /* * Get the certificate * */ char *cert() { return wsman_transport_get_cert((WsManClient *)$self); } %rename("key=") set_key(const char *key); /* * Set the key * */ void set_key(const char *key) { wsman_transport_set_key((WsManClient *)$self, key); } %newobject key; /* * Get the key * */ char *key() { return wsman_transport_get_key((WsManClient *)$self); } }
Linux clients: HTTP proxy credentials
Get the proxy username and password as “username:password”
char *proxyauth(){
Linux clients: HTTP proxy credentials
Set the proxy username and password
Example¶ ↑
transport.proxyauth = "username:password"
void set_proxyauth(const char *pauth) { wsman_transport_set_proxyauth((WsManClient *)$self, pauth); } %newobject proxyauth; /* * Linux clients: HTTP proxy credentials * * Get the proxy username and password as "username:password" * * call-seq: * transport.proxyauth -> String * */ char *proxyauth(){ return wsman_transport_get_proxyauth((WsManClient *)$self); } %rename("cainfo=") set_cainfo(const char *cainfo); /* * Set the certification authority (CAINFO) * */ void set_cainfo(const char *cainfo) { wsman_transport_set_cainfo((WsManClient *)$self, cainfo); } %newobject cainfo; /* * Get the certification authority (CAINFO) * * call-seq: * transport.cainfo -> String * */ char *cainfo() { return wsman_transport_get_cainfo((WsManClient *)$self); } %rename("certhumbprint=") set_certhumbprint(const char *arg); /* * Set the certification thumbprint * */ void set_certhumbprint(const char *arg) { wsman_transport_set_certhumbprint((WsManClient *)$self, arg); } %newobject certhumbprint; /* * Set the certification thumbprint * * call-seq: * transport.certhumbprint -> String * */ char *certhumbprint() { return wsman_transport_get_certhumbprint((WsManClient *)$self); } %rename("capath=") set_capath(const char *capath); /* * Set the path to the certification authority (CAINFO) store * */ void set_capath(const char *capath) { wsman_transport_set_capath((WsManClient *)$self, capath); } %newobject capath; /* * Get the path to the certification authority (CAINFO) store * */ char *capath() { return wsman_transport_get_capath((WsManClient *)$self); } %rename("caoid=") set_caoid(const char *oid); /* * Windows client * * Set the CA OID * * ====== Reference * http://support.microsoft.com/kb/287547 * */ void set_caoid(const char *oid) { wsman_transport_set_caoid((WsManClient *)$self, oid); } %newobject caoid; /* * Windows client * * Get the CA OID * */ char *caoid() { return wsman_transport_get_caoid((WsManClient *)$self); } #ifdef _WIN32 %rename("calocal=") set_calocal(BOOL local); /* * Windows client * * Use local CA ? * */ void set_calocal(BOOL local) { wsman_transport_set_calocal((WsManClient *)$self, local); } /* * Windows client * * Use local CA ? * * call-seq: * transport.calocal -> Boolean * */ BOOL calocal() { return wsman_transport_get_calocal((WsManClient *)$self); } #endif %rename("cert=") set_cert(const char *cert); /* * Set the certificate * */ void set_cert(const char *cert) { wsman_transport_set_cert((WsManClient *)$self, cert); } %newobject cert; /* * Get the certificate * */ char *cert() { return wsman_transport_get_cert((WsManClient *)$self); } %rename("key=") set_key(const char *key); /* * Set the key * */ void set_key(const char *key) { wsman_transport_set_key((WsManClient *)$self, key); } %newobject key; /* * Get the key * */ char *key() { return wsman_transport_get_key((WsManClient *)$self); } }
Get the transport timeout in seconds
unsigned long timeout() { return wsman_transport_get_timeout((WsManClient *)$self); } %rename("verify_peer=") set_verify_peer( VALUE rvalue ); /* * verify the peer in SSL communication ? * * If passed +false+, +nil+, or 0: disable peer verification * else: enable peer verification * */ void set_verify_peer( VALUE rvalue ) { unsigned int value; if ((rvalue == Qfalse) || (rvalue == Qnil)) { value = 0; } else if ((TYPE(rvalue) == T_FIXNUM) && (FIX2INT(rvalue) == 0)) { value = 0; } else { value = 1; } wsman_transport_set_verify_peer((WsManClient *)$self, value); } %rename("verify_peer?") verify_peer(); %typemap(out) unsigned int verify_peer "$result = ($1 != 0) ? Qtrue : Qfalse;"; /* * Peer to be verified ? * * call-seq: * transport.verify_peer? -> Boolean * */ unsigned int verify_peer() { return wsman_transport_get_verify_peer((WsManClient *)$self); } %rename("verify_host=") set_verify_host(VALUE rvalue); /* * verify the host in SSL communication ? * * If passed +false+, +nil+, or 0: disable peer verification * else: enable peer verification * */ void set_verify_host( VALUE rvalue ) { unsigned int value; if ((rvalue == Qfalse) || (rvalue == Qnil)) { value = 0; } else if ((TYPE(rvalue) == T_FIXNUM) && (FIX2INT(rvalue) == 0)) { value = 0; } else { value = 1; } wsman_transport_set_verify_host((WsManClient *)$self, value); } %rename("verify_host?") verify_host(); %typemap(out) unsigned int verify_host "$result = ($1 != 0) ? Qtrue : Qfalse;"; /* * Host to be verified ? * * call-seq: * transport.verify_host? -> Boolean * */ unsigned int verify_host() { return wsman_transport_get_verify_host((WsManClient *)$self); } %rename("proxy=") set_proxy(const char *proxy); /* * Set http proxy URL * * Pass nil to disable proxy communication * * ====== Example * transport.proxy = "http://your.proxy.com:80" * */ void set_proxy(const char *proxy) { wsman_transport_set_proxy((WsManClient *)$self, proxy); } %newobject proxy; /* * Get http proxy URL * */ char *proxy() { return wsman_transport_get_proxy((WsManClient *)$self); } %rename("proxyauth=") set_proxyauth(const char *pauth); /* * Linux clients: HTTP proxy credentials * * Set the proxy username and password * * ====== Example * transport.proxyauth = "username:password" * */ void set_proxyauth(const char *pauth) { wsman_transport_set_proxyauth((WsManClient *)$self, pauth); } %newobject proxyauth; /* * Linux clients: HTTP proxy credentials * * Get the proxy username and password as "username:password" * * call-seq: * transport.proxyauth -> String * */ char *proxyauth(){ return wsman_transport_get_proxyauth((WsManClient *)$self); } %rename("cainfo=") set_cainfo(const char *cainfo); /* * Set the certification authority (CAINFO) * */ void set_cainfo(const char *cainfo) { wsman_transport_set_cainfo((WsManClient *)$self, cainfo); } %newobject cainfo; /* * Get the certification authority (CAINFO) * * call-seq: * transport.cainfo -> String * */ char *cainfo() { return wsman_transport_get_cainfo((WsManClient *)$self); } %rename("certhumbprint=") set_certhumbprint(const char *arg); /* * Set the certification thumbprint * */ void set_certhumbprint(const char *arg) { wsman_transport_set_certhumbprint((WsManClient *)$self, arg); } %newobject certhumbprint; /* * Set the certification thumbprint * * call-seq: * transport.certhumbprint -> String * */ char *certhumbprint() { return wsman_transport_get_certhumbprint((WsManClient *)$self); } %rename("capath=") set_capath(const char *capath); /* * Set the path to the certification authority (CAINFO) store * */ void set_capath(const char *capath) { wsman_transport_set_capath((WsManClient *)$self, capath); } %newobject capath; /* * Get the path to the certification authority (CAINFO) store * */ char *capath() { return wsman_transport_get_capath((WsManClient *)$self); } %rename("caoid=") set_caoid(const char *oid); /* * Windows client * * Set the CA OID * * ====== Reference * http://support.microsoft.com/kb/287547 * */ void set_caoid(const char *oid) { wsman_transport_set_caoid((WsManClient *)$self, oid); } %newobject caoid; /* * Windows client * * Get the CA OID * */ char *caoid() { return wsman_transport_get_caoid((WsManClient *)$self); } #ifdef _WIN32 %rename("calocal=") set_calocal(BOOL local); /* * Windows client * * Use local CA ? * */ void set_calocal(BOOL local) { wsman_transport_set_calocal((WsManClient *)$self, local); } /* * Windows client * * Use local CA ? * * call-seq: * transport.calocal -> Boolean * */ BOOL calocal() { return wsman_transport_get_calocal((WsManClient *)$self); } #endif %rename("cert=") set_cert(const char *cert); /* * Set the certificate * */ void set_cert(const char *cert) { wsman_transport_set_cert((WsManClient *)$self, cert); } %newobject cert; /* * Get the certificate * */ char *cert() { return wsman_transport_get_cert((WsManClient *)$self); } %rename("key=") set_key(const char *key); /* * Set the key * */ void set_key(const char *key) { wsman_transport_set_key((WsManClient *)$self, key); } %newobject key; /* * Get the key * */ char *key() { return wsman_transport_get_key((WsManClient *)$self); } }
Set the transport timeout in seconds
Note¶ ↑
This is the http layer timeout. Not to be confused with the WS-Management operation timeout set via Openwsman::ClientOptions.timeout
void set_timeout(unsigned long timeout) { wsman_transport_set_timeout((WsManClient *)$self, timeout); } /* * Get the transport timeout in seconds * * call-seq: * transport.timeout -> Integer * */ unsigned long timeout() { return wsman_transport_get_timeout((WsManClient *)$self); } %rename("verify_peer=") set_verify_peer( VALUE rvalue ); /* * verify the peer in SSL communication ? * * If passed +false+, +nil+, or 0: disable peer verification * else: enable peer verification * */ void set_verify_peer( VALUE rvalue ) { unsigned int value; if ((rvalue == Qfalse) || (rvalue == Qnil)) { value = 0; } else if ((TYPE(rvalue) == T_FIXNUM) && (FIX2INT(rvalue) == 0)) { value = 0; } else { value = 1; } wsman_transport_set_verify_peer((WsManClient *)$self, value); } %rename("verify_peer?") verify_peer(); %typemap(out) unsigned int verify_peer "$result = ($1 != 0) ? Qtrue : Qfalse;"; /* * Peer to be verified ? * * call-seq: * transport.verify_peer? -> Boolean * */ unsigned int verify_peer() { return wsman_transport_get_verify_peer((WsManClient *)$self); } %rename("verify_host=") set_verify_host(VALUE rvalue); /* * verify the host in SSL communication ? * * If passed +false+, +nil+, or 0: disable peer verification * else: enable peer verification * */ void set_verify_host( VALUE rvalue ) { unsigned int value; if ((rvalue == Qfalse) || (rvalue == Qnil)) { value = 0; } else if ((TYPE(rvalue) == T_FIXNUM) && (FIX2INT(rvalue) == 0)) { value = 0; } else { value = 1; } wsman_transport_set_verify_host((WsManClient *)$self, value); } %rename("verify_host?") verify_host(); %typemap(out) unsigned int verify_host "$result = ($1 != 0) ? Qtrue : Qfalse;"; /* * Host to be verified ? * * call-seq: * transport.verify_host? -> Boolean * */ unsigned int verify_host() { return wsman_transport_get_verify_host((WsManClient *)$self); } %rename("proxy=") set_proxy(const char *proxy); /* * Set http proxy URL * * Pass nil to disable proxy communication * * ====== Example * transport.proxy = "http://your.proxy.com:80" * */ void set_proxy(const char *proxy) { wsman_transport_set_proxy((WsManClient *)$self, proxy); } %newobject proxy; /* * Get http proxy URL * */ char *proxy() { return wsman_transport_get_proxy((WsManClient *)$self); } %rename("proxyauth=") set_proxyauth(const char *pauth); /* * Linux clients: HTTP proxy credentials * * Set the proxy username and password * * ====== Example * transport.proxyauth = "username:password" * */ void set_proxyauth(const char *pauth) { wsman_transport_set_proxyauth((WsManClient *)$self, pauth); } %newobject proxyauth; /* * Linux clients: HTTP proxy credentials * * Get the proxy username and password as "username:password" * * call-seq: * transport.proxyauth -> String * */ char *proxyauth(){ return wsman_transport_get_proxyauth((WsManClient *)$self); } %rename("cainfo=") set_cainfo(const char *cainfo); /* * Set the certification authority (CAINFO) * */ void set_cainfo(const char *cainfo) { wsman_transport_set_cainfo((WsManClient *)$self, cainfo); } %newobject cainfo; /* * Get the certification authority (CAINFO) * * call-seq: * transport.cainfo -> String * */ char *cainfo() { return wsman_transport_get_cainfo((WsManClient *)$self); } %rename("certhumbprint=") set_certhumbprint(const char *arg); /* * Set the certification thumbprint * */ void set_certhumbprint(const char *arg) { wsman_transport_set_certhumbprint((WsManClient *)$self, arg); } %newobject certhumbprint; /* * Set the certification thumbprint * * call-seq: * transport.certhumbprint -> String * */ char *certhumbprint() { return wsman_transport_get_certhumbprint((WsManClient *)$self); } %rename("capath=") set_capath(const char *capath); /* * Set the path to the certification authority (CAINFO) store * */ void set_capath(const char *capath) { wsman_transport_set_capath((WsManClient *)$self, capath); } %newobject capath; /* * Get the path to the certification authority (CAINFO) store * */ char *capath() { return wsman_transport_get_capath((WsManClient *)$self); } %rename("caoid=") set_caoid(const char *oid); /* * Windows client * * Set the CA OID * * ====== Reference * http://support.microsoft.com/kb/287547 * */ void set_caoid(const char *oid) { wsman_transport_set_caoid((WsManClient *)$self, oid); } %newobject caoid; /* * Windows client * * Get the CA OID * */ char *caoid() { return wsman_transport_get_caoid((WsManClient *)$self); } #ifdef _WIN32 %rename("calocal=") set_calocal(BOOL local); /* * Windows client * * Use local CA ? * */ void set_calocal(BOOL local) { wsman_transport_set_calocal((WsManClient *)$self, local); } /* * Windows client * * Use local CA ? * * call-seq: * transport.calocal -> Boolean * */ BOOL calocal() { return wsman_transport_get_calocal((WsManClient *)$self); } #endif %rename("cert=") set_cert(const char *cert); /* * Set the certificate * */ void set_cert(const char *cert) { wsman_transport_set_cert((WsManClient *)$self, cert); } %newobject cert; /* * Get the certificate * */ char *cert() { return wsman_transport_get_cert((WsManClient *)$self); } %rename("key=") set_key(const char *key); /* * Set the key * */ void set_key(const char *key) { wsman_transport_set_key((WsManClient *)$self, key); } %newobject key; /* * Get the key * */ char *key() { return wsman_transport_get_key((WsManClient *)$self); } }
Server credentials
Get the username part of the http transport credentials
char *get_username() { return wsman_transport_get_userName((WsManClient *)$self); } %rename("username=") set_username(char *user_name); /* * Server credentials * * Set the username part of the http transport credentials * * call-seq: * transport.username = "Username" * */ void set_username(char *user_name) { wsman_transport_set_userName((WsManClient *)$self, user_name); } %rename("password") get_password(); %newobject get_password; /* * Server credentials * * Get the password part of the http transport credentials * * call-seq: * transport.password -> String * */ char *get_password() { return wsman_transport_get_password((WsManClient *)$self); } %rename("password=") set_password(char *password); /* * Server credentials * * Set the password part of the http transport credentials * * call-seq: * transport.password = "Password" * */ void set_password(char *password) { wsman_transport_set_password((WsManClient *)$self, password); } %rename("proxy_username") get_proxy_username(); %newobject get_proxy_username; /* * Windows clients: HTTP proxy credentials * * Get the username part of the http proxy credentials * * call-seq: * transport.proxy_username -> String * */ char *get_proxy_username() { return wsman_transport_get_proxy_username((WsManClient *)$self ); } %rename("proxy_username=") set_proxy_username(char *proxy_username); /* * Windows clients: HTTP proxy credentials * * Set the username part of the http proxy credentials * * call-seq: * transport.proxy_username = "proxy_username" * */ void set_proxy_username(char *proxy_username) { wsman_transport_set_proxy_username((WsManClient *)$self, proxy_username ); } %rename("proxy_password") get_proxy_password(); %newobject get_proxy_password; /* * Windows clients: HTTP proxy credentials * * Get the password part of the http proxy credentials * * call-seq: * transport.proxy_password -> String * */ char *get_proxy_password() { return wsman_transport_get_proxy_password((WsManClient *)$self ); } %rename("proxy_password=") set_proxy_password(char *proxy_password); /* * Windows clients: HTTP proxy credentials * * Set the password part of the http proxy credentials * * call-seq: * transport.proxy_password = "proxy_password" * */ void set_proxy_password(char *proxy_password) { wsman_transport_set_proxy_password((WsManClient *)$self, proxy_password ); } %rename("auth_method=") set_auth_method( const char *am); /* * Set the authentication method * * Value must be one of: * * Openwsman::NO_AUTH_STR * * Openwsman::BASIC_AUTH_STR * * Openwsman::DIGEST_AUTH_STR * * Openwsman::PASS_AUTH_STR * * Openwsman::NTLM_AUTH_STR * * Openwsman::GSSNEGOTIATE_AUTH_STR * */ void set_auth_method(const char *am) { wsman_transport_set_auth_method((WsManClient *)$self, am); } %newobject auth_method; /* * Set the authentication method * * call-seq: * transport.auth_method -> String * */ char *auth_method() { return wsman_transport_get_auth_method ((WsManClient *)$self); } /* * Set the authentication method string corresponding to the given * auth method id * * Value must be one of: * * Openwsman::NO_AUTH * * Openwsman::BASIC_AUTH * * Openwsman::DIGEST_AUTH * * Openwsman::PASS_AUTH * * Openwsman::NTLM_AUTH * * Openwsman::GSSNEGOTIATE_AUTH * * call-seq: * transport.auth_name(Integer) -> String * */ static const char *auth_name(int auth) { return wsmc_transport_get_auth_name(auth); } /* * Get the authentication method integer id * */ int auth_value() { return wsmc_transport_get_auth_value((WsManClient *)$self); } /* * Get string corresponding to given error code * * call-seq: * transport.error_string(Integer) -> String * */ static char *error_string(int err) { return wsman_transport_get_last_error_string(err); } %rename("timeout=") set_timeout(unsigned long timeout); /* * Set the transport timeout in seconds * * ====== Note * This is the http layer timeout. Not to be confused with the * WS-Management operation timeout set via Openwsman::ClientOptions.timeout * */ void set_timeout(unsigned long timeout) { wsman_transport_set_timeout((WsManClient *)$self, timeout); } /* * Get the transport timeout in seconds * * call-seq: * transport.timeout -> Integer * */ unsigned long timeout() { return wsman_transport_get_timeout((WsManClient *)$self); } %rename("verify_peer=") set_verify_peer( VALUE rvalue ); /* * verify the peer in SSL communication ? * * If passed +false+, +nil+, or 0: disable peer verification * else: enable peer verification * */ void set_verify_peer( VALUE rvalue ) { unsigned int value; if ((rvalue == Qfalse) || (rvalue == Qnil)) { value = 0; } else if ((TYPE(rvalue) == T_FIXNUM) && (FIX2INT(rvalue) == 0)) { value = 0; } else { value = 1; } wsman_transport_set_verify_peer((WsManClient *)$self, value); } %rename("verify_peer?") verify_peer(); %typemap(out) unsigned int verify_peer "$result = ($1 != 0) ? Qtrue : Qfalse;"; /* * Peer to be verified ? * * call-seq: * transport.verify_peer? -> Boolean * */ unsigned int verify_peer() { return wsman_transport_get_verify_peer((WsManClient *)$self); } %rename("verify_host=") set_verify_host(VALUE rvalue); /* * verify the host in SSL communication ? * * If passed +false+, +nil+, or 0: disable peer verification * else: enable peer verification * */ void set_verify_host( VALUE rvalue ) { unsigned int value; if ((rvalue == Qfalse) || (rvalue == Qnil)) { value = 0; } else if ((TYPE(rvalue) == T_FIXNUM) && (FIX2INT(rvalue) == 0)) { value = 0; } else { value = 1; } wsman_transport_set_verify_host((WsManClient *)$self, value); } %rename("verify_host?") verify_host(); %typemap(out) unsigned int verify_host "$result = ($1 != 0) ? Qtrue : Qfalse;"; /* * Host to be verified ? * * call-seq: * transport.verify_host? -> Boolean * */ unsigned int verify_host() { return wsman_transport_get_verify_host((WsManClient *)$self); } %rename("proxy=") set_proxy(const char *proxy); /* * Set http proxy URL * * Pass nil to disable proxy communication * * ====== Example * transport.proxy = "http://your.proxy.com:80" * */ void set_proxy(const char *proxy) { wsman_transport_set_proxy((WsManClient *)$self, proxy); } %newobject proxy; /* * Get http proxy URL * */ char *proxy() { return wsman_transport_get_proxy((WsManClient *)$self); } %rename("proxyauth=") set_proxyauth(const char *pauth); /* * Linux clients: HTTP proxy credentials * * Set the proxy username and password * * ====== Example * transport.proxyauth = "username:password" * */ void set_proxyauth(const char *pauth) { wsman_transport_set_proxyauth((WsManClient *)$self, pauth); } %newobject proxyauth; /* * Linux clients: HTTP proxy credentials * * Get the proxy username and password as "username:password" * * call-seq: * transport.proxyauth -> String * */ char *proxyauth(){ return wsman_transport_get_proxyauth((WsManClient *)$self); } %rename("cainfo=") set_cainfo(const char *cainfo); /* * Set the certification authority (CAINFO) * */ void set_cainfo(const char *cainfo) { wsman_transport_set_cainfo((WsManClient *)$self, cainfo); } %newobject cainfo; /* * Get the certification authority (CAINFO) * * call-seq: * transport.cainfo -> String * */ char *cainfo() { return wsman_transport_get_cainfo((WsManClient *)$self); } %rename("certhumbprint=") set_certhumbprint(const char *arg); /* * Set the certification thumbprint * */ void set_certhumbprint(const char *arg) { wsman_transport_set_certhumbprint((WsManClient *)$self, arg); } %newobject certhumbprint; /* * Set the certification thumbprint * * call-seq: * transport.certhumbprint -> String * */ char *certhumbprint() { return wsman_transport_get_certhumbprint((WsManClient *)$self); } %rename("capath=") set_capath(const char *capath); /* * Set the path to the certification authority (CAINFO) store * */ void set_capath(const char *capath) { wsman_transport_set_capath((WsManClient *)$self, capath); } %newobject capath; /* * Get the path to the certification authority (CAINFO) store * */ char *capath() { return wsman_transport_get_capath((WsManClient *)$self); } %rename("caoid=") set_caoid(const char *oid); /* * Windows client * * Set the CA OID * * ====== Reference * http://support.microsoft.com/kb/287547 * */ void set_caoid(const char *oid) { wsman_transport_set_caoid((WsManClient *)$self, oid); } %newobject caoid; /* * Windows client * * Get the CA OID * */ char *caoid() { return wsman_transport_get_caoid((WsManClient *)$self); } #ifdef _WIN32 %rename("calocal=") set_calocal(BOOL local); /* * Windows client * * Use local CA ? * */ void set_calocal(BOOL local) { wsman_transport_set_calocal((WsManClient *)$self, local); } /* * Windows client * * Use local CA ? * * call-seq: * transport.calocal -> Boolean * */ BOOL calocal() { return wsman_transport_get_calocal((WsManClient *)$self); } #endif %rename("cert=") set_cert(const char *cert); /* * Set the certificate * */ void set_cert(const char *cert) { wsman_transport_set_cert((WsManClient *)$self, cert); } %newobject cert; /* * Get the certificate * */ char *cert() { return wsman_transport_get_cert((WsManClient *)$self); } %rename("key=") set_key(const char *key); /* * Set the key * */ void set_key(const char *key) { wsman_transport_set_key((WsManClient *)$self, key); } %newobject key; /* * Get the key * */ char *key() { return wsman_transport_get_key((WsManClient *)$self); } }
Server credentials
Set the username part of the http transport credentials
void set_username(char *user_name) { wsman_transport_set_userName((WsManClient *)$self, user_name); } %rename("password") get_password(); %newobject get_password; /* * Server credentials * * Get the password part of the http transport credentials * * call-seq: * transport.password -> String * */ char *get_password() { return wsman_transport_get_password((WsManClient *)$self); } %rename("password=") set_password(char *password); /* * Server credentials * * Set the password part of the http transport credentials * * call-seq: * transport.password = "Password" * */ void set_password(char *password) { wsman_transport_set_password((WsManClient *)$self, password); } %rename("proxy_username") get_proxy_username(); %newobject get_proxy_username; /* * Windows clients: HTTP proxy credentials * * Get the username part of the http proxy credentials * * call-seq: * transport.proxy_username -> String * */ char *get_proxy_username() { return wsman_transport_get_proxy_username((WsManClient *)$self ); } %rename("proxy_username=") set_proxy_username(char *proxy_username); /* * Windows clients: HTTP proxy credentials * * Set the username part of the http proxy credentials * * call-seq: * transport.proxy_username = "proxy_username" * */ void set_proxy_username(char *proxy_username) { wsman_transport_set_proxy_username((WsManClient *)$self, proxy_username ); } %rename("proxy_password") get_proxy_password(); %newobject get_proxy_password; /* * Windows clients: HTTP proxy credentials * * Get the password part of the http proxy credentials * * call-seq: * transport.proxy_password -> String * */ char *get_proxy_password() { return wsman_transport_get_proxy_password((WsManClient *)$self ); } %rename("proxy_password=") set_proxy_password(char *proxy_password); /* * Windows clients: HTTP proxy credentials * * Set the password part of the http proxy credentials * * call-seq: * transport.proxy_password = "proxy_password" * */ void set_proxy_password(char *proxy_password) { wsman_transport_set_proxy_password((WsManClient *)$self, proxy_password ); } %rename("auth_method=") set_auth_method( const char *am); /* * Set the authentication method * * Value must be one of: * * Openwsman::NO_AUTH_STR * * Openwsman::BASIC_AUTH_STR * * Openwsman::DIGEST_AUTH_STR * * Openwsman::PASS_AUTH_STR * * Openwsman::NTLM_AUTH_STR * * Openwsman::GSSNEGOTIATE_AUTH_STR * */ void set_auth_method(const char *am) { wsman_transport_set_auth_method((WsManClient *)$self, am); } %newobject auth_method; /* * Set the authentication method * * call-seq: * transport.auth_method -> String * */ char *auth_method() { return wsman_transport_get_auth_method ((WsManClient *)$self); } /* * Set the authentication method string corresponding to the given * auth method id * * Value must be one of: * * Openwsman::NO_AUTH * * Openwsman::BASIC_AUTH * * Openwsman::DIGEST_AUTH * * Openwsman::PASS_AUTH * * Openwsman::NTLM_AUTH * * Openwsman::GSSNEGOTIATE_AUTH * * call-seq: * transport.auth_name(Integer) -> String * */ static const char *auth_name(int auth) { return wsmc_transport_get_auth_name(auth); } /* * Get the authentication method integer id * */ int auth_value() { return wsmc_transport_get_auth_value((WsManClient *)$self); } /* * Get string corresponding to given error code * * call-seq: * transport.error_string(Integer) -> String * */ static char *error_string(int err) { return wsman_transport_get_last_error_string(err); } %rename("timeout=") set_timeout(unsigned long timeout); /* * Set the transport timeout in seconds * * ====== Note * This is the http layer timeout. Not to be confused with the * WS-Management operation timeout set via Openwsman::ClientOptions.timeout * */ void set_timeout(unsigned long timeout) { wsman_transport_set_timeout((WsManClient *)$self, timeout); } /* * Get the transport timeout in seconds * * call-seq: * transport.timeout -> Integer * */ unsigned long timeout() { return wsman_transport_get_timeout((WsManClient *)$self); } %rename("verify_peer=") set_verify_peer( VALUE rvalue ); /* * verify the peer in SSL communication ? * * If passed +false+, +nil+, or 0: disable peer verification * else: enable peer verification * */ void set_verify_peer( VALUE rvalue ) { unsigned int value; if ((rvalue == Qfalse) || (rvalue == Qnil)) { value = 0; } else if ((TYPE(rvalue) == T_FIXNUM) && (FIX2INT(rvalue) == 0)) { value = 0; } else { value = 1; } wsman_transport_set_verify_peer((WsManClient *)$self, value); } %rename("verify_peer?") verify_peer(); %typemap(out) unsigned int verify_peer "$result = ($1 != 0) ? Qtrue : Qfalse;"; /* * Peer to be verified ? * * call-seq: * transport.verify_peer? -> Boolean * */ unsigned int verify_peer() { return wsman_transport_get_verify_peer((WsManClient *)$self); } %rename("verify_host=") set_verify_host(VALUE rvalue); /* * verify the host in SSL communication ? * * If passed +false+, +nil+, or 0: disable peer verification * else: enable peer verification * */ void set_verify_host( VALUE rvalue ) { unsigned int value; if ((rvalue == Qfalse) || (rvalue == Qnil)) { value = 0; } else if ((TYPE(rvalue) == T_FIXNUM) && (FIX2INT(rvalue) == 0)) { value = 0; } else { value = 1; } wsman_transport_set_verify_host((WsManClient *)$self, value); } %rename("verify_host?") verify_host(); %typemap(out) unsigned int verify_host "$result = ($1 != 0) ? Qtrue : Qfalse;"; /* * Host to be verified ? * * call-seq: * transport.verify_host? -> Boolean * */ unsigned int verify_host() { return wsman_transport_get_verify_host((WsManClient *)$self); } %rename("proxy=") set_proxy(const char *proxy); /* * Set http proxy URL * * Pass nil to disable proxy communication * * ====== Example * transport.proxy = "http://your.proxy.com:80" * */ void set_proxy(const char *proxy) { wsman_transport_set_proxy((WsManClient *)$self, proxy); } %newobject proxy; /* * Get http proxy URL * */ char *proxy() { return wsman_transport_get_proxy((WsManClient *)$self); } %rename("proxyauth=") set_proxyauth(const char *pauth); /* * Linux clients: HTTP proxy credentials * * Set the proxy username and password * * ====== Example * transport.proxyauth = "username:password" * */ void set_proxyauth(const char *pauth) { wsman_transport_set_proxyauth((WsManClient *)$self, pauth); } %newobject proxyauth; /* * Linux clients: HTTP proxy credentials * * Get the proxy username and password as "username:password" * * call-seq: * transport.proxyauth -> String * */ char *proxyauth(){ return wsman_transport_get_proxyauth((WsManClient *)$self); } %rename("cainfo=") set_cainfo(const char *cainfo); /* * Set the certification authority (CAINFO) * */ void set_cainfo(const char *cainfo) { wsman_transport_set_cainfo((WsManClient *)$self, cainfo); } %newobject cainfo; /* * Get the certification authority (CAINFO) * * call-seq: * transport.cainfo -> String * */ char *cainfo() { return wsman_transport_get_cainfo((WsManClient *)$self); } %rename("certhumbprint=") set_certhumbprint(const char *arg); /* * Set the certification thumbprint * */ void set_certhumbprint(const char *arg) { wsman_transport_set_certhumbprint((WsManClient *)$self, arg); } %newobject certhumbprint; /* * Set the certification thumbprint * * call-seq: * transport.certhumbprint -> String * */ char *certhumbprint() { return wsman_transport_get_certhumbprint((WsManClient *)$self); } %rename("capath=") set_capath(const char *capath); /* * Set the path to the certification authority (CAINFO) store * */ void set_capath(const char *capath) { wsman_transport_set_capath((WsManClient *)$self, capath); } %newobject capath; /* * Get the path to the certification authority (CAINFO) store * */ char *capath() { return wsman_transport_get_capath((WsManClient *)$self); } %rename("caoid=") set_caoid(const char *oid); /* * Windows client * * Set the CA OID * * ====== Reference * http://support.microsoft.com/kb/287547 * */ void set_caoid(const char *oid) { wsman_transport_set_caoid((WsManClient *)$self, oid); } %newobject caoid; /* * Windows client * * Get the CA OID * */ char *caoid() { return wsman_transport_get_caoid((WsManClient *)$self); } #ifdef _WIN32 %rename("calocal=") set_calocal(BOOL local); /* * Windows client * * Use local CA ? * */ void set_calocal(BOOL local) { wsman_transport_set_calocal((WsManClient *)$self, local); } /* * Windows client * * Use local CA ? * * call-seq: * transport.calocal -> Boolean * */ BOOL calocal() { return wsman_transport_get_calocal((WsManClient *)$self); } #endif %rename("cert=") set_cert(const char *cert); /* * Set the certificate * */ void set_cert(const char *cert) { wsman_transport_set_cert((WsManClient *)$self, cert); } %newobject cert; /* * Get the certificate * */ char *cert() { return wsman_transport_get_cert((WsManClient *)$self); } %rename("key=") set_key(const char *key); /* * Set the key * */ void set_key(const char *key) { wsman_transport_set_key((WsManClient *)$self, key); } %newobject key; /* * Get the key * */ char *key() { return wsman_transport_get_key((WsManClient *)$self); } }
Host to be verified ?
unsigned int verify_host() { return wsman_transport_get_verify_host((WsManClient *)$self); } %rename("proxy=") set_proxy(const char *proxy); /* * Set http proxy URL * * Pass nil to disable proxy communication * * ====== Example * transport.proxy = "http://your.proxy.com:80" * */ void set_proxy(const char *proxy) { wsman_transport_set_proxy((WsManClient *)$self, proxy); } %newobject proxy; /* * Get http proxy URL * */ char *proxy() { return wsman_transport_get_proxy((WsManClient *)$self); } %rename("proxyauth=") set_proxyauth(const char *pauth); /* * Linux clients: HTTP proxy credentials * * Set the proxy username and password * * ====== Example * transport.proxyauth = "username:password" * */ void set_proxyauth(const char *pauth) { wsman_transport_set_proxyauth((WsManClient *)$self, pauth); } %newobject proxyauth; /* * Linux clients: HTTP proxy credentials * * Get the proxy username and password as "username:password" * * call-seq: * transport.proxyauth -> String * */ char *proxyauth(){ return wsman_transport_get_proxyauth((WsManClient *)$self); } %rename("cainfo=") set_cainfo(const char *cainfo); /* * Set the certification authority (CAINFO) * */ void set_cainfo(const char *cainfo) { wsman_transport_set_cainfo((WsManClient *)$self, cainfo); } %newobject cainfo; /* * Get the certification authority (CAINFO) * * call-seq: * transport.cainfo -> String * */ char *cainfo() { return wsman_transport_get_cainfo((WsManClient *)$self); } %rename("certhumbprint=") set_certhumbprint(const char *arg); /* * Set the certification thumbprint * */ void set_certhumbprint(const char *arg) { wsman_transport_set_certhumbprint((WsManClient *)$self, arg); } %newobject certhumbprint; /* * Set the certification thumbprint * * call-seq: * transport.certhumbprint -> String * */ char *certhumbprint() { return wsman_transport_get_certhumbprint((WsManClient *)$self); } %rename("capath=") set_capath(const char *capath); /* * Set the path to the certification authority (CAINFO) store * */ void set_capath(const char *capath) { wsman_transport_set_capath((WsManClient *)$self, capath); } %newobject capath; /* * Get the path to the certification authority (CAINFO) store * */ char *capath() { return wsman_transport_get_capath((WsManClient *)$self); } %rename("caoid=") set_caoid(const char *oid); /* * Windows client * * Set the CA OID * * ====== Reference * http://support.microsoft.com/kb/287547 * */ void set_caoid(const char *oid) { wsman_transport_set_caoid((WsManClient *)$self, oid); } %newobject caoid; /* * Windows client * * Get the CA OID * */ char *caoid() { return wsman_transport_get_caoid((WsManClient *)$self); } #ifdef _WIN32 %rename("calocal=") set_calocal(BOOL local); /* * Windows client * * Use local CA ? * */ void set_calocal(BOOL local) { wsman_transport_set_calocal((WsManClient *)$self, local); } /* * Windows client * * Use local CA ? * * call-seq: * transport.calocal -> Boolean * */ BOOL calocal() { return wsman_transport_get_calocal((WsManClient *)$self); } #endif %rename("cert=") set_cert(const char *cert); /* * Set the certificate * */ void set_cert(const char *cert) { wsman_transport_set_cert((WsManClient *)$self, cert); } %newobject cert; /* * Get the certificate * */ char *cert() { return wsman_transport_get_cert((WsManClient *)$self); } %rename("key=") set_key(const char *key); /* * Set the key * */ void set_key(const char *key) { wsman_transport_set_key((WsManClient *)$self, key); } %newobject key; /* * Get the key * */ char *key() { return wsman_transport_get_key((WsManClient *)$self); } }
verify the host in SSL communication ?
If passed false
, nil
, or 0: disable peer verification else: enable peer verification
void set_verify_host( VALUE rvalue ) { unsigned int value; if ((rvalue == Qfalse) || (rvalue == Qnil)) { value = 0; } else if ((TYPE(rvalue) == T_FIXNUM) && (FIX2INT(rvalue) == 0)) { value = 0; } else { value = 1; } wsman_transport_set_verify_host((WsManClient *)$self, value); } %rename("verify_host?") verify_host(); %typemap(out) unsigned int verify_host "$result = ($1 != 0) ? Qtrue : Qfalse;"; /* * Host to be verified ? * * call-seq: * transport.verify_host? -> Boolean * */ unsigned int verify_host() { return wsman_transport_get_verify_host((WsManClient *)$self); } %rename("proxy=") set_proxy(const char *proxy); /* * Set http proxy URL * * Pass nil to disable proxy communication * * ====== Example * transport.proxy = "http://your.proxy.com:80" * */ void set_proxy(const char *proxy) { wsman_transport_set_proxy((WsManClient *)$self, proxy); } %newobject proxy; /* * Get http proxy URL * */ char *proxy() { return wsman_transport_get_proxy((WsManClient *)$self); } %rename("proxyauth=") set_proxyauth(const char *pauth); /* * Linux clients: HTTP proxy credentials * * Set the proxy username and password * * ====== Example * transport.proxyauth = "username:password" * */ void set_proxyauth(const char *pauth) { wsman_transport_set_proxyauth((WsManClient *)$self, pauth); } %newobject proxyauth; /* * Linux clients: HTTP proxy credentials * * Get the proxy username and password as "username:password" * * call-seq: * transport.proxyauth -> String * */ char *proxyauth(){ return wsman_transport_get_proxyauth((WsManClient *)$self); } %rename("cainfo=") set_cainfo(const char *cainfo); /* * Set the certification authority (CAINFO) * */ void set_cainfo(const char *cainfo) { wsman_transport_set_cainfo((WsManClient *)$self, cainfo); } %newobject cainfo; /* * Get the certification authority (CAINFO) * * call-seq: * transport.cainfo -> String * */ char *cainfo() { return wsman_transport_get_cainfo((WsManClient *)$self); } %rename("certhumbprint=") set_certhumbprint(const char *arg); /* * Set the certification thumbprint * */ void set_certhumbprint(const char *arg) { wsman_transport_set_certhumbprint((WsManClient *)$self, arg); } %newobject certhumbprint; /* * Set the certification thumbprint * * call-seq: * transport.certhumbprint -> String * */ char *certhumbprint() { return wsman_transport_get_certhumbprint((WsManClient *)$self); } %rename("capath=") set_capath(const char *capath); /* * Set the path to the certification authority (CAINFO) store * */ void set_capath(const char *capath) { wsman_transport_set_capath((WsManClient *)$self, capath); } %newobject capath; /* * Get the path to the certification authority (CAINFO) store * */ char *capath() { return wsman_transport_get_capath((WsManClient *)$self); } %rename("caoid=") set_caoid(const char *oid); /* * Windows client * * Set the CA OID * * ====== Reference * http://support.microsoft.com/kb/287547 * */ void set_caoid(const char *oid) { wsman_transport_set_caoid((WsManClient *)$self, oid); } %newobject caoid; /* * Windows client * * Get the CA OID * */ char *caoid() { return wsman_transport_get_caoid((WsManClient *)$self); } #ifdef _WIN32 %rename("calocal=") set_calocal(BOOL local); /* * Windows client * * Use local CA ? * */ void set_calocal(BOOL local) { wsman_transport_set_calocal((WsManClient *)$self, local); } /* * Windows client * * Use local CA ? * * call-seq: * transport.calocal -> Boolean * */ BOOL calocal() { return wsman_transport_get_calocal((WsManClient *)$self); } #endif %rename("cert=") set_cert(const char *cert); /* * Set the certificate * */ void set_cert(const char *cert) { wsman_transport_set_cert((WsManClient *)$self, cert); } %newobject cert; /* * Get the certificate * */ char *cert() { return wsman_transport_get_cert((WsManClient *)$self); } %rename("key=") set_key(const char *key); /* * Set the key * */ void set_key(const char *key) { wsman_transport_set_key((WsManClient *)$self, key); } %newobject key; /* * Get the key * */ char *key() { return wsman_transport_get_key((WsManClient *)$self); } }
Peer to be verified ?
unsigned int verify_peer() { return wsman_transport_get_verify_peer((WsManClient *)$self); } %rename("verify_host=") set_verify_host(VALUE rvalue); /* * verify the host in SSL communication ? * * If passed +false+, +nil+, or 0: disable peer verification * else: enable peer verification * */ void set_verify_host( VALUE rvalue ) { unsigned int value; if ((rvalue == Qfalse) || (rvalue == Qnil)) { value = 0; } else if ((TYPE(rvalue) == T_FIXNUM) && (FIX2INT(rvalue) == 0)) { value = 0; } else { value = 1; } wsman_transport_set_verify_host((WsManClient *)$self, value); } %rename("verify_host?") verify_host(); %typemap(out) unsigned int verify_host "$result = ($1 != 0) ? Qtrue : Qfalse;"; /* * Host to be verified ? * * call-seq: * transport.verify_host? -> Boolean * */ unsigned int verify_host() { return wsman_transport_get_verify_host((WsManClient *)$self); } %rename("proxy=") set_proxy(const char *proxy); /* * Set http proxy URL * * Pass nil to disable proxy communication * * ====== Example * transport.proxy = "http://your.proxy.com:80" * */ void set_proxy(const char *proxy) { wsman_transport_set_proxy((WsManClient *)$self, proxy); } %newobject proxy; /* * Get http proxy URL * */ char *proxy() { return wsman_transport_get_proxy((WsManClient *)$self); } %rename("proxyauth=") set_proxyauth(const char *pauth); /* * Linux clients: HTTP proxy credentials * * Set the proxy username and password * * ====== Example * transport.proxyauth = "username:password" * */ void set_proxyauth(const char *pauth) { wsman_transport_set_proxyauth((WsManClient *)$self, pauth); } %newobject proxyauth; /* * Linux clients: HTTP proxy credentials * * Get the proxy username and password as "username:password" * * call-seq: * transport.proxyauth -> String * */ char *proxyauth(){ return wsman_transport_get_proxyauth((WsManClient *)$self); } %rename("cainfo=") set_cainfo(const char *cainfo); /* * Set the certification authority (CAINFO) * */ void set_cainfo(const char *cainfo) { wsman_transport_set_cainfo((WsManClient *)$self, cainfo); } %newobject cainfo; /* * Get the certification authority (CAINFO) * * call-seq: * transport.cainfo -> String * */ char *cainfo() { return wsman_transport_get_cainfo((WsManClient *)$self); } %rename("certhumbprint=") set_certhumbprint(const char *arg); /* * Set the certification thumbprint * */ void set_certhumbprint(const char *arg) { wsman_transport_set_certhumbprint((WsManClient *)$self, arg); } %newobject certhumbprint; /* * Set the certification thumbprint * * call-seq: * transport.certhumbprint -> String * */ char *certhumbprint() { return wsman_transport_get_certhumbprint((WsManClient *)$self); } %rename("capath=") set_capath(const char *capath); /* * Set the path to the certification authority (CAINFO) store * */ void set_capath(const char *capath) { wsman_transport_set_capath((WsManClient *)$self, capath); } %newobject capath; /* * Get the path to the certification authority (CAINFO) store * */ char *capath() { return wsman_transport_get_capath((WsManClient *)$self); } %rename("caoid=") set_caoid(const char *oid); /* * Windows client * * Set the CA OID * * ====== Reference * http://support.microsoft.com/kb/287547 * */ void set_caoid(const char *oid) { wsman_transport_set_caoid((WsManClient *)$self, oid); } %newobject caoid; /* * Windows client * * Get the CA OID * */ char *caoid() { return wsman_transport_get_caoid((WsManClient *)$self); } #ifdef _WIN32 %rename("calocal=") set_calocal(BOOL local); /* * Windows client * * Use local CA ? * */ void set_calocal(BOOL local) { wsman_transport_set_calocal((WsManClient *)$self, local); } /* * Windows client * * Use local CA ? * * call-seq: * transport.calocal -> Boolean * */ BOOL calocal() { return wsman_transport_get_calocal((WsManClient *)$self); } #endif %rename("cert=") set_cert(const char *cert); /* * Set the certificate * */ void set_cert(const char *cert) { wsman_transport_set_cert((WsManClient *)$self, cert); } %newobject cert; /* * Get the certificate * */ char *cert() { return wsman_transport_get_cert((WsManClient *)$self); } %rename("key=") set_key(const char *key); /* * Set the key * */ void set_key(const char *key) { wsman_transport_set_key((WsManClient *)$self, key); } %newobject key; /* * Get the key * */ char *key() { return wsman_transport_get_key((WsManClient *)$self); } }
verify the peer in SSL communication ?
If passed false
, nil
, or 0: disable peer verification else: enable peer verification
void set_verify_peer( VALUE rvalue ) { unsigned int value; if ((rvalue == Qfalse) || (rvalue == Qnil)) { value = 0; } else if ((TYPE(rvalue) == T_FIXNUM) && (FIX2INT(rvalue) == 0)) { value = 0; } else { value = 1; } wsman_transport_set_verify_peer((WsManClient *)$self, value); } %rename("verify_peer?") verify_peer(); %typemap(out) unsigned int verify_peer "$result = ($1 != 0) ? Qtrue : Qfalse;"; /* * Peer to be verified ? * * call-seq: * transport.verify_peer? -> Boolean * */ unsigned int verify_peer() { return wsman_transport_get_verify_peer((WsManClient *)$self); } %rename("verify_host=") set_verify_host(VALUE rvalue); /* * verify the host in SSL communication ? * * If passed +false+, +nil+, or 0: disable peer verification * else: enable peer verification * */ void set_verify_host( VALUE rvalue ) { unsigned int value; if ((rvalue == Qfalse) || (rvalue == Qnil)) { value = 0; } else if ((TYPE(rvalue) == T_FIXNUM) && (FIX2INT(rvalue) == 0)) { value = 0; } else { value = 1; } wsman_transport_set_verify_host((WsManClient *)$self, value); } %rename("verify_host?") verify_host(); %typemap(out) unsigned int verify_host "$result = ($1 != 0) ? Qtrue : Qfalse;"; /* * Host to be verified ? * * call-seq: * transport.verify_host? -> Boolean * */ unsigned int verify_host() { return wsman_transport_get_verify_host((WsManClient *)$self); } %rename("proxy=") set_proxy(const char *proxy); /* * Set http proxy URL * * Pass nil to disable proxy communication * * ====== Example * transport.proxy = "http://your.proxy.com:80" * */ void set_proxy(const char *proxy) { wsman_transport_set_proxy((WsManClient *)$self, proxy); } %newobject proxy; /* * Get http proxy URL * */ char *proxy() { return wsman_transport_get_proxy((WsManClient *)$self); } %rename("proxyauth=") set_proxyauth(const char *pauth); /* * Linux clients: HTTP proxy credentials * * Set the proxy username and password * * ====== Example * transport.proxyauth = "username:password" * */ void set_proxyauth(const char *pauth) { wsman_transport_set_proxyauth((WsManClient *)$self, pauth); } %newobject proxyauth; /* * Linux clients: HTTP proxy credentials * * Get the proxy username and password as "username:password" * * call-seq: * transport.proxyauth -> String * */ char *proxyauth(){ return wsman_transport_get_proxyauth((WsManClient *)$self); } %rename("cainfo=") set_cainfo(const char *cainfo); /* * Set the certification authority (CAINFO) * */ void set_cainfo(const char *cainfo) { wsman_transport_set_cainfo((WsManClient *)$self, cainfo); } %newobject cainfo; /* * Get the certification authority (CAINFO) * * call-seq: * transport.cainfo -> String * */ char *cainfo() { return wsman_transport_get_cainfo((WsManClient *)$self); } %rename("certhumbprint=") set_certhumbprint(const char *arg); /* * Set the certification thumbprint * */ void set_certhumbprint(const char *arg) { wsman_transport_set_certhumbprint((WsManClient *)$self, arg); } %newobject certhumbprint; /* * Set the certification thumbprint * * call-seq: * transport.certhumbprint -> String * */ char *certhumbprint() { return wsman_transport_get_certhumbprint((WsManClient *)$self); } %rename("capath=") set_capath(const char *capath); /* * Set the path to the certification authority (CAINFO) store * */ void set_capath(const char *capath) { wsman_transport_set_capath((WsManClient *)$self, capath); } %newobject capath; /* * Get the path to the certification authority (CAINFO) store * */ char *capath() { return wsman_transport_get_capath((WsManClient *)$self); } %rename("caoid=") set_caoid(const char *oid); /* * Windows client * * Set the CA OID * * ====== Reference * http://support.microsoft.com/kb/287547 * */ void set_caoid(const char *oid) { wsman_transport_set_caoid((WsManClient *)$self, oid); } %newobject caoid; /* * Windows client * * Get the CA OID * */ char *caoid() { return wsman_transport_get_caoid((WsManClient *)$self); } #ifdef _WIN32 %rename("calocal=") set_calocal(BOOL local); /* * Windows client * * Use local CA ? * */ void set_calocal(BOOL local) { wsman_transport_set_calocal((WsManClient *)$self, local); } /* * Windows client * * Use local CA ? * * call-seq: * transport.calocal -> Boolean * */ BOOL calocal() { return wsman_transport_get_calocal((WsManClient *)$self); } #endif %rename("cert=") set_cert(const char *cert); /* * Set the certificate * */ void set_cert(const char *cert) { wsman_transport_set_cert((WsManClient *)$self, cert); } %newobject cert; /* * Get the certificate * */ char *cert() { return wsman_transport_get_cert((WsManClient *)$self); } %rename("key=") set_key(const char *key); /* * Set the key * */ void set_key(const char *key) { wsman_transport_set_key((WsManClient *)$self, key); } %newobject key; /* * Get the key * */ char *key() { return wsman_transport_get_key((WsManClient *)$self); } }