Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
S
scord
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Package Registry
Model registry
Operate
Environments
Terraform modules
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
eu
ADMIRE
scord
Commits
2c1fdd05
Commit
2c1fdd05
authored
2 years ago
by
Ramon Nou
Browse files
Options
Downloads
Patches
Plain Diff
Added common, rebased with error code
parent
b73f0ac1
No related branches found
Branches containing commit
No related tags found
Tags containing commit
1 merge request
!40
Resolve "Refactor library RPC implementation of `admire::deploy_adhoc_storage`"
Pipeline
#3365
passed
2 years ago
Stage: build
Stage: test
Changes
4
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
examples/cxx/ADM_deploy_adhoc_storage.cpp
+7
-7
7 additions, 7 deletions
examples/cxx/ADM_deploy_adhoc_storage.cpp
src/lib/admire.cpp
+9
-2
9 additions, 2 deletions
src/lib/admire.cpp
src/lib/admire.hpp
+1
-1
1 addition, 1 deletion
src/lib/admire.hpp
src/lib/c_wrapper.cpp
+1
-1
1 addition, 1 deletion
src/lib/c_wrapper.cpp
with
18 additions
and
11 deletions
examples/cxx/ADM_deploy_adhoc_storage.cpp
+
7
−
7
View file @
2c1fdd05
...
...
@@ -24,7 +24,7 @@
#include
<fmt/format.h>
#include
<admire.hpp>
#include
"common.hpp"
int
main
(
int
argc
,
char
*
argv
[])
{
...
...
@@ -37,19 +37,19 @@ main(int argc, char* argv[]) {
}
admire
::
server
server
{
"tcp"
,
argv
[
1
]};
std
::
vector
<
admire
::
node
>
nodes
{
admire
::
node
{
"node1"
},
admire
::
node
{
"node2"
}};
std
::
vector
<
admire
::
node
>
nodes
=
prepare_nodes
(
10
);
admire
::
adhoc_storage
::
resources
res
(
nodes
);
admire
::
adhoc_storage
adhoc_storage
(
admire
::
storage
::
type
::
dataclay
,
"foobar"
,
1
,
admire
::
adhoc_storage
::
execution_mode
::
separate_new
,
admire
::
adhoc_storage
::
access_type
::
read_write
,
res
,
100
,
false
);
admire
::
storage
::
type
::
dataclay
,
"foobar"
,
1
,
admire
::
adhoc_storage
::
execution_mode
::
separate_new
,
admire
::
adhoc_storage
::
access_type
::
read_write
,
res
,
100
,
false
);
ADM_return_t
ret
=
ADM_SUCCESS
;
try
{
ret
=
admire
::
deploy_adhoc_storage
(
server
,
adhoc_storage
);
admire
::
deploy_adhoc_storage
(
server
,
adhoc_storage
);
}
catch
(
const
std
::
exception
&
e
)
{
fmt
::
print
(
stderr
,
"FATAL: ADM_deploy_adhoc_storage() failed: {}
\n
"
,
e
.
what
());
...
...
This diff is collapsed.
Click to expand it.
src/lib/admire.cpp
+
9
−
2
View file @
2c1fdd05
...
...
@@ -283,9 +283,16 @@ remove_adhoc_storage(const server& srv, const adhoc_storage& adhoc_storage) {
}
}
ADM_return_t
void
deploy_adhoc_storage
(
const
server
&
srv
,
const
admire
::
adhoc_storage
&
adhoc_storage
)
{
return
detail
::
deploy_adhoc_storage
(
srv
,
adhoc_storage
);
const
auto
ec
=
detail
::
deploy_adhoc_storage
(
srv
,
adhoc_storage
);
if
(
!
ec
)
{
throw
std
::
runtime_error
(
fmt
::
format
(
"ADM_deploy_adhoc_storage() error: {}"
,
ec
.
message
()));
}
}
ADM_return_t
...
...
This diff is collapsed.
Click to expand it.
src/lib/admire.hpp
+
1
−
1
View file @
2c1fdd05
...
...
@@ -69,7 +69,7 @@ update_adhoc_storage(const server& srv, const adhoc_storage& adhoc_storage,
void
remove_adhoc_storage
(
const
server
&
srv
,
const
adhoc_storage
&
adhoc_storage
);
ADM_return_t
void
deploy_adhoc_storage
(
const
server
&
srv
,
const
adhoc_storage
&
reqs
);
ADM_return_t
...
...
This diff is collapsed.
Click to expand it.
src/lib/c_wrapper.cpp
+
1
−
1
View file @
2c1fdd05
...
...
@@ -129,7 +129,7 @@ ADM_deploy_adhoc_storage(ADM_server_t server, ADM_storage_t adhoc_storage) {
adhoc_storage
->
s_name
,
adhoc_storage
->
s_id
,
adhoc_storage
->
s_adhoc_ctx
};
return
admire
::
deploy_adhoc_storage
(
srv
,
storage
);
return
admire
::
detail
::
deploy_adhoc_storage
(
srv
,
storage
);
}
ADM_return_t
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment