Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
P
PID Migrator
Manage
Activity
Members
Labels
Plan
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Locked files
Deploy
Package registry
Container registry
Model registry
Operate
Environments
Terraform modules
Analyze
Value stream analytics
Contributor analytics
Repository analytics
Code review analytics
Insights
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
GitLab community forum
Contribute to GitLab
Provide feedback
Terms and privacy
Keyboard shortcuts
?
Snippets
Groups
Projects
This is an archived project. Repository and other project resources are read-only.
Show more breadcrumbs
Coscine
backend
scripts
PID Migrator
Commits
dc769cf9
Commit
dc769cf9
authored
Nov 21, 2022
by
Benedikt Heinrichs
Browse files
Options
Downloads
Patches
Plain Diff
Make output cleaner
parent
5a8da699
Branches
Branches containing commit
No related tags found
No related merge requests found
Changes
1
Pipelines
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
src/PIDMigrator/Program.cs
+21
-25
21 additions, 25 deletions
src/PIDMigrator/Program.cs
with
21 additions
and
25 deletions
src/PIDMigrator/Program.cs
+
21
−
25
View file @
dc769cf9
...
...
@@ -30,12 +30,14 @@ public static class Program
Console
.
WriteLine
(
$"- Searching for PIDs containing \"
{
hostUrl
}
\" ..."
);
var
pidMatches
=
epicClient
.
Search
(
$"*
{
hostUrl
}
*"
);
// Define as wildcard with *<text>*
Console
.
WriteLine
(
$"- Search yelded
{
pidMatches
.
Count
()}
results"
);
Console
.
WriteLine
(
$"- Search y
i
elded
{
pidMatches
.
Count
()}
results"
);
Console
.
WriteLine
();
Console
.
WriteLine
(
$"Iterating through
{
pidMatches
.
Count
()}
PIDs\n"
);
foreach
(
var
pidMatch
in
pidMatches
)
{
if
(
pidMatch
.
EpicPid
!=
""
)
{
Console
.
WriteLine
(
$"┌ PID \"
{
pidMatch
.
EpicPid
}
\""
);
// Get it from the EpicClient
...
...
@@ -50,11 +52,12 @@ public static class Program
return
false
;
}))
{
Console
.
WriteLine
(
$"└ PID already up to date
, or NOT a Coscine PID
. Skipping.\n"
);
Console
.
WriteLine
(
$"└ PID already up to date. Skipping.\n"
);
continue
;
}
MigratePid
(
pidMatch
.
EpicPid
,
"<UNKNOWN>"
,
true
,
"unclassified"
);
MigratePid
(
pidMatch
.
EpicPid
);
}
}
Console
.
WriteLine
();
...
...
@@ -78,15 +81,8 @@ public static class Program
return
_epicClient
;
}
public
static
void
MigratePid
(
string
pid
,
string
displayName
,
bool
isDeleted
,
string
type
)
{
Console
.
Write
(
$"├ Is a "
);
if
(
isDeleted
)
public
static
void
MigratePid
(
string
pid
)
{
Console
.
Write
(
$"DELETED "
);
}
Console
.
WriteLine
(
$"
{
type
}
with display name \"
{
displayName
}
\""
);
try
{
EpicUtil
.
UpdatePID
(
pid
,
_configuration
,
_dummyMode
);
...
...
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