Skip to content

Commit

Permalink
remove script_client from dimclient to solve #164
Browse files Browse the repository at this point in the history
  • Loading branch information
miesi-ionos committed Jan 17, 2022
1 parent 2df4c59 commit 910adfc
Showing 1 changed file with 0 additions and 17 deletions.
17 changes: 0 additions & 17 deletions dimclient/dimclient/__init__.py
Original file line number Diff line number Diff line change
@@ -1,11 +1,3 @@
'''
Usage example::
from dimclient import script_client
client = script_client('http://localhost:5000')
print(client.ip_list(pool='*', type='all', limit=2))
'''

try:
import simplejson as json
except:
Expand Down Expand Up @@ -165,12 +157,3 @@ def ip_list_all(self, **options):
options['after'] = batch[-1]['ip']
return result


def script_client(server_url, username=None, password=None):
'''
Return a client object authenticated with a permanent session and configured
to use ~/.ndcli.cookie.
'''
client = DimClient(server_url, cookie_file=os.path.expanduser('~/.ndcli.cookie'))
client.login_prompt(username, password, permanent_session=True)
return client

0 comments on commit 910adfc

Please sign in to comment.