new EC2 code (still failing/disabled)
This commit is contained in:
parent
ca801799fc
commit
240d2ebdd1
17
src/aws.zig
17
src/aws.zig
|
@ -193,15 +193,16 @@ pub fn Request(comptime action: anytype) type {
|
||||||
});
|
});
|
||||||
defer options.client.allocator.free(query);
|
defer options.client.allocator.free(query);
|
||||||
|
|
||||||
const body = if (Self.service_meta.aws_protocol == .query)
|
// Note: EC2 avoided the Action={s}&Version={s} in the body, but it's
|
||||||
|
// but it's required, so I'm not sure why that code was put in
|
||||||
|
// originally?
|
||||||
|
const body =
|
||||||
try std.fmt.allocPrint(options.client.allocator, "Action={s}&Version={s}{s}{s}", .{
|
try std.fmt.allocPrint(options.client.allocator, "Action={s}&Version={s}{s}{s}", .{
|
||||||
action.action_name,
|
action.action_name,
|
||||||
Self.service_meta.version,
|
Self.service_meta.version,
|
||||||
continuation,
|
continuation,
|
||||||
buffer.items,
|
buffer.items,
|
||||||
})
|
});
|
||||||
else // EC2
|
|
||||||
try std.fmt.allocPrint(options.client.allocator, "{s}", .{buffer.items});
|
|
||||||
defer options.client.allocator.free(body);
|
defer options.client.allocator.free(body);
|
||||||
return try Self.callAws(.{
|
return try Self.callAws(.{
|
||||||
.query = query,
|
.query = query,
|
||||||
|
|
|
@ -169,8 +169,15 @@ pub fn main() anyerror!void {
|
||||||
std.log.err("no functions to work with", .{});
|
std.log.err("no functions to work with", .{});
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
// TODO: This test fails with broken LLVM module
|
||||||
.ec2_query_no_input => {
|
.ec2_query_no_input => {
|
||||||
std.log.err("EC2 Test disabled due to compiler bug", .{});
|
std.log.err("EC2 Test disabled due to compiler bug", .{});
|
||||||
|
// Describe regions is a simpler request and easier to debug
|
||||||
|
// const instances = try client.call(services.ec2.describe_regions.Request{}, options);
|
||||||
|
// defer instances.deinit();
|
||||||
|
// std.log.info("region count: {d}", .{instances.response.regions.?.len});
|
||||||
|
|
||||||
|
// Describe instances is more interesting
|
||||||
// const instances = try client.call(services.ec2.describe_instances.Request{}, options);
|
// const instances = try client.call(services.ec2.describe_instances.Request{}, options);
|
||||||
// defer instances.deinit();
|
// defer instances.deinit();
|
||||||
// std.log.info("reservation count: {d}", .{instances.response.reservations.len});
|
// std.log.info("reservation count: {d}", .{instances.response.reservations.len});
|
||||||
|
|
Loading…
Reference in New Issue
Block a user