in libazureinit/src/goalstate.rs [223:253]
fn build_report_health_file(goalstate: Goalstate) -> String {
let post_request =
"<?xml version=\"1.0\" encoding=\"utf-8\"?>\n\
<Health xmlns:xsi=\"http://www.w3.org/2001/XMLSchema-instance\" xmlns:xsd=\"http://www.w3.org/2001/XMLSchema\">\n\
<GoalStateIncarnation>$GOAL_STATE_INCARNATION</GoalStateIncarnation>\n\
<Container>\n\
<ContainerId>$CONTAINER_ID</ContainerId>\n\
<RoleInstanceList>\n\
<Role>\n\
<InstanceId>$INSTANCE_ID</InstanceId>\n\
<Health>\n\
<State>Ready</State>\n\
</Health>\n\
</Role>\n\
</RoleInstanceList>\n\
</Container>\n\
</Health>";
let post_request =
post_request.replace("$GOAL_STATE_INCARNATION", &goalstate.incarnation);
let post_request = post_request
.replace("$CONTAINER_ID", &goalstate.container.container_id);
post_request.replace(
"$INSTANCE_ID",
&goalstate
.container
.role_instance_list
.role_instance
.instance_id,
)
}