Skip to content

Preconfig code example missing parameter for serial_number to match against appliance serial #12

@zachcamara-hpe

Description

@zachcamara-hpe

The preconfig generator example looks for a column in CSV file for serial_number, however, it doesn't use the data when saving the preconfig on Orchestrator to match against an appliance

        # Set value for serial number if provided
        appliance_serial = row.get("serial_number")
        if appliance_serial is None:
            appliance_serial = ""
        else:
            pass

When orch.create_preconfig() is called, it doesn't assign this to the parameter serial_number:

                orch.create_preconfig(
                    preconfig_name=row["hostname"],
                    yaml_preconfig=yaml_preconfig,
                    auto_apply=auto_apply,
                    tag=row["hostname"],
                    ### MISSING -- serial_number = appliance_serial,
                    comment=f"Created/Uploaded @ {comment_timestamp}",
                )

Metadata

Metadata

Labels

bugSomething isn't workingdocumentationImprovements or additions to documentation

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions