Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
cta
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
Container registry
Harbor 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
dCache
cta
Commits
ca4b2e6e
Commit
ca4b2e6e
authored
9 years ago
by
Daniele Kruse
Browse files
Options
Downloads
Patches
Plain Diff
Added create and delete storage class methods in castorns
parent
43dc6bcd
Branches
Branches containing commit
Tags
Tags containing commit
No related merge requests found
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
nameserver/CastorNameServer.cpp
+18
-0
18 additions, 0 deletions
nameserver/CastorNameServer.cpp
nameserver/CastorNameServer.hpp
+4
-0
4 additions, 0 deletions
nameserver/CastorNameServer.hpp
with
22 additions
and
0 deletions
nameserver/CastorNameServer.cpp
+
18
−
0
View file @
ca4b2e6e
...
...
@@ -35,6 +35,24 @@
#include
"Cns_api.h"
//------------------------------------------------------------------------------
// createStorageClass
//------------------------------------------------------------------------------
void
cta
::
CastorNameServer
::
createStorageClass
(
const
SecurityIdentity
&
requester
,
const
std
::
string
&
name
,
const
uint16_t
nbCopies
)
{
struct
Cns_fileclass
fc
;
bzero
(
&
fc
,
sizeof
(
struct
Cns_fileclass
));
strncpy
(
fc
.
name
,
name
.
c_str
(),
CA_MAXCLASNAMELEN
);
fc
.
nbcopies
=
nbCopies
;
cta
::
exception
::
Errnum
::
throwOnMinusOne
(
Cns_enterclass
(
const_cast
<
char
*>
(
m_server
.
c_str
()),
&
fc
),
__FUNCTION__
);
}
//------------------------------------------------------------------------------
// deleteStorageClass
//------------------------------------------------------------------------------
void
cta
::
CastorNameServer
::
deleteStorageClass
(
const
SecurityIdentity
&
requester
,
const
std
::
string
&
name
)
{
cta
::
exception
::
Errnum
::
throwOnMinusOne
(
Cns_deleteclass
(
const_cast
<
char
*>
(
m_server
.
c_str
()),
0
,
const_cast
<
char
*>
(
name
.
c_str
())),
__FUNCTION__
);
}
//------------------------------------------------------------------------------
// regularFileExists
//------------------------------------------------------------------------------
...
...
This diff is collapsed.
Click to expand it.
nameserver/CastorNameServer.hpp
+
4
−
0
View file @
ca4b2e6e
...
...
@@ -74,6 +74,10 @@ public:
std
::
string
getVidOfFile
(
const
SecurityIdentity
&
requester
,
const
std
::
string
&
path
,
const
uint16_t
copyNb
)
const
;
void
assertStorageClassIsNotInUse
(
const
SecurityIdentity
&
requester
,
const
std
::
string
&
storageClass
,
const
std
::
string
&
path
)
const
;
void
createStorageClass
(
const
SecurityIdentity
&
requester
,
const
std
::
string
&
name
,
const
uint16_t
nbCopies
);
void
deleteStorageClass
(
const
SecurityIdentity
&
requester
,
const
std
::
string
&
name
);
private:
...
...
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