Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- import SoftLayer
- client = SoftLayer.create_client_from_env("<user-id>", "<api -key>",SoftLayer.API_PUBLIC_ENDPOINT,240)
- client['Account'].getCurrentUser() # This returns some info about the user, showing that I've successfully connected to the SoftLayer public API endpoint.
- username="april19csctest1"
- first="april19csc"
- last="test1"
- email="<my-email>"
- user_template = {'username': username,'firstName': first,'lastName': last,'email': email,'companyName': '<companyName>','address1': 'my-address','city': '<city>','state': 'ON','country': 'CA','postalCode': '<my-postal-code>','userStatusId': 1001,'timezoneId': 120,'sslVpnAllowedFlag': True,'vpnManualConfig': False,'secondaryPasswordTimeoutDays' : 90}
- password="<some-random-password>"
- newUser = client['User_Customer'].createObject(user_template,password,password)
- client['User_Customer'].createObject(user_template,password,password)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement