-
Notifications
You must be signed in to change notification settings - Fork 62
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #100 from JuliaCloud/tan/misc
generated SQS and EC2 API clients
- Loading branch information
Showing
23 changed files
with
15,467 additions
and
13,645 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,13 +1,43 @@ | ||
using Compat | ||
using LightXML | ||
|
||
# define placeholder types | ||
type AWSEnv end | ||
|
||
include("../src/codegen.jl") | ||
include("autoscaling_gen_types.jl") | ||
include("../src/autoscaling_spec.jl") | ||
|
||
const DIR = dirname(@__FILE__) | ||
const SRCDIR = joinpath(DIR, "..", "src") | ||
|
||
info("generating autoscaling apis...") | ||
generate_types(joinpath(SRCDIR, "autoscaling_types.jl"), "AutoScalingTypeDict", AutoScalingTypes) | ||
generate_apis(joinpath(SRCDIR, "autoscaling_operations.jl"), "AutoScalingTypeDict", AutoScalingApi) | ||
const SPEC_NAMES = [ | ||
"AutoScaling", | ||
"SQS", | ||
"EC2" | ||
] | ||
|
||
function do_gen(spec_name::String, includes::Vector{String}, out_types_file::String, out_operations_file::String) | ||
map(include, includes) | ||
|
||
info("generating ", spec_name, " types...") | ||
generate_types(out_types_file, "$(spec_name)TypeDict", eval(Symbol("$(spec_name)Types"))) | ||
|
||
info("generating ", spec_name, " apis...") | ||
generate_apis(out_operations_file, "$(spec_name)TypeDict", eval(Symbol("$(spec_name)Api"))) | ||
end | ||
|
||
function gen_all() | ||
for spec_name in SPEC_NAMES | ||
lower_spec_name = lowercase(spec_name) | ||
spec_file = joinpath("..", "src", lower_spec_name * "_spec.jl") | ||
placeholder_types_file = lower_spec_name * "_gen_types.jl" | ||
out_types_file = joinpath(SRCDIR, "$(lower_spec_name)_types.jl") | ||
out_operations_file = joinpath(SRCDIR, "$(lower_spec_name)_operations.jl") | ||
|
||
pid = addprocs(1)[1] | ||
remotecall_fetch(include, pid, @__FILE__) | ||
remotecall_fetch(do_gen, pid, spec_name, [placeholder_types_file, spec_file], out_types_file, out_operations_file) | ||
rmprocs(pid) | ||
end | ||
end | ||
|
||
(length(ARGS) > 0) && (ARGS[1] == "gen_all") && gen_all() |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
type BatchResultErrorEntry end | ||
type ChangeMessageVisibilityBatchRequestEntry end | ||
type ChangeMessageVisibilityBatchResultEntry end | ||
type DeleteMessageBatchRequestEntry end | ||
type DeleteMessageBatchResultEntry end | ||
type Message end | ||
type MessageAttributeValue end | ||
type SendMessageBatchRequestEntry end | ||
type SendMessageBatchResultEntry end |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file was deleted.
Oops, something went wrong.
Oops, something went wrong.