summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorPaul C. Buetow (mars.fritz.box) <paul@buetow.org>2014-04-24 20:39:05 +0200
committerPaul C. Buetow (mars.fritz.box) <paul@buetow.org>2014-04-24 20:39:05 +0200
commitfcad32509ce4de206ebc1f63a683d4e1a0d6364d (patch)
tree1bd78f6c676f547b482d813c4b6a4708a41c5a78
parent40aeb5b5de99088962e717433d6143854b54ecdd (diff)
rename partition to folder0.0.11
-rw-r--r--README.pod4
-rw-r--r--docs/fapi.17
-rw-r--r--docs/fapi.txt5
-rw-r--r--docs/synopsis.txt46
-rw-r--r--fapi.conf.sample4
-rwxr-xr-xsrc/fapi12
6 files changed, 47 insertions, 31 deletions
diff --git a/README.pod b/README.pod
index 05b88f4..340892a 100644
--- a/README.pod
+++ b/README.pod
@@ -70,6 +70,10 @@ And run
cp /usr/share/fapi/fapi.conf.sample ~/.fapi.conf
vim ~/.fapi.conf
+Or if you want to install it from the source dir, just run:
+
+ make
+ sudo make install
=head1 EXAMPLES
diff --git a/docs/fapi.1 b/docs/fapi.1
index cadc239..99f4596 100644
--- a/docs/fapi.1
+++ b/docs/fapi.1
@@ -204,6 +204,13 @@ And run
\& cp /usr/share/fapi/fapi.conf.sample ~/.fapi.conf
\& vim ~/.fapi.conf
.Ve
+.PP
+Or if you want to install it from the source dir, just run:
+.PP
+.Vb 2
+\& make
+\& sudo make install
+.Ve
.SH "EXAMPLES"
.IX Header "EXAMPLES"
.SS "Listing"
diff --git a/docs/fapi.txt b/docs/fapi.txt
index b76e823..77b4933 100644
--- a/docs/fapi.txt
+++ b/docs/fapi.txt
@@ -62,6 +62,11 @@ QUICK START
cp /usr/share/fapi/fapi.conf.sample ~/.fapi.conf
vim ~/.fapi.conf
+ Or if you want to install it from the source dir, just run:
+
+ make
+ sudo make install
+
EXAMPLES
Listing
If you want to list all configured objects on your partition just run
diff --git a/docs/synopsis.txt b/docs/synopsis.txt
index 0305e5e..9f89519 100644
--- a/docs/synopsis.txt
+++ b/docs/synopsis.txt
@@ -1,4 +1,4 @@
-usage: fapi [-b B] [-e E] [-h] [-l] [-p P] [-v] [-V] [-C C]
+usage: fapi [-b B] [-e E] [-f F] [-h] [-l] [-v] [-V] [-C C]
[what] [name] [sub] [sub2] [sub3] [sub4] [sub5]
positional arguments:
@@ -13,9 +13,9 @@ positional arguments:
optional arguments:
-b B Forces to use the secified loadbalancer (overwrites -e)
-e E Env to use, e.g. dev,qa,live
+ -f F Overwrite partition/folder from fapi.conf
-h Help
-l Use list output
- -p P Overwrite partition from fapi.conf
-v Verbose
-V Print version
-C C Config file
@@ -50,25 +50,25 @@ Synopsis:
fapi vserver NAME set pool POOLNAME
fapi vserver NAME set snat none
The following partially needs admininstrator privileges on / and /Common
- fapi -p Common -b balancer.example.com selfip
- fapi -p Common -b balancer.example.com selfip NAME create NETMASK VLANNAME [TGROUP]
- fapi -p Common -b balancer.example.com selfip NAME delete
- fapi -p Common -b balancer.example.com selfip NAME get detail|tgroup
- fapi -p Common -b balancer.example.com selfip NAME set tgroup TGROUP
- fapi -p Common tgroup
- fapi -p Common tgroup NAME add ha_order DEVICE ORDER
- fapi -p Common tgroup NAME create
- fapi -p Common tgroup NAME delete
- fapi -p Common tgroup NAME get detail
- fapi -p Common tgroup NAME get ha_order
- fapi -p Common tgroup NAME remove all_ha_orders
- fapi -p Common tgroup NAME remove ha_order DEVICE ORDER
- fapi -p Common vlan
- fapi -p Common vlan NAME create tagged VLANID internal|external|...
- fapi -p Common vlan NAME delete
- fapi -p Common vlan NAME get detail
- fapi -p / folder
- fapi -p / folder NAME create|delete
- fapi -p / folder NAME get detail|dgroup|tgroup
- fapi -p / folder NAME set dgroup|tgroup DGROUP|TGROUP
+ fapi -f Common -b balancer.example.com selfip
+ fapi -f Common -b balancer.example.com selfip NAME create NETMASK VLANNAME [TGROUP]
+ fapi -f Common -b balancer.example.com selfip NAME delete
+ fapi -f Common -b balancer.example.com selfip NAME get detail|tgroup
+ fapi -f Common -b balancer.example.com selfip NAME set tgroup TGROUP
+ fapi -f Common tgroup
+ fapi -f Common tgroup NAME add ha_order DEVICE ORDER
+ fapi -f Common tgroup NAME create
+ fapi -f Common tgroup NAME delete
+ fapi -f Common tgroup NAME get detail
+ fapi -f Common tgroup NAME get ha_order
+ fapi -f Common tgroup NAME remove all_ha_orders
+ fapi -f Common tgroup NAME remove ha_order DEVICE ORDER
+ fapi -f Common vlan
+ fapi -f Common vlan NAME create tagged VLANID internal|external|...
+ fapi -f Common vlan NAME delete
+ fapi -f Common vlan NAME get detail
+ fapi -f / folder
+ fapi -f / folder NAME create|delete
+ fapi -f / folder NAME get detail|dgroup|tgroup
+ fapi -f / folder NAME set dgroup|tgroup DGROUP|TGROUP
Please consult the manpage for examples.
diff --git a/fapi.conf.sample b/fapi.conf.sample
index 9473b20..839592b 100644
--- a/fapi.conf.sample
+++ b/fapi.conf.sample
@@ -10,5 +10,5 @@ loadbalancers_qa: qa-01.example.com,qa-02.example.com
# The qa loadbalancers (if specified -e live)
# You can specify your own/more envs too...
loadbalancers_live: live-01.example.com,live-02.example.com,live-03.example.com
-# Administrative partition to use...
-partition: Common
+# Administrative folder/partition to use...
+folder: Common
diff --git a/src/fapi b/src/fapi
index 0889cee..00c92e0 100755
--- a/src/fapi
+++ b/src/fapi
@@ -94,13 +94,13 @@ class Fapi(object):
self._config.read(args.C)
if args.f != None:
- self._partition = args.f
+ self._folder = args.f
else:
- self._partition = self._config.get('fapi', 'partition')
+ self._folder = self._config.get('fapi', 'folder')
def __login(self):
- ''' Logs into the F5 BigIP SOAP API and changes the partition'''
+ ''' Logs into the F5 BigIP SOAP API and changes the folder/adm. partition'''
c = self._config
a = self._args
@@ -125,8 +125,8 @@ class Fapi(object):
self._f5 = bigsuds.BIGIP(hostname = loadbalancer,
username = username,
password = password)
- self._f5.Management.Partition.set_active_partition(self._partition)
- self.verbose('Set partition to \'%s\'' % self._partition)
+ self._f5.Management.Partition.set_active_partition(self._folder)
+ self.verbose('Set folder/adm. partition to \'%s\'' % self._folder)
err = None
break
except Exception, e:
@@ -681,7 +681,7 @@ class Fapi(object):
if a.name:
# Remove the /partition/ prefix, setting default partition after
# login instead
- a.name = re.sub(self._partition, '', a.name)
+ a.name = re.sub(self._folder, '', a.name)
a.name = re.sub('^/+', '', a.name)
if a.what == 'node':