Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
P
pve-manager
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Administrator
pve-manager
Commits
204355df
Commit
204355df
authored
Oct 25, 2011
by
Dietmar Maurer
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
allow to filter specific resource types
parent
3a1d95cc
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
72 additions
and
60 deletions
+72
-60
Cluster.pm
PVE/API2/Cluster.pm
+72
-60
No files found.
PVE/API2/Cluster.pm
View file @
204355df
...
...
@@ -112,7 +112,13 @@ __PACKAGE__->register_method({
permissions
=>
{
user
=>
'
all
'
},
parameters
=>
{
additionalProperties
=>
0
,
properties
=>
{},
properties
=>
{
type
=>
{
type
=>
'
string
',
optional
=>
1
,
enum
=>
['
vm
',
'
storage
',
'
node
'],
},
},
},
returns
=>
{
type
=>
'
array
',
...
...
@@ -140,9 +146,11 @@ __PACKAGE__->register_method({
# we try to generate 'numbers' by using "$X + 0"
if
(
!
$param
->
{
type
}
||
$param
->
{
type
}
eq
'
vm
')
{
foreach
my
$vmid
(
keys
%
$idlist
)
{
my
$data
=
$idlist
->
{
$vmid
};
next
if
!
$rpcenv
->
check
(
$user
,
"
/vms/
$vmid
",
[
'
VM.Audit
'
]);
my
$entry
=
{
...
...
@@ -167,7 +175,9 @@ __PACKAGE__->register_method({
push
@$res
,
$entry
;
}
}
if
(
!
$param
->
{
type
}
||
$param
->
{
type
}
eq
'
node
')
{
foreach
my
$node
(
@$nodelist
)
{
my
$entry
=
{
id
=>
"
node/
$node
",
...
...
@@ -189,9 +199,11 @@ __PACKAGE__->register_method({
$entry
->
{
maxdisk
}
=
(
$d
->
[
10
]
||
0
)
+
0
;
}
push
@$res
,
$entry
;
}
}
if
(
!
$param
->
{
type
}
||
$param
->
{
type
}
eq
'
storage
')
{
my
$cfg
=
PVE::Storage::
config
();
my
@sids
=
PVE::Storage::
storage_ids
(
$cfg
);
...
...
@@ -215,7 +227,7 @@ __PACKAGE__->register_method({
}
push
@$res
,
$entry
;
}
}
}
...
...
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