forked from wsadminlib/wsadminlib
-
Notifications
You must be signed in to change notification settings - Fork 0
/
consumer.guidelines.txt
72 lines (50 loc) · 2.2 KB
/
consumer.guidelines.txt
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
Consumer Guidelines for wsadminlib
----------------------------------
Introduction
------------
wsadminlib is a library to simplify configuring WebSphere.
It intends to hide the complexities of the wsadmin scripting
interface behind task-oriented methods.
These methods are invoked when connected to one dmgr or standalone server.
If you need multiple cells, you must configure them one at a time.
Typical wsadminlib usage would be to write a python script that uses these
methods, then invoke the script with 'wsadmin -lang jython -f yourscript'.
Download
--------
To fetch the current copy of wsadminlib.py:
Browse here: https://github.com/wsadminlib/wsadminlib/downloads
Click 'download as zip' -> save file wsadminlib-master.zip
Unzip in a tmp directory and find file bin/wsadminlib.py
Try it
------
You can try wsadminlib.py immediately if you have a WAS standalone server
or deployment manager running.
Create a sample script file named mysample.py. Place it in the same
directory as wsadminlib.py:
"""This sample script uses wsadminlib.py to display the WAS cell name."""
execfile('wsadminlib.py')
cellName = getCellName()
print "cellName=" + cellName
Then invoke the sample:
wsadmin.sh -lang jython -f mydir/mysample.py
WASX7209I: Connected to process "dmgr" on node node01 using SOAP connector;
The type of process is: DeploymentManager
cellName=dbc1Cell01
Explore
-------
Wsadminlib.py has many hundreds of methods. Most are well-documented in the
header of each method. Feel free to search for objects you'd like to configure,
and then experiment using wsadminlib to configure them.
A small unit-test file is included in the wsadminlib zip: tests/wsadminlib.test.py
You are welcome to search it for sample usage. You may also try running the tests,
but beware the tests will change the configuration of your WAS server.
Consume
-------
When you find something you like in wsadminlib.py, you are welcome to
use it in either of these ways:
- Copy wsadminlib.py to your directory of wsadmin library files, and
call its methods from your own scripts.
- Copy/paste from wsadminlib.py directly to your own scripts.
Enjoy
-----
We hope wsadminlib.py is helpful to you.