forked from aws/aws-sdk-cpp
-
Notifications
You must be signed in to change notification settings - Fork 1
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 aws#59 in VFS/bamboos from VFS-1269-docker-environ…
…ment-refactor to develop # By Piotr Ociepka # Via Piotr Ociepka (6) and Michał Wrzeszcz (1) * commit 'df968334e4ea1b1c5724fac67f4b30d3372464ea': (31 commits) Switch to CouchBase in example environments. Remove obsolete files in example_env. Even better error handling. Safe calls in escript, logs from escript. Update example_env file. Make acceptance tests work. Use Erlang cookie defined in env.json file while creating provider spaces. Refactor Directory structure for new client description. Refactor. Update example environemnt descriptions. Handle key- and cert-files. Refator. Remove obsolete escript. Move storage creation to dedicated function. Move storage creation to dedicated function. Refactor. Move hardcoded docker path to global variable. Refactor. get_token.escript ...
- Loading branch information
Showing
8 changed files
with
297 additions
and
54 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
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,23 @@ | ||
#!/usr/bin/env escript | ||
%%! -name create_storage@test_env | ||
|
||
main([Cookie, Node, Name, Path]) -> | ||
erlang:set_cookie(node(), list_to_atom(Cookie)), | ||
NodeAtom = list_to_atom(Node), | ||
Helper = safe_call(NodeAtom, fslogic_storage, new_helper_init, [<<"DirectIO">>, #{<<"root_path">> => list_to_binary(Path)}]), | ||
Storage = safe_call(NodeAtom, fslogic_storage, new_storage, [list_to_binary(Name), [Helper]]), | ||
safe_call(NodeAtom, storage, create, [Storage]). | ||
|
||
safe_call(Node, Module, Function, Args) -> | ||
case rpc:call(Node, Module, Function, Args) of | ||
{badrpc, X} -> | ||
io:format(standard_error, "ERROR: in module ~p:~n {badrpc, ~p} in rpc:call(~p, ~p, ~p, ~p).~n", | ||
[?MODULE, X, Node, Module, Function, Args]), | ||
halt(42); | ||
{error, X} -> | ||
io:format(standard_error, "ERROR: in module ~p:~n {error, ~p} in rpc:call(~p, ~p, ~p, ~p).~n", | ||
[?MODULE, X, Node, Module, Function, Args]), | ||
halt(42); | ||
X -> | ||
X | ||
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 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
Oops, something went wrong.