Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,9 +3,9 @@
We are happy to accept contributions to softlayer-python. Please follow the
guidelines below.

* Sign our contributor agreement (CLA) You can find the [CLA here](./docs/cla-individual.md).
* Sign our contributor agreement (CLA) You can find the [CLA here](./docs/dev/cla-individual.md).

* If you're contributing on behalf of your employer we'll need a signed copy of our corporate contributor agreement (CCLA) as well. You can find the [CCLA here](./docs/cla-corporate.md).
* If you're contributing on behalf of your employer we'll need a signed copy of our corporate contributor agreement (CCLA) as well. You can find the [CCLA here](./docs/dev/cla-corporate.md).

* Fork the repo, make your changes, and open a pull request.

Expand Down
7 changes: 6 additions & 1 deletion SoftLayer/managers/block.py
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,12 @@


class BlockStorageManager(utils.IdentifierMixin, object):
"""Manages Block Storage volumes."""
"""Manages SoftLayer Block Storage volumes.

See product information here: http://www.softlayer.com/block-storage

:param SoftLayer.API.BaseClient client: the client instance
"""

def __init__(self, client):
self.configuration = {}
Expand Down
8 changes: 7 additions & 1 deletion SoftLayer/managers/cdn.py
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,13 @@


class CDNManager(utils.IdentifierMixin, object):
"""Manage CDN accounts."""
"""Manage CDN accounts and content.

See product information here:
http://www.softlayer.com/content-delivery-network

:param SoftLayer.API.BaseClient client: the client instance
"""

def __init__(self, client):
self.client = client
Expand Down
6 changes: 4 additions & 2 deletions SoftLayer/managers/dns.py
Original file line number Diff line number Diff line change
Expand Up @@ -11,9 +11,11 @@


class DNSManager(utils.IdentifierMixin, object):
"""Domain Name System manager.
"""Manage SoftLayer DNS.

:param SoftLayer.API.Client client: the client instance
See product information here: http://www.softlayer.com/DOMAIN-SERVICES

:param SoftLayer.API.BaseClient client: the client instance

"""

Expand Down
6 changes: 4 additions & 2 deletions SoftLayer/managers/firewall.py
Original file line number Diff line number Diff line change
Expand Up @@ -29,9 +29,11 @@ def has_firewall(vlan):


class FirewallManager(utils.IdentifierMixin, object):
"""Manages firewalls.
"""Manages SoftLayer firewalls

:param SoftLayer.API.Client client: the API client instance
See product information here: http://www.softlayer.com/firewalls

:param SoftLayer.API.BaseClient client: the client instance

"""

Expand Down
6 changes: 4 additions & 2 deletions SoftLayer/managers/hardware.py
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@


class HardwareManager(utils.IdentifierMixin, object):
"""Manage hardware devices.
"""Manage SoftLayer hardware servers.

Example::

Expand All @@ -32,7 +32,9 @@ class HardwareManager(utils.IdentifierMixin, object):
client = SoftLayer.Client()
mgr = SoftLayer.HardwareManager(client)

:param SoftLayer.API.Client client: an API client instance
See product information here: http://www.softlayer.com/bare-metal-servers

:param SoftLayer.API.BaseClient client: the client instance
:param SoftLayer.managers.OrderingManager ordering_manager: an optional
manager to handle ordering.
If none is provided, one will be
Expand Down
7 changes: 5 additions & 2 deletions SoftLayer/managers/image.py
Original file line number Diff line number Diff line change
Expand Up @@ -13,9 +13,12 @@


class ImageManager(utils.IdentifierMixin, object):
"""Manages server images.
"""Manages SoftLayer server images.

:param SoftLayer.API.Client client: an API client instance
See product information here:
https://knowledgelayer.softlayer.com/topic/image-templates

:param SoftLayer.API.BaseClient client: the client instance
"""

def __init__(self, client):
Expand Down
9 changes: 8 additions & 1 deletion SoftLayer/managers/iscsi.py
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,14 @@


class ISCSIManager(utils.IdentifierMixin, object):
"""Manages iSCSI storages."""
"""Manages SoftLayer iSCSI storage accounts.

See product information here:
https://knowledgelayer.softlayer.com/topic/iscsi

:param SoftLayer.API.BaseClient client: the client instance

"""

def __init__(self, client):
self.configuration = {}
Expand Down
7 changes: 5 additions & 2 deletions SoftLayer/managers/load_balancer.py
Original file line number Diff line number Diff line change
Expand Up @@ -9,9 +9,12 @@


class LoadBalancerManager(utils.IdentifierMixin, object):
"""Manages load balancers.
"""Manages SoftLayer load balancers.

See product information here: http://www.softlayer.com/load-balancing

:param SoftLayer.API.BaseClient client: the client instance

:param SoftLayer.API.Client client: the API client instance
"""

def __init__(self, client):
Expand Down
10 changes: 8 additions & 2 deletions SoftLayer/managers/messaging.py
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@


class QueueAuth(requests.auth.AuthBase):
"""Message Queue authentication for requests.
"""SoftLayer Message Queue authentication for requests.

:param endpoint: endpoint URL
:param username: SoftLayer username
Expand Down Expand Up @@ -72,7 +72,13 @@ def __call__(self, resp):


class MessagingManager(object):
"""Manage SoftLayer Message Queue."""
"""Manage SoftLayer Message Queue accounts.

See product information here: http://www.softlayer.com/message-queue

:param SoftLayer.API.BaseClient client: the client instance

"""
def __init__(self, client):
self.client = client

Expand Down
7 changes: 6 additions & 1 deletion SoftLayer/managers/metadata.py
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,10 @@


class MetadataManager(object):
"""Provides an interface for the metadata service.
"""Provides an interface for the SoftLayer metadata service.

See product information here:
http://sldn.softlayer.com/reference/services/SoftLayer_Resource_Metadata

This provides metadata about the resourse it is called from.
See `METADATA_ATTRIBUTES` for full list of attributes.
Expand All @@ -51,6 +54,8 @@ class MetadataManager(object):
>>> meta.get('fqdn')
'test.example.com'

:param SoftLayer.API.BaseClient client: the client instance

"""

attribs = METADATA_MAPPING
Expand Down
8 changes: 7 additions & 1 deletion SoftLayer/managers/network.py
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,13 @@


class NetworkManager(object):
"""Manage Networks."""
"""Manage SoftLayer network objects: VLANs, subnets, IPs and rwhois

See product information here: http://www.softlayer.com/networking

:param SoftLayer.API.BaseClient client: the client instance

"""
def __init__(self, client):
self.client = client
self.account = client['Account']
Expand Down
8 changes: 7 additions & 1 deletion SoftLayer/managers/object_storage.py
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,13 @@


class ObjectStorageManager(object):
"""Manager for Object Storage."""
"""Manager for SoftLayer Object Storage accounts.

See product information here: http://www.softlayer.com/object-storage

:param SoftLayer.API.BaseClient client: the client instance

"""

def __init__(self, client):
self.client = client
Expand Down
4 changes: 2 additions & 2 deletions SoftLayer/managers/ordering.py
Original file line number Diff line number Diff line change
Expand Up @@ -8,9 +8,9 @@


class OrderingManager(object):
"""Manages hardware devices.
"""Manager to help ordering via the SoftLayer API.

:param SoftLayer.API.Client client: an API client instance
:param SoftLayer.API.BaseClient client: the client instance
"""

def __init__(self, client):
Expand Down
7 changes: 5 additions & 2 deletions SoftLayer/managers/sshkey.py
Original file line number Diff line number Diff line change
Expand Up @@ -10,9 +10,12 @@


class SshKeyManager(utils.IdentifierMixin, object):
"""Manages account SSH keys.
"""Manages account SSH keys in SoftLayer.

:param SoftLayer.API.Client client: an API client instance
See product information here:
https://knowledgelayer.softlayer.com/procedure/ssh-keys

:param SoftLayer.API.BaseClient client: the client instance
"""

def __init__(self, client):
Expand Down
6 changes: 4 additions & 2 deletions SoftLayer/managers/ssl.py
Original file line number Diff line number Diff line change
Expand Up @@ -8,9 +8,9 @@


class SSLManager(object):
"""Manages SSL certificates.
"""Manages SSL certificates in SoftLayer.

:param SoftLayer.API.Client client: an API client instance
See product information here: http://www.softlayer.com/ssl-certificates

Example::

Expand All @@ -23,6 +23,8 @@ class SSLManager(object):
client = SoftLayer.Client()
mgr = SoftLayer.SSLManager(client)

:param SoftLayer.API.BaseClient client: the client instance

"""

def __init__(self, client):
Expand Down
25 changes: 16 additions & 9 deletions SoftLayer/managers/ticket.py
Original file line number Diff line number Diff line change
Expand Up @@ -10,9 +10,12 @@


class TicketManager(utils.IdentifierMixin, object):
"""Manages support Tickets.
"""Manages SoftLayer support tickets.

See product information here: http://www.softlayer.com/support

:param SoftLayer.API.BaseClient client: the client instance

:param SoftLayer.API.Client client: an API client instance
"""

def __init__(self, client):
Expand Down Expand Up @@ -46,8 +49,7 @@ def get_ticket(self, ticket_id):
"""Get details about a ticket.

:param integer ticket_id: the ticket ID
:returns: A dictionary containing a large amount of information about
the specified ticket.
:returns: dict -- information about the specified ticket

"""
mask = ('id, title, assignedUser[firstName, lastName],status,'
Expand Down Expand Up @@ -91,7 +93,8 @@ def upload_attachment(self, ticket_id=None, file_path=None,
:param string file_name:
The name of the attachment shown
in the ticket
:returns The uploaded attachment

:returns: dict -- The uploaded attachment
"""
file_content = None
with open(file_path, 'rb') as attached_file:
Expand All @@ -109,7 +112,8 @@ def attach_hardware(self, ticket_id=None, hardware_id=None):

:param integer ticket_id: the id of the ticket to attach to
:param integer hardware_id: the id of the hardware to attach
:returns The new ticket attachment

:returns: dict -- The new ticket attachment
"""
return self.ticket.addAttachedHardware(hardware_id, id=ticket_id)

Expand All @@ -118,7 +122,8 @@ def attach_virtual_server(self, ticket_id=None, virtual_id=None):

:param integer ticket_id: the id of the ticket to attach to
:param integer virtual_id: the id of the virtual server to attach
:returns The new ticket attachment

:returns: dict -- The new ticket attachment
"""
return self.ticket.addAttachedVirtualGuest(virtual_id, id=ticket_id)

Expand All @@ -127,7 +132,8 @@ def detach_hardware(self, ticket_id=None, hardware_id=None):

:param ticket_id: the id of the ticket to detach from
:param hardware_id: the id of the hardware to detach
:return: Whether the detachment was successful

:returns: bool -- Whether the detachment was successful
"""
return self.ticket.removeAttachedHardware(hardware_id, id=ticket_id)

Expand All @@ -136,6 +142,7 @@ def detach_virtual_server(self, ticket_id=None, virtual_id=None):

:param ticket_id: the id of the ticket to detach from
:param virtual_id: the id of the virtual server to detach
:return: Whether the detachment was successful

:returns: bool -- Whether the detachment was successful
"""
return self.ticket.removeAttachedVirtualGuest(virtual_id, id=ticket_id)
15 changes: 9 additions & 6 deletions SoftLayer/managers/vs.py
Original file line number Diff line number Diff line change
Expand Up @@ -17,13 +17,9 @@


class VSManager(utils.IdentifierMixin, object):
"""Manages Virtual Servers.
"""Manages SoftLayer Virtual Servers.

:param SoftLayer.API.Client client: an API client instance
:param SoftLayer.managers.OrderingManager ordering_manager: an optional
manager to handle ordering.
If none is provided, one will be
auto initialized.
See product information here: http://www.softlayer.com/virtual-servers

Example::

Expand All @@ -36,6 +32,13 @@ class VSManager(utils.IdentifierMixin, object):
client = SoftLayer.Client()
mgr = SoftLayer.VSManager(client)


:param SoftLayer.API.BaseClient client: the client instance
:param SoftLayer.managers.OrderingManager ordering_manager: an optional
manager to handle ordering.
If none is provided, one will be
auto initialized.

"""

def __init__(self, client, ordering_manager=None):
Expand Down
File renamed without changes.
File renamed without changes.
Loading