Closed heindsight closed 1 year ago
I'm so sorry for the late reply on this and greatly appreciate you taking the time to improve the packer plugin! I've had a ton of travel, personal things and my contributions to another project have been taking up my time.
I plan to look at this within the next week or two!
@heindsight sorry for the late follow up! I'm trying to work through the backlog of PRs and I've opened #63 to follow up with this.
There was a recent change that fixed the bug you were working on, so this new PR will only focus on the default SR fallback you implemented. There are some additional changes needed since the config structure still thinks that sr_iso_name
is a required field. I'm working on fixing that and doing the final testing.
The
GetISOSR
function was usingconfig.SrName
instead ofconfig.ISOSrName
to look up the ISO SR, resulting in using the wrong SR. In addition to fixing this bug, I've also made thesr_iso_name
config optional (defaulting to the default SR for the pool).To get the pool default SR, I've had to work around a compatibility issue with newer XenAPI version in go-xen-api-client. In particular, some values for the pool
allowed_operations
are not recognised, resulting in a parse error when retrieving pool records. The workaround is to work with pool refs instead of pool records.