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
3 changes: 1 addition & 2 deletions HACKING.md
Original file line number Diff line number Diff line change
Expand Up @@ -97,5 +97,4 @@ Each source file should be prefixed with the following header:
# License, v. 2.0. If a copy of the MPL was not distributed with this
# file, You can obtain one at http://mozilla.org/MPL/2.0/.
#
# Copyright (c) 2015 Etherios, Inc. All rights reserved.
# Etherios, Inc. is a Division of Digi International.
# Copyright (c) 2015 Digi International, Inc. All rights reserved.
8 changes: 3 additions & 5 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ Overview
--------

Python-devicecloud is a library providing simple, intuitive access to
the [Digi Device Cloud](http://www.digi.com/cloud/digi-device-cloud)
the [Digi Device Cloud](http://www.digi.com/products/cloud/digi-device-cloud)
for clients written in Python.

The library wraps the Device Cloud REST API and hides the details of
Expand All @@ -28,7 +28,7 @@ The primary target audience for this library is individuals
interfacing with the device cloud from the server side or developers
writing tools to aid device development. For efficient connectivity
from devices, we suggest that you first look at using the [Device Cloud
Connector](http://www.etherios.com/products/devicecloud/connector).
Connector](http://www.digi.com/support/productdetail?pid=5575).
That being said, this library could also be used on devices if deemed
suitable.

Expand Down Expand Up @@ -159,9 +159,7 @@ This Source Code Form is subject to the terms of the Mozilla Public
License, v. 2.0. If a copy of the MPL was not distributed with this file,
you can obtain one at http://mozilla.org/MPL/2.0/.

Digi, Digi International, the Digi logo, the Digi website, Etherios,
the Etherios logo, the Etherios website, Device Cloud by Etherios, and
Etherios Cloud Connector are trademarks or registered trademarks of
Digi, Digi International, the Digi logo, the Digi website, Digi Device Cloud, and Digi Cloud Connector are trademarks or registered trademarks of
Digi International, Inc. in the United States and other countries
worldwide. All other trademarks are the property of their respective
owners.
Expand Down
2 changes: 1 addition & 1 deletion devicecloud/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -355,7 +355,7 @@ def __init__(self, username, password, base_url=None,
throttle_delay_max=DEFAULT_THROTTLE_DELAY_MAX,
throttle_delay_backoff_coefficient=DEFAULT_THROTTLE_DELAY_BACKOFF_COEFFICIENT):
if base_url is None:
base_url = "https://login.etherios.com"
base_url = "https://devicecloud.digi.com"
self._conn = DeviceCloudConnection(
auth=HTTPBasicAuth(username, password),
base_url=base_url,
Expand Down
4 changes: 2 additions & 2 deletions devicecloud/devicecore.py
Original file line number Diff line number Diff line change
Expand Up @@ -325,8 +325,8 @@ def __init__(self, group_id, name, description, path, parent_id):
def from_json(cls, json_data):
"""Build and return a new Group object from json data (used internally)"""
# Example Data:
# { "grpId": "11817", "grpName": "7603_Etherios", "grpDescription": "7603_Etherios root group",
# "grpPath": "\/7603_Etherios\/", "grpParentId": "1"}
# { "grpId": "11817", "grpName": "7603_Digi", "grpDescription": "7603_Digi root group",
# "grpPath": "\/7603_Digi\/", "grpParentId": "1"}
return cls(
group_id=json_data["grpId"],
name=json_data["grpName"],
Expand Down
2 changes: 1 addition & 1 deletion devicecloud/examples/example_helpers.py
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@

def get_authenticated_dc():
while True:
base_url = os.environ.get('DC_BASE_URL', 'https://login.etherios.com')
base_url = os.environ.get('DC_BASE_URL', 'https://devicecloud.digi.com')

username = os.environ.get('DC_USERNAME', None)
if not username:
Expand Down
3 changes: 1 addition & 2 deletions devicecloud/test/integration/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,5 +2,4 @@
# License, v. 2.0. If a copy of the MPL was not distributed with this
# file, You can obtain one at http://mozilla.org/MPL/2.0/.
#
# Copyright (c) 2015 Etherios, Inc. All rights reserved.
# Etherios, Inc. is a Division of Digi International.
# Copyright (c) 2015 Digi International, Inc. All rights reserved.
2 changes: 1 addition & 1 deletion devicecloud/test/integration/inttest_monitor_tcp.py
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@ def receive_notification(notification):
fd = msg.get('FileData', None)
if fd:
if (fd['id']['fdName'] == 'test_file.txt' and
fd['id']['fdPath'] == '/db/7603_Etherios/inttest/monitor_tcp/'):
fd['id']['fdPath'] == '/db/7603_Digi/inttest/monitor_tcp/'):
fd_push_seen = True
dp = msg.get('DataPoint')
if dp:
Expand Down
3 changes: 1 addition & 2 deletions devicecloud/test/integration/inttest_streams.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,7 @@
# License, v. 2.0. If a copy of the MPL was not distributed with this
# file, You can obtain one at http://mozilla.org/MPL/2.0/.
#
# Copyright (c) 2015 Etherios, Inc. All rights reserved.
# Etherios, Inc. is a Division of Digi International.
# Copyright (c) 2015 Digi International, Inc. All rights reserved.

"""Integration tests for streams functionality

Expand Down
3 changes: 1 addition & 2 deletions devicecloud/test/integration/inttest_utilities.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,7 @@
# License, v. 2.0. If a copy of the MPL was not distributed with this
# file, You can obtain one at http://mozilla.org/MPL/2.0/.
#
# Copyright (c) 2015 Etherios, Inc. All rights reserved.
# Etherios, Inc. is a Division of Digi International.
# Copyright (c) 2015 Digi International, Inc. All rights reserved.

from getpass import getpass
import unittest
Expand Down
3 changes: 1 addition & 2 deletions devicecloud/test/unit/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,5 +2,4 @@
# License, v. 2.0. If a copy of the MPL was not distributed with this
# file, You can obtain one at http://mozilla.org/MPL/2.0/.
#
# Copyright (c) 2015 Etherios, Inc. All rights reserved.
# Etherios, Inc. is a Division of Digi International.
# Copyright (c) 2015 Digi International, Inc. All rights reserved.
24 changes: 12 additions & 12 deletions devicecloud/test/unit/test_devicecore.py
Original file line number Diff line number Diff line change
Expand Up @@ -120,8 +120,8 @@
"requestedSize": "1000",
"remainingSize": "0",
"items": [
{ "grpId": "11817", "grpName": "7603_Etherios", "grpDescription": "7603_Etherios root group", "grpPath": "\/7603_Etherios\/", "grpParentId": "1"},
{ "grpId": "13542", "grpName": "Demo", "grpPath": "\/7603_Etherios\/Demo\/", "grpParentId": "11817"}
{ "grpId": "11817", "grpName": "7603_Digi", "grpDescription": "7603_Digi root group", "grpPath": "\/7603_Digi\/", "grpParentId": "1"},
{ "grpId": "13542", "grpName": "Demo", "grpPath": "\/7603_Digi\/Demo\/", "grpParentId": "11817"}
]
}
"""
Expand All @@ -134,10 +134,10 @@
"requestedSize": "1000",
"remainingSize": "0",
"items": [
{ "grpId": "11817", "grpName": "7603_Etherios", "grpDescription": "7603_Etherios root group", "grpPath": "\/7603_Etherios\/", "grpParentId": "1"},
{ "grpId": "13542", "grpName": "Demo", "grpPath": "\/7603_Etherios\/Demo\/", "grpParentId": "11817"},
{ "grpId": "13544", "grpName": "SubDir2", "grpPath": "\/7603_Etherios\/Demo\/SubDir2\/", "grpParentId": "13542"},
{ "grpId": "13545", "grpName": "Another Second Level", "grpDescription": "Another Second Level", "grpPath": "\/7603_Etherios\/Another Second Level\/", "grpParentId": "11817"}
{ "grpId": "11817", "grpName": "7603_Digi", "grpDescription": "7603_Digi root group", "grpPath": "\/7603_Digi\/", "grpParentId": "1"},
{ "grpId": "13542", "grpName": "Demo", "grpPath": "\/7603_Digi\/Demo\/", "grpParentId": "11817"},
{ "grpId": "13544", "grpName": "SubDir2", "grpPath": "\/7603_Digi\/Demo\/SubDir2\/", "grpParentId": "13542"},
{ "grpId": "13545", "grpName": "Another Second Level", "grpDescription": "Another Second Level", "grpPath": "\/7603_Digi\/Another Second Level\/", "grpParentId": "11817"}
]
}
"""
Expand Down Expand Up @@ -181,17 +181,17 @@ def test_get_groups(self):
grp = six.next(it)
self.assertEqual(grp.is_root(), True)
self.assertEqual(grp.get_id(), "11817")
self.assertEqual(grp.get_name(), "7603_Etherios")
self.assertEqual(grp.get_description(), "7603_Etherios root group")
self.assertEqual(grp.get_path(), "/7603_Etherios/")
self.assertEqual(grp.get_name(), "7603_Digi")
self.assertEqual(grp.get_description(), "7603_Digi root group")
self.assertEqual(grp.get_path(), "/7603_Digi/")
self.assertEqual(grp.get_parent_id(), "1")

grp = six.next(it)
self.assertEqual(grp.is_root(), False)
self.assertEqual(grp.get_id(), "13542")
self.assertEqual(grp.get_name(), "Demo")
self.assertEqual(grp.get_description(), "")
self.assertEqual(grp.get_path(), "/7603_Etherios/Demo/")
self.assertEqual(grp.get_path(), "/7603_Digi/Demo/")
self.assertEqual(grp.get_parent_id(), "11817")

def test_repr_and_tree_print(self):
Expand All @@ -200,9 +200,9 @@ def test_repr_and_tree_print(self):
root = self.dc.devicecore.get_group_tree_root()
root.print_subtree(fobj) # the order of the traversal can vary, so just assert on the length
if six.PY2:
self.assertEqual(len(fobj.getvalue()), 513)
self.assertEqual(len(fobj.getvalue()), 489)
elif six.PY3:
self.assertEqual(len(fobj.getvalue()), 495) # no u'' on repr for strings
self.assertEqual(len(fobj.getvalue()), 471) # no u'' on repr for strings

def test_get_groups_condition(self):
self.prepare_response("GET", "/ws/Group", EXAMPLE_GET_GROUPS)
Expand Down
2 changes: 1 addition & 1 deletion devicecloud/test/unit/test_monitor_tcp.py
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ def setUp(self):
self.client_manager = TCPClientManager(self.dc.get_connection())

def test_hostname(self):
self.assertEqual(self.client_manager.hostname, "login.etherios.com")
self.assertEqual(self.client_manager.hostname, "devicecloud.digi.com")

def test_username(self):
self.assertEqual(self.client_manager.username, "user")
Expand Down
2 changes: 1 addition & 1 deletion devicecloud/test/unit/test_utilities.py
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ def prepare_response(self, method, path, data=None, status=200, match_querystrin
if data is not None:
kwargs['body'] = data
httpretty.register_uri(method,
"https://login.etherios.com{}".format(path),
"https://devicecloud.digi.com{}".format(path),
match_querystring=match_querystring,
status=status,
**kwargs)
Expand Down
3 changes: 1 addition & 2 deletions devicecloud/ws.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,7 @@
# License, v. 2.0. If a copy of the MPL was not distributed with this
# file, You can obtain one at http://mozilla.org/MPL/2.0/.
#
# Copyright (c) 2015 Etherios, Inc. All rights reserved.
# Etherios, Inc. is a Division of Digi International.
# Copyright (c) 2015 Digi International, Inc. All rights reserved.
import functools
import inspect

Expand Down
2 changes: 1 addition & 1 deletion docs/conf.py
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,7 @@

# General information about the project.
project = u'python-devicecloud'
copyright = u'2014, Etherios, Inc.'
copyright = u'2015, Digi International, Inc.'

# The version info for the project you're documenting, acts as replacement for
# |version| and |release|, also used in various other places throughout the
Expand Down
6 changes: 3 additions & 3 deletions docs/index.rst
Original file line number Diff line number Diff line change
Expand Up @@ -21,8 +21,8 @@ Introduction
============

Python-devicecloud is a library providing simple, intuitive access to
the `Device Cloud by Etherios
<http://www.etherios.com/products/devicecloud/>`_ for clients written
the `Digi Device Cloud
<http://www.digi.com/products/cloud/digi-device-cloud/>`_ for clients written
in Python.

The library wraps the Device Cloud REST API and hides the details of
Expand All @@ -36,7 +36,7 @@ The primary target audience for this library is individuals
interfacing with the device cloud from the server side or developers
writing tools to aid device development. For efficient connectivity
from devices, we suggest that you first look at using the `Device
Cloud Connector <http://www.etherios.com/products/devicecloud/connector>`_.
Cloud Connector <http://www.digi.com/support/productdetail?pid=5575>`_.
That being said, this library could also be used on devices if deemed
suitable.

Expand Down