openwsman 2.4.12.1 → 2.4.13
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/ext/openwsman/version.i +2 -2
- data/ext/openwsman/wsman-client.i +5 -0
- data/ext/openwsman/wsman-client_opt.i +16 -15
- data/lib/openwsman/openwsman.rb +8 -0
- data/lib/openwsman/version.rb +1 -1
- metadata +3 -3
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: ea8b2bb54370996fa17e721f0b4d4799ee1eec92
|
4
|
+
data.tar.gz: 4d5d2bf42941d72417e4d26bb025597c3abf68ba
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 2999379c6b54aebf1e11c60ca4fd86a8d9ce0dbb3c0e9cf6092eebe22d7441dcfd80c97674e681ad102b4407ff4c40bd184caa5f6177119c1ce377015212d6bc
|
7
|
+
data.tar.gz: b49df1870d997d399a38f2c83bef72aedbed0de260ac3e5fdf8415c9ccaf16c24ca17f1a3cd69ff9337055ddefc979c0c5e9c93ee65843418c26b37ab9cc58ab
|
data/ext/openwsman/version.i
CHANGED
@@ -92,6 +92,7 @@ typedef struct _WsManClient {
|
|
92
92
|
return wsmc_get_response_code( $self );
|
93
93
|
}
|
94
94
|
|
95
|
+
%newobject scheme;
|
95
96
|
/*
|
96
97
|
* String representation of the transport scheme
|
97
98
|
*
|
@@ -103,6 +104,7 @@ typedef struct _WsManClient {
|
|
103
104
|
return wsmc_get_scheme( $self );
|
104
105
|
}
|
105
106
|
|
107
|
+
%newobject host;
|
106
108
|
/*
|
107
109
|
* The host part of the client URL
|
108
110
|
*
|
@@ -119,6 +121,7 @@ typedef struct _WsManClient {
|
|
119
121
|
return wsmc_get_port( $self );
|
120
122
|
}
|
121
123
|
|
124
|
+
%newobject path;
|
122
125
|
/*
|
123
126
|
* The path of the clien URL
|
124
127
|
*
|
@@ -127,6 +130,7 @@ typedef struct _WsManClient {
|
|
127
130
|
return wsmc_get_path( $self );
|
128
131
|
}
|
129
132
|
|
133
|
+
%newobject user;
|
130
134
|
/*
|
131
135
|
* The user name used for authentication
|
132
136
|
*
|
@@ -135,6 +139,7 @@ typedef struct _WsManClient {
|
|
135
139
|
return wsmc_get_user( $self );
|
136
140
|
}
|
137
141
|
|
142
|
+
%newobject password;
|
138
143
|
/*
|
139
144
|
* The password used for authentication
|
140
145
|
*
|
@@ -474,20 +474,6 @@ typedef struct {} client_opt_t;
|
|
474
474
|
#endif
|
475
475
|
|
476
476
|
#if defined(SWIGRUBY)
|
477
|
-
%rename( "properties=" ) set_properties(VALUE hash);
|
478
|
-
/*
|
479
|
-
* Set properties from Hash
|
480
|
-
* * Input parameters to 'invoke'd methods are represented as ClientOption properties
|
481
|
-
*
|
482
|
-
* call-seq:
|
483
|
-
* options.properties = { "Key" => "Value", ...}
|
484
|
-
*
|
485
|
-
*/
|
486
|
-
void set_properties(VALUE hash)
|
487
|
-
{
|
488
|
-
$self->properties = value2hash(NULL, hash, 0);
|
489
|
-
}
|
490
|
-
|
491
477
|
%rename( "properties" ) get_properties(void);
|
492
478
|
/*
|
493
479
|
* Get properties as Hash
|
@@ -499,7 +485,22 @@ typedef struct {} client_opt_t;
|
|
499
485
|
*/
|
500
486
|
VALUE get_properties(void)
|
501
487
|
{
|
502
|
-
|
488
|
+
VALUE v = Qnil;
|
489
|
+
if (!list_isempty($self->properties)) {
|
490
|
+
v = rb_hash_new();
|
491
|
+
lnode_t *node = list_first($self->properties);
|
492
|
+
while (node) {
|
493
|
+
client_property_t *property = (client_property_t *)node->list_data;
|
494
|
+
if (property->value.type == 0) {
|
495
|
+
rb_hash_aset( v, makestring(property->key), makestring(property->value.entry.text));
|
496
|
+
}
|
497
|
+
else {
|
498
|
+
rb_hash_aset( v, makestring(property->key), makestring(epr_to_string(property->value.entry.eprp)));
|
499
|
+
}
|
500
|
+
node = list_next($self->properties, node);
|
501
|
+
}
|
502
|
+
}
|
503
|
+
return v;
|
503
504
|
}
|
504
505
|
#endif
|
505
506
|
|
data/lib/openwsman/openwsman.rb
CHANGED
@@ -38,6 +38,14 @@ require 'openwsman/xmldoc'
|
|
38
38
|
# response and dig down through its XmlNode and XmlAttr objects.
|
39
39
|
|
40
40
|
module Openwsman
|
41
|
+
class ClientOption
|
42
|
+
# assign hash to properties
|
43
|
+
def properties= value
|
44
|
+
value.each do |k,v|
|
45
|
+
self.add_property k.to_s, v.to_s
|
46
|
+
end
|
47
|
+
end
|
48
|
+
end
|
41
49
|
class Transport
|
42
50
|
# called when authentication credentials missing or wrong
|
43
51
|
def Transport.auth_request_callback client, auth_type
|
data/lib/openwsman/version.rb
CHANGED
@@ -2,7 +2,7 @@
|
|
2
2
|
|
3
3
|
module Openwsman
|
4
4
|
require 'rbconfig'
|
5
|
-
OPENWSMAN_RUBY_VERSION = "2.
|
5
|
+
OPENWSMAN_RUBY_VERSION = "2.2"
|
6
6
|
SYSTEM_RUBY_VERSION = "#{RbConfig::CONFIG['MAJOR']}.#{RbConfig::CONFIG['MINOR']}"
|
7
7
|
if SYSTEM_RUBY_VERSION != OPENWSMAN_RUBY_VERSION
|
8
8
|
STDERR.puts "** Warning: Ruby version mismatch: Openwsman Ruby #{OPENWSMAN_RUBY_VERSION}, Runtime Ruby #{SYSTEM_RUBY_VERSION}"
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: openwsman
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 2.4.
|
4
|
+
version: 2.4.13
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Klaus Kämpf
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date:
|
11
|
+
date: 2015-02-24 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: rake-compiler
|
@@ -116,7 +116,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
116
116
|
version: 1.3.6
|
117
117
|
requirements: []
|
118
118
|
rubyforge_project:
|
119
|
-
rubygems_version: 2.
|
119
|
+
rubygems_version: 2.4.5
|
120
120
|
signing_key:
|
121
121
|
specification_version: 4
|
122
122
|
summary: Ruby client bindings for Openwsman
|