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

Configure lag on existing DVS #1059

Open
sarojabkhpe opened this issue Dec 20, 2023 · 0 comments
Open

Configure lag on existing DVS #1059

sarojabkhpe opened this issue Dec 20, 2023 · 0 comments
Labels

Comments

@sarojabkhpe
Copy link

sarojabkhpe commented Dec 20, 2023

Describe the bug

While configuring lag in passive mode on a existing DVS switch, method not found exception was caught, even though the method has been defined in the class.
Exception details:
(vmodl.fault.MethodNotFound) {
dynamicType = ,
dynamicProperty = (vmodl.DynamicProperty) [],
msg = ,
faultCause = ,
faultMessage = (vmodl.LocalizableMessage) [],
receiver = 'vim.dvs.VmwareDistributedVirtualSwitch:dvs-73',
method = 'UpdateLacpGroupConfig'
}

Reproduction steps

def create_lag(si, dvsName, lagName, numberOfUplinks):
try:
dvs_vim_type = [vim.DistributedVirtualSwitch]
vds = get_obj(si,dvs_vim_type,dvsName)
except Exception as e:
print(e)
return None

#create lacp in passive mode
try:     

    lacpGroupSpec_0 = vim.dvs.VmwareDistributedVirtualSwitch.LacpGroupSpec()
    lacpGroupSpec_0.lacpGroupConfig = vim.dvs.VmwareDistributedVirtualSwitch.LacpGroupConfig()
    lacpGroupSpec_0.lacpGroupConfig.mode = 'passive'
    lacpGroupSpec_0.lacpGroupConfig.ipfix = vim.dvs.VmwareDistributedVirtualSwitch.LagIpfixConfig()
    lacpGroupSpec_0.lacpGroupConfig.loadbalanceAlgorithm = 'srcDestIpTcpUdpPortVlan'
    lacpGroupSpec_0.lacpGroupConfig.vlan = vim.dvs.VmwareDistributedVirtualSwitch.LagVlanConfig()
    lacpGroupSpec_0.lacpGroupConfig.name = 'vsan_lag'
    #lacpGroupSpec_0.lacpGroupConfig.timeoutMode = 'slow'
    lacpGroupSpec_0.lacpGroupConfig.uplinkNum = 2
    lacpGroupSpec_0.operation = 'add'
    lacpGroupSpec = [lacpGroupSpec_0]
    task = vds.UpdateDVSLacpGroupConfig_Task(lacpGroupSpec)
    # The attributes of lacpGroupConfig includes: 'dynamicProperty', 'dynamicType', 'ipfix', 'key', 'loadbalanceAlgorithm', 'mode', 'name', 'uplinkName', 'uplinkNum', 'uplinkPortKey', 'vlan'
    # this list does not contain timeoutMode. As default value for timeout mode is slow, ignoring this for now
    # TO DO : how to set the timeoutMode should be explored

    state, result = wait_for_task(task)
    if not state:
        print(result)
        exit()       
    return result
except Exception as e:
    print(e)
    return None

Obtained similar result when task = vds.UpdateLacpGroupConfig(lacpGroupSpec) was used.

Expected behavior

  1. Exception should have fault cause and fault message set to an appropriate value that describes the nature of the fault.
  2. Clear instructions of what pre-requisites needs to be set should be documented.

Additional context

Please note that the main logic of the code was generated using the developer center's code capture feature

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

1 participant