Skip to content

Modified the VdiAndSrOps test so it actually does something for VDIs.#49

Merged
kc284 merged 1 commit intoxenserver:masterfrom
kc284:java
Apr 9, 2026
Merged

Modified the VdiAndSrOps test so it actually does something for VDIs.#49
kc284 merged 1 commit intoxenserver:masterfrom
kc284:java

Conversation

@kc284
Copy link
Copy Markdown
Contributor

@kc284 kc284 commented Aug 28, 2025

No description provided.

}
}
}
return null;
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

If return null, the var vdiRec = newVdiRecord(sr); will raise error.

break;
case "VDI.snapshot":
dummy.snapshot(c, driverParams);
vdi = VDI.getByNameLabel(c, TEST_VDI_NAME).iterator().next();
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

There may have an issue when VDI.getByNameLabel return [] ?

return vdiRec;
}

private SR findSrForVdi(Connection c) throws IOException {
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Seems no IOException ?

Copy link
Copy Markdown
Contributor

@xueqingz xueqingz Dec 31, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

what about

private SR findSrForVdi(Connection c) throws Exception {
   ...
   for(){ ...  }

  throw new Exception("No suitable SR found for VDI creation");
}

Signed-off-by: Konstantina Chremmou <konstantina.chremmou@cloud.com>

package com.xensource.xenapi.samples;

import java.io.IOException;
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

can be removed.

@kc284 kc284 merged commit a2fc232 into xenserver:master Apr 9, 2026
@kc284 kc284 deleted the java branch April 9, 2026 13:37
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants