APIPythonOpen-Source Solutions

 View Only
  • 1.  network throughput test using delphixpy

    Posted 02-01-2019 04:35:00 PM
    I am using delphixpy to perform throughput test. I am able to successfully perform latency test for the given host using delphixpy. 
    But i am getting type error when I assign remote_host to NetworkThroughputTestParameters..
    anyone can help me here?
    thanks in advance.



  • 2.  RE: network throughput test using delphixpy

    Posted 02-01-2019 05:01:00 PM
    Hi Guru,Can you share your code block and exact error?Cheers,Scott.


  • 3.  RE: network throughput test using delphixpy

    Posted 02-01-2019 05:14:00 PM
    Scott, 
    I tried with couple of options. I am posting all of them here with respective error messages.. i am missing something here..
    Let me know if any additional details required. 

    -------attempt1------
    network_test_param_objtx = NetworkThroughputTestParameters()
    network_test_param_objtx.remoteHost = "host1"
    try:
        throughput.create(dx_session_obj.server_session,network_test_param_objtx)
    ERROR: #'The field "{0}" is required.'
    ------attempt2------------
    hst = Host()
    hst.address = "host1"
    network_test_param_objtx = NetworkThroughputTestParameters()
    network_test_param_objtx.remoteHost = hst 
    try:
        throughput.create(dx_session_obj.server_session,network_test_param_objtx)
    ERROR: #'The field "{0}" is required.'
    --------attempt3-------------------------
    network_test_param_objtx = NetworkThroughputTestParameters()
    network_test_param_objtx.remote_host = "host1"
    try:
        throughput.create(dx_session_obj.server_session,network_test_param_objtx)
    ERROR:The provided string "host1" is not a valid object reference.'

    ================
    definition of remote_host in NetworkThroughputTestParameters.py; expects string value, but validates against objectReference. 
    ---------
            if obj._remote_host[0] is not None and obj._remote_host[0] is not obj.__undef__:
                assert isinstance(obj._remote_host[0], basestring), ("Expected one of [u'string'], but got %s" % type(obj._remote_host[0]))
                common.validate_format(obj._remote_host[0], "objectReference", None, None)
    ---------



  • 4.  RE: network throughput test using delphixpy
    Best Answer

    Posted 02-05-2019 10:30:00 AM
    Hi Guru,

    Ah I see. Per the API docs, the parameter "remoteHost" in a NetworkThroughputTestParameters object should be a Reference to a Host. This is not the hostname, this is the object name, which will have the form "HOST-nnn" where nnn is an integer ID number. For example "HOST-12". If you replace the hostname "host1" with it's corresponding reference this should work.

    Many Thanks,

    Scott.


  • 5.  RE: network throughput test using delphixpy

    Posted 02-11-2019 05:51:00 PM
    sorry for delayed reply. 

    yes. it is working after using host_object.reference after retrieving host list from engine.