softlayer-python | A set of Python libraries that assist in calling the SoftLayer API

 by   softlayer Python Version: v6.1.7 License: MIT

kandi X-RAY | softlayer-python Summary

kandi X-RAY | softlayer-python Summary

softlayer-python is a Python library. softlayer-python has no vulnerabilities, it has build file available, it has a Permissive License and it has low support. However softlayer-python has 4 bugs. You can install using 'pip install softlayer-python' or download it from GitHub, PyPI.

A set of Python libraries that assist in calling the SoftLayer API.
Support
    Quality
      Security
        License
          Reuse

            kandi-support Support

              softlayer-python has a low active ecosystem.
              It has 155 star(s) with 194 fork(s). There are 40 watchers for this library.
              OutlinedDot
              It had no major release in the last 12 months.
              There are 26 open issues and 815 have been closed. On average issues are closed in 39 days. There are no pull requests.
              It has a neutral sentiment in the developer community.
              The latest version of softlayer-python is v6.1.7

            kandi-Quality Quality

              softlayer-python has 4 bugs (0 blocker, 0 critical, 4 major, 0 minor) and 377 code smells.

            kandi-Security Security

              softlayer-python has no vulnerabilities reported, and its dependent libraries have no vulnerabilities reported.
              softlayer-python code analysis shows 0 unresolved vulnerabilities.
              There are 340 security hotspots that need review.

            kandi-License License

              softlayer-python is licensed under the MIT License. This license is Permissive.
              Permissive licenses have the least restrictions, and you can use them in most projects.

            kandi-Reuse Reuse

              softlayer-python releases are available to install and integrate.
              Deployable package is available in PyPI.
              Build file is available. You can build the component from source.
              softlayer-python saves you 22984 person hours of effort in developing the same functionality from scratch.
              It has 44984 lines of code, 2763 functions and 509 files.
              It has high code complexity. Code complexity directly impacts maintainability of the code.

            Top functions reviewed by kandi - BETA

            kandi has reviewed softlayer-python and discovered the below as its top functions. This is intended to give you an instant insight into softlayer-python implemented functionality, and help decide if they suit your requirements.
            • Prepares a replicant volume object
            • Returns the tier IOPS per unit
            • Retrieve metadata attribute
            • Find the price for a given tier level
            • Returns the options required to create a dedicated location group
            • Calculates the cost of a given item
            • Return the price for a given item
            • Calculates the cost for a given preset
            • Display options for an order
            • Helper to output the diagnostic information
            • Prints the reponseable
            • Edit an instance
            • Edit a hardware
            • Authenticate using the IAM API
            • List interfaces in a security group
            • Get results for a given ticket
            • Update the arguments for a virtual machine
            • List dedicated hosts
            • Prepares a volume order object
            • Edit a CDN instance
            • Returns the creation options for the given datacenter
            • Prepares an order object
            • Prepares an order object for a snapshot space
            • Upgrade an instance
            • Get information about a file volume
            • Prepares a duplicate order object
            Get all kandi verified functions for this library.

            softlayer-python Key Features

            No Key Features are available at this moment for softlayer-python.

            softlayer-python Examples and Code Snippets

            Change last word after space in a dafaframe column
            Pythondot img1Lines of Code : 9dot img1License : Strong Copyleft (CC BY-SA 4.0)
            copy iconCopy
            df['computer_name'].str.replace(r'\S{3}(\S+?)(?:\.\S+|$)', r'xxx\1')
            
            0                   LENOVO 09 xxxH0GB
            1                  LENOVO xxxsbpmh613
            2    Dell Inc. PowerEdge R910 xxx2S75
            3                    HP  xxxsfe
            How to get billing item details using the SoftLayer Python client?
            Pythondot img2Lines of Code : 22dot img2License : Strong Copyleft (CC BY-SA 4.0)
            copy iconCopy
            import SoftLayer
            
            API_USERNAME = 'set me'
            
            API_KEY = 'set me'
            
            client = SoftLayer.create_client_from_env(username=API_USERNAME, api_key=API_KEY)
            
            billingItemId = 1234
            mask = "mask[location]"
            
            try:
                response = client['SoftLayer_Billing_I
            ValueError: Invalid endpoint: s3-api.xxxx.objectstorage.service.networklayer.com
            Pythondot img3Lines of Code : 4dot img3License : Strong Copyleft (CC BY-SA 4.0)
            copy iconCopy
            endpoint = 's3-api.us-geo.objectstorage.softlayer.net'
            
            endpoint = 'https://s3-api.us-geo.objectstorage.softlayer.net'
            
            SoftLayer VLAN disassociate / detach
            Pythondot img4Lines of Code : 7dot img4License : Strong Copyleft (CC BY-SA 4.0)
            copy iconCopy
            e.g:
            
            env['Network_Gateway_Vlan'].deleteObject(id=theIdofTheObject)
            
            res = env['Network_Gateway_Vlan'].createObject(obj)
            env['Network_Gateway_Vlan'].deleteObject(id=res["id"])
            
            Getting issue for creating a vsi from an image template
            Pythondot img5Lines of Code : 64dot img5License : Strong Copyleft (CC BY-SA 4.0)
            copy iconCopy
            from __future__ import print_function
            import SoftLayer
            from SoftLayer.managers.vs import VSManager
            
            def create_vsi():
                #Create a client to the SoftLayer_Account API service.
                #Note: currently set without the user ID and API key since
            Getting issue for creating a vsi from an image template
            Pythondot img6Lines of Code : 45dot img6License : Strong Copyleft (CC BY-SA 4.0)
            copy iconCopy
            mgr = ImageManager(client)
            resp = mgr.get_image(image_id=1211529)
            
            import SoftLayer
            from SoftLayer import VSManager
            from pprint import pprint as pp
            
            USERNAME = 'set me'
            API_KEY = 'set me'
            
            options = {
                'cpus': 4,
            SoftLayer API Nessus Scan Status / Report via python
            Pythondot img7Lines of Code : 39dot img7License : Strong Copyleft (CC BY-SA 4.0)
            copy iconCopy
            clientService.getObject(id=myInitParameter)
            
            $client = SoftLayer_SoapClient::getClient('SoftLayer_Account', null, $apiUsername, $apiKey);
            
                $accountInfo = $client->getObject();
                $hardware = $client->getH
            copy iconCopy
            objectFilter={"itemPrices":{"locationGroupId":{"operation":"is null"}}}
            
            https://[userName]:[apiKey]@api.softlayer.com/rest/v3/SoftLayer_Product_Package/46/getItemPrices?objectFilter={"itemPrices":{"locationGroupId"
            How can I get crypto keys via SL api as in portal?
            Pythondot img9Lines of Code : 35dot img9License : Strong Copyleft (CC BY-SA 4.0)
            copy iconCopy
            accountId = 202768 #change this value
            mask = "mask[accountId, certificateSigningRequest, certificateAuthorityName, id]"
            response = client['SoftLayer_Security_Certificate_Request'].getSslCertificateRequests(accountId)
            
            Softlayer API: How to get the static subnet belongs to which VSI?
            Pythondot img10Lines of Code : 18dot img10License : Strong Copyleft (CC BY-SA 4.0)
            copy iconCopy
            # Declare an Object Mask to get additional information
            object_mask = 'mask[primaryRouter,subnets[id,billingItem,cidr,version,addressSpace,subnetType,networkIdentifier,totalIpAddresses,usableIpAddressCount,ipAddresses[id, ipAddress, virtual

            Community Discussions

            QUESTION

            Could not to inspect the dedicated host provisioning process
            Asked 2018-Feb-01 at 15:26

            When I used slcli(softlayer-python command) to create a dedicated host, the command return the order id. And I check the order's status was 'APPROVED'. But I can not get the host in the result of 'SoftLayer_Account/getDedicatedHosts'.

            So I check the billing item and it is 'dedicated_virtual_hosts' rightly. Did SoftLayer API support another approach to inspect the dedicated host provisioned? Or did I do something wrong?

            ...

            ANSWER

            Answered 2018-Feb-01 at 15:26

            Yes, the dedicated host should be listed when calling to SoftLayer_Account::getDedicatedHosts method, or when using the "slcli dedicatedhost list" command. I suggest to check your permissions and device access, verify that "View Virtual Dedicated Host Details" is checked.

            Below are some slcli commands I executed to order and list dedicated hosts.

            To order a dedicated host:

            Source https://stackoverflow.com/questions/48557383

            QUESTION

            SoftLayer API: Does VSI flavor based order support specifying image_id
            Asked 2017-Oct-30 at 16:56

            We want to programatically order VSI using the flavor (for example. Balanced type), however instead of using the standard os_code, we want the VSI to be created from a public image template (ie. CentOS7-ChangeStable). From the following doc it seems to be possible.

            http://softlayer-python.readthedocs.io/en/latest/_modules/SoftLayer/managers/vs.html

            However I tried but got the following error:

            ...

            ANSWER

            Answered 2017-Oct-30 at 16:56

            this is an issue with the API, the python client uses the http://sldn.softlayer.com/reference/services/softlayer_virtual_guest/createObject method to create the VSI using RESTFul the same request would be something like this:

            Source https://stackoverflow.com/questions/47018095

            QUESTION

            Getting issue for creating a vsi from an image template
            Asked 2017-Oct-23 at 20:46

            I use Python API to create vsi and got an issue when I tried to create a vsi from an existing image template. My Python version is 3.6.3 and I run my Python scripts on Windows 7.

            Your documentation (http://softlayer-python.readthedocs.io/en/latest/api/managers/vs.html) says:

            os_code (string) – The operating system to use. Cannot be specified if image_id is specified.

            image_id (int) – The ID of the image to load onto the server. Cannot be specified if os_code is specified.

            When I specify image_id without os_code in my python script, I got the following error:

            ...

            ANSWER

            Answered 2017-Oct-23 at 20:20

            For your reference, below is the python script that I use to actually create a vsi or just try a dry run:

            Source https://stackoverflow.com/questions/46896238

            QUESTION

            How to create a reverse DNS record with SoftLayer api?
            Asked 2017-Jan-12 at 08:24

            Wandering how to do it in java. Example in other language would be helpful too. Looked at api docs and java-client docs. Somewhat helpful was this, but that does not show how what is required content of data: http://softlayer-python.readthedocs.io/en/latest/_modules/SoftLayer/managers/dns.html#DNSManager.create_record.

            ...

            ANSWER

            Answered 2017-Jan-12 at 08:17

            There seems to be a php example https://gist.github.com/softlayer/815278 Maybe it's possible to do something similar with java client.

            Source https://stackoverflow.com/questions/41606244

            QUESTION

            How to delete a subnet with SoftLayer api and Java client?
            Asked 2017-Jan-10 at 10:06

            Couldn't find any example or documentation. Looking at python cli tool: http://softlayer-python.readthedocs.io/en/latest/_modules/SoftLayer/managers/network.html#NetworkManager.cancel_subnet

            It seems like I have to delete billing item matching the subnet id?

            ...

            ANSWER

            Answered 2017-Jan-05 at 12:50

            That's rigth practically all the Softlayer Services have a billing Item , if you want to cancel the service you need to cancel the billing Item.

            The subnet services provides a method to retrieve the associated billig item http://sldn.softlayer.com/reference/services/SoftLayer_Network_Subnet/getBillingItem

            once you have the billing item you can proceed to cancel it using> http://sldn.softlayer.com/reference/services/SoftLayer_Billing_Item/cancelService

            ig you need an example in Java let me know, but practically if you call those methods above using Java you shouldn't have any problem to cancel the item.

            Regards

            Source https://stackoverflow.com/questions/41484280

            Community Discussions, Code Snippets contain sources that include Stack Exchange Network

            Vulnerabilities

            No vulnerabilities reported

            Install softlayer-python

            You can install using 'pip install softlayer-python' or download it from GitHub, PyPI.
            You can use softlayer-python like any standard Python library. You will need to make sure that you have a development environment consisting of a Python distribution including header files, a compiler, pip, and git installed. Make sure that your pip, setuptools, and wheel are up to date. When using pip it is generally recommended to install packages in a virtual environment to avoid changes to the system.

            Support

            For any new features, suggestions and bugs create an issue on GitHub. If you have any questions check and ask questions on community page Stack Overflow .
            Find more information at:

            Find, review, and download reusable Libraries, Code Snippets, Cloud APIs from over 650 million Knowledge Items

            Find more libraries
            CLONE
          • HTTPS

            https://github.com/softlayer/softlayer-python.git

          • CLI

            gh repo clone softlayer/softlayer-python

          • sshUrl

            git@github.com:softlayer/softlayer-python.git

          • Stay Updated

            Subscribe to our newsletter for trending solutions and developer bootcamps

            Agree to Sign up and Terms & Conditions

            Share this Page

            share link