1CCS(3)                User Contributed Perl Documentation               CCS(3)
2
3
4

NAME

6       Cluster::CCS - Perl wrapper for the Cluster Configuration Service
7       library
8

SYNOPSIS

10         use Cluster::CCS;
11
12         my $ccs = new Cluster::CCS();
13
14         $ccs->fullxpath(1);
15
16         my $ccshandle = $ccs->connect();
17
18         if ($ccshandle < 1) {
19           print "Cannot comunicate with libccs\n";
20           exit $ccshandle;
21         }
22
23         my $rtn;
24         my $err;
25
26         $err = $ccs->get($ccshandle, '/cluster/@name', $rtn);
27
28         if ($err != 0) {
29           print "Query is not valid\n";
30         }
31
32         print "My Cluster name is $rtn\n";
33
34         $err = $ccs->disconnect($ccshandle);
35
36         if ($err != 0) {
37           print "Problems disconnecting from libccs\n";
38         }
39
40         exit $err;
41

DESCRIPTION

43         Cluster::CCS provides a perl XS wrapper for libccs.
44

METHODS

46   new
47         Creates a new Cluster::CCS object.
48
49   fullxpath(value)
50         Enable or disable full xpath queries. Set 1 to enable, 0 to disable.
51         This has to be set before connect() or force_connect.
52         In order to change this value, a disconnect operation is required.
53
54   connect(void)
55         Initialize the connection to libccs/libconfdb/corosync objdb.
56         Returns 1 on success or negative on failure.
57
58   force_connect(cluster_name, blocking)
59         Initialize the connection to libccs/libconfdb/corosync objdb.
60         If blocking is set, it will retry the operation until it succeed.
61         Returns 1 on success or negative on failure.
62
63   disconnect(desc)
64         Disconnect and free resources allocated during opertaion.
65         Returns 0 on success.
66
67   get(desc, query, rtn)
68         Perform a simple xpath query.
69         Returns 0 on success, negative otherwise. On success rtn will contain the
70         requested data.
71
72   get_list(desc, query, rtn)
73         Perform a simple xpath query and retain some data to iterate over a list of
74         results.
75         Returns 0 on success, negative otherwise. On success rtn will contain the
76         requested data.
77
78   set(desc, path, val)
79         This operation is not yet implemented in libccs.
80
81   lookup_nodename(desc, nodename, rtn)
82         Perform a nodename lookup using several methods.
83         Return 0 on success and rtn will contain the requested data.
84

EXPORTS

86       Nothing is exported by default.
87

BUGS

89         https://bugzilla.redhat.com/
90

SEE ALSO

92         cluster.conf(5), ccs(7), ccs_tool(8)
93

AUTHOR

95       Fabio M. Di Nitto <fdinitto@redhat.com>
96
97
98
99perl v5.12.4                      2011-09-27                            CCS(3)
Impressum