diff options
| author | Paul C. Buetow <paul@buetow.org> | 2014-04-12 08:57:05 +0200 |
|---|---|---|
| committer | Paul C. Buetow <paul@buetow.org> | 2014-04-12 08:57:05 +0200 |
| commit | e15f2ad34bfb28598e7faf3c1bde03dbfab76d2a (patch) | |
| tree | c114ed0dc508047b6d17405a2804ecb4909bc7da /fapi.py | |
| parent | 3921a6ea87c48a4bf2a6f2f3f27bac55c70c188a (diff) | |
set partition after login
Diffstat (limited to 'fapi.py')
| -rwxr-xr-x | fapi.py | 10 |
1 files changed, 9 insertions, 1 deletions
@@ -47,6 +47,12 @@ class Fapi(object): self.__login(username, password) + try: + self.b.Management.Partition.set_active_partition( + config.get('fapi', 'partition')) + except Exception, e: + print "Exception: %s" % e + def __args_merge(self, args): ''' Merges args to the config object ''' @@ -68,7 +74,7 @@ class Fapi(object): hostname = self.config.get('fapi', 'hostname') try: - b = bigsuds.BIGIP( + self.b = bigsuds.BIGIP( hostname = hostname, username = username, password = password, @@ -85,6 +91,8 @@ if __name__ == '__main__': parser.add_argument('-V', action='store_true', help='Print version') parser.add_argument('-C', action='store', help='Config file', default=expanduser('~') + '/.fapi.conf') + parser.add_argument('list', action='store_true', help='List') + parser.add_argument('pools', action='store_true', help='Server pool') args = vars(parser.parse_args()) if args['V']: |
