Forum Discussion

Anthony_Pineda's avatar
Anthony_Pineda
Icon for Nimbostratus rankNimbostratus
Aug 16, 2016

Problem creating username using python iControl...

Can someone please check what I may be doing wrong below?

>>> b.Management.UserManagement.create_user([{'user': [{'name': 'user11', 'full_name': 'user11'}]},{'role': 0}, {'password': 'abcd1234'}])
Traceback (most recent call last):
  File "", line 1, in 
  File "/usr/local/lib/python2.7/dist-packages/bigsuds-1.0.1-py2.7.egg/bigsuds.py", line 412, in wrapped_method
  File "/usr/local/lib/python2.7/dist-packages/bigsuds-1.0.1-py2.7.egg/bigsuds.py", line 472, in process
  File "/usr/local/lib/python2.7/dist-packages/bigsuds-1.0.1-py2.7.egg/bigsuds.py", line 478, in _process_args
  File "/usr/local/lib/python2.7/dist-packages/bigsuds-1.0.1-py2.7.egg/bigsuds.py", line 540, in _process_arg
  File "/usr/local/lib/python2.7/dist-packages/bigsuds-1.0.1-py2.7.egg/bigsuds.py", line 530, in _process_arg
  File "/usr/local/lib/python2.7/dist-packages/bigsuds-1.0.1-py2.7.egg/bigsuds.py", line 559, in _process_arg
bigsuds.ArgumentError: "[{'name': 'user11', 'full_name': 'user11'}]" is not a valid value for Management.UserManagement.UserID, expecting: name, full_name

1 Reply

  • I was able to make the following command work...

    >>> b = bigsuds.BIGIP(hostname=mgmtipltm,username='admin',password='default')
    >>> u = b.Managment.UserManagement
    >>> u.create_user_3([{'user':{'name':'user11','full_name':'user11'},
    ... 'password':{'is_encrypted':0,'password':'abcd1234'},
    ... 'permissions':[{'role':'USER_ROLE_ADMINISTRATOR','partition':'[All]'}],
    ... 'login_shell':'/bin/bash'}])