Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Remove requirement for python-future #45

Open
wants to merge 2 commits into
base: devel
Choose a base branch
from
Open
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
29 changes: 14 additions & 15 deletions omdrivers/lifecycle/iDRAC/iDRACConfig.py
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,6 @@
from omsdk.simulator.devicesim import Simulator
from omdrivers.lifecycle.iDRAC.SCPParsers import XMLParser
from omdrivers.lifecycle.iDRAC.RAIDHelper import RAIDHelper
from past.builtins import long
import sys
import logging
import tempfile
Expand Down Expand Up @@ -2130,24 +2129,24 @@ def format_enum_wsman(enval):
]},
"Args": {
"file_type": FileTypeEnum,
"in_session_id": long,
"in_session_id": int,
"chunk_size": type(1),
"file_size": long,
"file_size": int,
"txfr_descriptor": TxfrDescriptorEnum,
"payload": type(""),
"crc": type(""),
"payload_encoding": PayLoadEncodingEnum
},
"Return": {
"SessionID": long
"SessionID": int
},
"Parameters": [
("ChunkSize", "chunk_size", None, int, None),
("FileType", "file_type", None, FileTypeEnum, None),
# ("ImportFileName", "filename", None, ResetForceEnum, None),
("InSessionID", "in_session_id", None, long, None),
("InSessionID", "in_session_id", None, int, None),
("CRC", "crc", None, str, None),
("FileSize", "file_size", None, long, None),
("FileSize", "file_size", None, int, None),
("TxfrDescriptor", "txfr_descriptor", None, TxfrDescriptorEnum, None),
("PayLoad", "payload", None, str, None),
("PayLoadEncoding", "payload_encoding", None, PayLoadEncodingEnum, None)
Expand All @@ -2165,27 +2164,27 @@ def format_enum_wsman(enval):
]},
"Args": {
"file_type": FileTypeEnum,
"in_session_id": long,
"in_session_id": int,
"in_chunk_size": type(1),
"file_offset": long,
"tx_data_size": long,
"file_offset": int,
"tx_data_size": int,
"payload_encoding": PayLoadEncodingEnum
},
"Return": {
"file_size": long,
"file_size": int,
"txfr_descriptor": TxfrDescriptorEnum,
"payload": type(""),
"crc": type(""),
"chunk_size": type(1),
"session_id": type(""),
"ret_file_offset": long,
"ret_tx_data_size": long
"ret_file_offset": int,
"ret_tx_data_size": int
},
"Parameters": [
("FileOffset", "file_offset", None, long, None),
("TxDataSize", "tx_data_size", None, long, None),
("FileOffset", "file_offset", None, int, None),
("TxDataSize", "tx_data_size", None, int, None),
("FileType", "file_type", None, FileTypeEnum, None),
("InSessionID", "in_session_id", None, long, None),
("InSessionID", "in_session_id", None, int, None),
("InChunkSize", "in_chunk_size", None, int, None),
("PayLoadEncoding", "payload_encoding", None, PayLoadEncodingEnum, None),
]
Expand Down
25 changes: 12 additions & 13 deletions omdrivers/lifecycle/iDRAC/iDRACStreaming.py
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,6 @@
from omsdk.sdkprint import Prettifyer
from omsdk.sdkcenum import EnumWrapper
from omdrivers.enums.iDRAC.iDRACEnums import *
from past.builtins import long

logger = logging.getLogger(__name__)

Expand Down Expand Up @@ -234,9 +233,9 @@ def export_data(self, file_type=FileTypeEnum.SystemConfigXML, export_file="", **
# Export the first chunk of data
logger.debug("Exporting the first Chunk...")

session_id = long(0)
file_offset = long(0)
tx_data_size = long(0)
session_id = int(0)
file_offset = int(0)
tx_data_size = int(0)

export_data_resp = self._config_mgr.export_data(
file_type=file_type,
Expand All @@ -258,9 +257,9 @@ def export_data(self, file_type=FileTypeEnum.SystemConfigXML, export_file="", **

crc = export_data_output["CRC"]
payload = export_data_output["PayLoad"]
ret_file_offset = long(export_data_output["RetFileOffset"])
ret_tx_Data_size = long(export_data_output["RetTxDataSize"])
session_id = long(export_data_output["SessionID"])
ret_file_offset = int(export_data_output["RetFileOffset"])
ret_tx_Data_size = int(export_data_output["RetTxDataSize"])
session_id = int(export_data_output["SessionID"])
txfr_descriptor = export_data_output["TxfrDescriptor"]

payloads_list = list()
Expand Down Expand Up @@ -290,9 +289,9 @@ def export_data(self, file_type=FileTypeEnum.SystemConfigXML, export_file="", **

# chunk_size = export_data_output["ChunkSize"]
payload = export_data_output["PayLoad"]
ret_file_offset = long(export_data_output["RetFileOffset"])
ret_tx_Data_size = long(export_data_output["RetTxDataSize"])
session_id = long(export_data_output["SessionID"])
ret_file_offset = int(export_data_output["RetFileOffset"])
ret_tx_Data_size = int(export_data_output["RetTxDataSize"])
session_id = int(export_data_output["SessionID"])
txfr_descriptor = export_data_output["TxfrDescriptor"]

payloads_list.append(payload)
Expand Down Expand Up @@ -366,7 +365,7 @@ def import_data(self, import_file_type=FileTypeEnum.SystemConfigXML, import_file

import_data = import_file_content.encode("utf-8")

file_size = long(len(import_data))
file_size = int(len(import_data))

clear_transfer_session_resp = self._config_mgr.clear_transfer_session(
file_operation=FileOperationEnum.Import,
Expand Down Expand Up @@ -403,7 +402,7 @@ def import_data(self, import_file_type=FileTypeEnum.SystemConfigXML, import_file
logger.debug(payload_chunks)

number_of_chunks = len(payload_chunks)
session_id = long(0)
session_id = int(0)

# Import the Base64 Encoded Config XML data chunk-by-chunk
for count in range(1, number_of_chunks + 1):
Expand Down Expand Up @@ -439,7 +438,7 @@ def import_data(self, import_file_type=FileTypeEnum.SystemConfigXML, import_file
import_chunk_resp["Message"]
}

session_id = long(import_chunk_resp["Data"]["ImportData_OUTPUT"]["SessionID"])
session_id = int(import_chunk_resp["Data"]["ImportData_OUTPUT"]["SessionID"])

# Import the last chunk
elif count == number_of_chunks:
Expand Down
3 changes: 1 addition & 2 deletions requirements-python2x.txt
Original file line number Diff line number Diff line change
Expand Up @@ -3,5 +3,4 @@ pyasn1>=0.4.4
enum34>=1.1.6
requests>=2.12.3
PyYAML>=3.12
future>=0.16.0
pysnmp_mibs>=0
pysnmp_mibs>=0
2 changes: 1 addition & 1 deletion requirements-python3x.txt
Original file line number Diff line number Diff line change
Expand Up @@ -4,4 +4,4 @@ PyYAML>=3.12
future>=0.16.0
pysnmp_mibs>=0
pywinrm
urllib3
urllib3
1 change: 0 additions & 1 deletion setup-omsdk.py
Original file line number Diff line number Diff line change
Expand Up @@ -107,7 +107,6 @@
"enum34; python_version<'3.4'",
"requests>=2.12.3",
"PyYAML>=3.12",
"future>=0.16.0",
"pysnmp_mibs>=0",
"ipaddress>=0"
],
Expand Down
1 change: 0 additions & 1 deletion setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,6 @@ def installReqFn():
'python_version<3.4',
'requests>=2.12.3',
'PyYAML>=3.12',
'future>=0.16.0',
'pysnmp_mibs>=0',
'ipaddress>=0'
]
Expand Down