Skip to content

Commit

Permalink
Merge pull request #536 from carbonblack/release-1.5.6
Browse files Browse the repository at this point in the history
Release 1.5.6 merge to master
  • Loading branch information
abowersox-cb authored Jul 26, 2024
2 parents 898654e + 801e68c commit f8eb4a5
Show file tree
Hide file tree
Showing 8 changed files with 22 additions and 15 deletions.
4 changes: 2 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
# Carbon Black Cloud Python SDK

**Latest Version:** 1.5.5
**Latest Version:** 1.5.6
<br>
**Release Date:** July 11, 2024
**Release Date:** July 26, 2024

[![Coverage Status](https://coveralls.io/repos/github/carbonblack/carbon-black-cloud-sdk-python/badge.svg?t=Id6Baf)](https://coveralls.io/github/carbonblack/carbon-black-cloud-sdk-python)
[![Codeship Status for carbonblack/carbon-black-cloud-sdk-python](https://app.codeship.com/projects/9e55a370-a772-0138-aae4-129773225755/status?branch=develop)](https://app.codeship.com/projects/402767)
Expand Down
2 changes: 1 addition & 1 deletion VERSION
Original file line number Diff line number Diff line change
@@ -1 +1 @@
1.5.5
1.5.6
7 changes: 7 additions & 0 deletions docs/changelog.rst
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,13 @@
Changelog
=========

CBC SDK 1.5.6 - Released July 26, 2024
--------------------------------------

Bug Fixes:

* Fixed a failure of large file transfers with the Live Response API.

CBC SDK 1.5.5 - Released July 11, 2024
--------------------------------------

Expand Down
2 changes: 1 addition & 1 deletion docs/conf.py
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@
author = 'Developer Relations'

# The full version, including alpha/beta/rc tags
release = '1.5.5'
release = '1.5.6'


# -- General configuration ---------------------------------------------------
Expand Down
2 changes: 1 addition & 1 deletion src/cbc_sdk/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@
__author__ = 'Carbon Black Developer Network'
__license__ = 'MIT'
__copyright__ = 'Copyright 2020-2024 Broadcom Inc. Carbon Black'
__version__ = '1.5.5'
__version__ = '1.5.6'

from .rest_api import CBCloudAPI
from .cache import lru
2 changes: 1 addition & 1 deletion src/cbc_sdk/live_response_api.py
Original file line number Diff line number Diff line change
Expand Up @@ -211,7 +211,7 @@ def get_raw_file(self, file_name, timeout=None, delay=None, async_mode=False):
object: Contains the data of the file.
"""
file_id, command_id = self._submit_get_file(file_name)
if file_id and command_id:
if file_id is not None and command_id is not None:
if async_mode:
return command_id, self._async_submit(lambda arg, kwarg: self._get_raw_file(command_id,
file_id,
Expand Down
2 changes: 1 addition & 1 deletion src/tests/unit/fixtures/live_response/mock_command.py
Original file line number Diff line number Diff line change
Expand Up @@ -125,7 +125,7 @@
"count": 0,
"file_id": "f0245f97-67dd-42c4-9548-b35dca12f185"
},
"id": 7,
"id": 0,
"name": "get file",
"result_code": 0,
"result_desc": "",
Expand Down
16 changes: 8 additions & 8 deletions src/tests/unit/test_live_response_api.py
Original file line number Diff line number Diff line change
Expand Up @@ -465,7 +465,7 @@ def test_get_file(cbcsdk_mock, connection_mock):
cbcsdk_mock.mock_request('GET', '/appservices/v6/orgs/test/devices/2468', DEVICE_RESPONSE)
cbcsdk_mock.mock_request('POST', '/appservices/v6/orgs/test/liveresponse/sessions/1:2468/commands',
GET_FILE_COMMAND_RESP)
cbcsdk_mock.mock_request('GET', '/appservices/v6/orgs/test/liveresponse/sessions/1:2468/commands/7',
cbcsdk_mock.mock_request('GET', '/appservices/v6/orgs/test/liveresponse/sessions/1:2468/commands/0',
GET_FILE_END_RESP)
cbcsdk_mock.mock_request('DELETE', '/appservices/v6/orgs/test/liveresponse/sessions/1:2468', None)
manager = LiveResponseSessionManager(cbcsdk_mock.api)
Expand All @@ -480,7 +480,7 @@ def test_get_file_cancelled(cbcsdk_mock, connection_mock):
cbcsdk_mock.mock_request('GET', '/appservices/v6/orgs/test/devices/2468', DEVICE_RESPONSE)
cbcsdk_mock.mock_request('POST', '/appservices/v6/orgs/test/liveresponse/sessions/1:2468/commands',
GET_FILE_COMMAND_RESP)
cbcsdk_mock.mock_request('GET', '/appservices/v6/orgs/test/liveresponse/sessions/1:2468/commands/7',
cbcsdk_mock.mock_request('GET', '/appservices/v6/orgs/test/liveresponse/sessions/1:2468/commands/0',
GET_FILE_CANCELLED_RESP)
cbcsdk_mock.mock_request('DELETE', '/appservices/v6/orgs/test/liveresponse/sessions/1:2468', None)
manager = LiveResponseSessionManager(cbcsdk_mock.api)
Expand All @@ -497,7 +497,7 @@ def test_get_file_cancelled_async(cbcsdk_mock, connection_mock):
cbcsdk_mock.mock_request('GET', '/appservices/v6/orgs/test/devices/2468', DEVICE_RESPONSE)
cbcsdk_mock.mock_request('POST', '/appservices/v6/orgs/test/liveresponse/sessions/1:2468/commands',
GET_FILE_COMMAND_RESP)
cbcsdk_mock.mock_request('GET', '/appservices/v6/orgs/test/liveresponse/sessions/1:2468/commands/7',
cbcsdk_mock.mock_request('GET', '/appservices/v6/orgs/test/liveresponse/sessions/1:2468/commands/0',
GET_FILE_CANCELLED_RESP)
cbcsdk_mock.mock_request('DELETE', '/appservices/v6/orgs/test/liveresponse/sessions/1:2468', None)
manager = LiveResponseSessionManager(cbcsdk_mock.api)
Expand All @@ -515,13 +515,13 @@ def test_get_file_async(cbcsdk_mock, connection_mock):
cbcsdk_mock.mock_request('GET', '/appservices/v6/orgs/test/devices/2468', DEVICE_RESPONSE)
cbcsdk_mock.mock_request('POST', '/appservices/v6/orgs/test/liveresponse/sessions/1:2468/commands',
GET_FILE_COMMAND_RESP)
cbcsdk_mock.mock_request('GET', '/appservices/v6/orgs/test/liveresponse/sessions/1:2468/commands/7',
cbcsdk_mock.mock_request('GET', '/appservices/v6/orgs/test/liveresponse/sessions/1:2468/commands/0',
GET_FILE_END_RESP)
cbcsdk_mock.mock_request('DELETE', '/appservices/v6/orgs/test/liveresponse/sessions/1:2468', None)
manager = LiveResponseSessionManager(cbcsdk_mock.api)
with manager.request_session(2468) as session:
command_id, _ = session.get_file('c:\\\\test.txt', async_mode=True)
assert command_id == 7
assert command_id == 0


def test_get_raw_file_async(cbcsdk_mock, connection_mock):
Expand All @@ -531,13 +531,13 @@ def test_get_raw_file_async(cbcsdk_mock, connection_mock):
cbcsdk_mock.mock_request('GET', '/appservices/v6/orgs/test/devices/2468', DEVICE_RESPONSE)
cbcsdk_mock.mock_request('POST', '/appservices/v6/orgs/test/liveresponse/sessions/1:2468/commands',
GET_FILE_COMMAND_RESP)
cbcsdk_mock.mock_request('GET', '/appservices/v6/orgs/test/liveresponse/sessions/1:2468/commands/7',
cbcsdk_mock.mock_request('GET', '/appservices/v6/orgs/test/liveresponse/sessions/1:2468/commands/0',
GET_FILE_END_RESP)
cbcsdk_mock.mock_request('DELETE', '/appservices/v6/orgs/test/liveresponse/sessions/1:2468', None)
manager = LiveResponseSessionManager(cbcsdk_mock.api)
with manager.request_session(2468) as session:
command_id, _ = session.get_raw_file('c:\\\\test.txt', async_mode=True)
assert command_id == 7
assert command_id == 0


def test_command_status(cbcsdk_mock):
Expand Down Expand Up @@ -1596,7 +1596,7 @@ def test_get_file_job(cbcsdk_mock, connection_mock):
cbcsdk_mock.mock_request('GET', '/appservices/v6/orgs/test/devices/2468', DEVICE_RESPONSE)
cbcsdk_mock.mock_request('POST', '/appservices/v6/orgs/test/liveresponse/sessions/1:2468/commands',
GET_FILE_COMMAND_RESP)
cbcsdk_mock.mock_request('GET', '/appservices/v6/orgs/test/liveresponse/sessions/1:2468/commands/7',
cbcsdk_mock.mock_request('GET', '/appservices/v6/orgs/test/liveresponse/sessions/1:2468/commands/0',
GET_FILE_END_RESP)
cbcsdk_mock.mock_request('DELETE', '/appservices/v6/orgs/test/liveresponse/sessions/1:2468', None)
manager = LiveResponseSessionManager(cbcsdk_mock.api)
Expand Down

0 comments on commit f8eb4a5

Please sign in to comment.