Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
S
switch-wayf
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Service Desk
Milestones
Merge Requests
1
Merge Requests
1
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Operations
Operations
Incidents
Environments
Packages & Registries
Packages & Registries
Container Registry
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
GIP RENATER
switch-wayf
Commits
b4865866
Commit
b4865866
authored
Jun 25, 2018
by
Guillaume Rousse
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
add --min-sp-quota and --min-idp-quota options
parent
8a774ff4
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
22 additions
and
0 deletions
+22
-0
bin/update-metadata.php
bin/update-metadata.php
+22
-0
No files found.
bin/update-metadata.php
View file @
b4865866
...
...
@@ -30,7 +30,11 @@ Argument Description
--metadata-idp-file <file> File containing Service Providers
--metadata-sp-file <file> File containing Identity Providers
--min-idp-count <count> Minimum expected number of IdPs in metadata
--min-idp-quota <quota> Minimum expected number of IdPs in metadata,
as a percentage of current number
--min-sp-count <count> Minimum expected number of SPs in metadata
--min-sp-quota <quoat> Minimum expected number of SPs in metadata,
as a percentage of current number
--language <locale> Language locale, e.g. 'en', 'jp', ...
--verbose | -v Verbose mode
--help | -h Print this man page
...
...
@@ -50,7 +54,9 @@ $longopts = array(
"metadata-idp-file:"
,
"metadata-sp-file:"
,
"min-idp-count:"
,
"min-idp-quota:"
,
"min-sp-count:"
,
"min-sp-quota:"
,
"language:"
,
"verbose"
,
"help"
,
...
...
@@ -90,6 +96,14 @@ if (isset($options['min-sp-count'])) {
}
else
{
$minSPCount
=
$options
[
'min-sp-count'
];
}
}
elseif
(
isset
(
$options
[
'min-sp-quota'
]))
{
if
(
!
is_numeric
(
$options
[
'min-sp-quota'
]))
{
exit
(
"Exiting: invalid value for --min-sp-quota parameter
\n
"
);
}
else
{
require_once
(
$metadataSPFile
);
$SPCount
=
count
(
$metadataSProviders
);
$minSPCount
=
floor
(
$SPCount
*
$options
[
'min-sp-quota'
]
/
100
);
}
}
else
{
$minSPCount
=
0
;
}
...
...
@@ -100,6 +114,14 @@ if (isset($options['min-idp-count'])) {
}
else
{
$minIDPCount
=
$options
[
'min-idp-count'
];
}
}
elseif
(
isset
(
$options
[
'min-idp-quota'
]))
{
if
(
!
is_numeric
(
$options
[
'min-idp-quota'
]))
{
exit
(
"Exiting: invalid value for --min-idp-quota parameter
\n
"
);
}
else
{
require_once
(
$metadataIDPFile
);
$IDPCount
=
count
(
$metadataIDProviders
);
$minIDPCount
=
floor
(
$IDPCount
*
$options
[
'min-idp-quota'
]
/
100
);
}
}
else
{
$minIDPCount
=
0
;
}
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment