Advertisement
Guest User

Untitled

a guest
Apr 20th, 2017
72
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.88 KB | None | 0 0
  1. import SoftLayer
  2.  
  3. client = SoftLayer.create_client_from_env("<user-id>", "<api -key>",SoftLayer.API_PUBLIC_ENDPOINT,240)
  4.  
  5. client['Account'].getCurrentUser() # This returns some info about the user, showing that I've successfully connected to the SoftLayer public API endpoint.
  6.  
  7. username="april19csctest1"
  8. first="april19csc"
  9. last="test1"
  10. email="<my-email>"
  11. 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}
  12. password="<some-random-password>"
  13.  
  14. newUser = client['User_Customer'].createObject(user_template,password,password)
  15.  
  16. client['User_Customer'].createObject(user_template,password,password)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement