Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
fabio martelli
syncope
Commits
f53bb5d0
Commit
f53bb5d0
authored
Jan 17, 2017
by
Gianluca Filippone
Browse files
Updated EE virtual machines table
parent
720f62b1
Changes
10
Hide whitespace changes
Inline
Side-by-side
choremocks/nb-configuration.xml
0 → 100644
View file @
f53bb5d0
<?xml version="1.0" encoding="UTF-8"?>
<project-shared-configuration>
<!--
This file contains additional configuration written by modules in the NetBeans IDE.
The configuration is intended to be shared among all the users of project and
therefore it is assumed to be part of version control checkout.
Without this configuration present, some functionality in the IDE may be limited or fail altogether.
-->
<properties
xmlns=
"http://www.netbeans.org/ns/maven-properties-data/1"
>
<!--
Properties that influence various parts of the IDE, especially code formatting and the like.
You can copy and paste the single properties, into the pom.xml file and the IDE will pick them up.
That way multiple projects can share the same settings (useful for formatting rules for example).
Any value defined here will override the pom.xml file value but is only applicable to the current project.
-->
<org-netbeans-modules-maven-jaxws.rest_2e_config_2e_type>
ide
</org-netbeans-modules-maven-jaxws.rest_2e_config_2e_type>
</properties>
</project-shared-configuration>
choremocks/src/main/java/eu/chorevolution/idm/choremocks/ee/MonitoringResource.java
View file @
f53bb5d0
...
...
@@ -43,6 +43,8 @@ public class MonitoringResource implements MonitoringApi {
VirtualMachineInfoTO
info1
=
new
VirtualMachineInfoTO
();
info1
.
setKey
(
"vm001"
);
info1
.
setSysOp
(
"Ubuntu 16.10"
);
info1
.
setIp
(
"192.168.0.11"
);
info1
.
setHostname
(
"localhost"
);
info1
.
setCpuCount
(
4
);
info1
.
setCpuUsageRatio
(
30.5
);
info1
.
setRamUsage
(
1500
);
...
...
@@ -55,6 +57,8 @@ public class MonitoringResource implements MonitoringApi {
VirtualMachineInfoTO
info2
=
new
VirtualMachineInfoTO
();
info2
.
setKey
(
"vm002"
);
info2
.
setSysOp
(
"Ubuntu 16.10"
);
info2
.
setIp
(
"192.168.0.12"
);
info2
.
setHostname
(
"localhost"
);
info2
.
setCpuCount
(
2
);
info2
.
setCpuUsageRatio
(
51
);
info2
.
setRamUsage
(
400
);
...
...
@@ -67,6 +71,8 @@ public class MonitoringResource implements MonitoringApi {
VirtualMachineInfoTO
info3
=
new
VirtualMachineInfoTO
();
info3
.
setKey
(
"vm003"
);
info3
.
setSysOp
(
"Ubuntu 16.10"
);
info3
.
setIp
(
"192.168.0.13"
);
info3
.
setHostname
(
"localhost"
);
info3
.
setCpuCount
(
4
);
info3
.
setCpuUsageRatio
(
26.5
);
info3
.
setRamUsage
(
2230
);
...
...
@@ -79,6 +85,8 @@ public class MonitoringResource implements MonitoringApi {
VirtualMachineInfoTO
info4
=
new
VirtualMachineInfoTO
();
info4
.
setKey
(
"vm004"
);
info4
.
setSysOp
(
"Ubuntu 16.10"
);
info4
.
setIp
(
"192.168.0.14"
);
info4
.
setHostname
(
"localhost"
);
info4
.
setCpuCount
(
4
);
info4
.
setCpuUsageRatio
(
44
);
info4
.
setRamUsage
(
750
);
...
...
@@ -133,6 +141,8 @@ public class MonitoringResource implements MonitoringApi {
VirtualMachineInfoTO
info1
=
new
VirtualMachineInfoTO
();
info1
.
setKey
(
"vm001"
);
info1
.
setSysOp
(
"Ubuntu 16.10"
);
info1
.
setIp
(
"192.168.0.11"
);
info1
.
setHostname
(
"localhost"
);
info1
.
setCpuCount
(
4
);
info1
.
setCpuUsageRatio
(
30.5
);
info1
.
setRamUsage
(
1500
);
...
...
@@ -145,6 +155,8 @@ public class MonitoringResource implements MonitoringApi {
VirtualMachineInfoTO
info2
=
new
VirtualMachineInfoTO
();
info2
.
setKey
(
"vm002"
);
info2
.
setSysOp
(
"Ubuntu 16.10"
);
info2
.
setIp
(
"192.168.0.12"
);
info2
.
setHostname
(
"localhost"
);
info2
.
setCpuCount
(
2
);
info2
.
setCpuUsageRatio
(
51
);
info2
.
setRamUsage
(
400
);
...
...
ext/choreography/client-console/src/main/java/org/apache/syncope/client/console/panels/ChoreographyVMDirectoryPanel.java
View file @
f53bb5d0
...
...
@@ -98,11 +98,6 @@ public class ChoreographyVMDirectoryPanel extends DirectoryPanel<
protected
List
<
IColumn
<
VirtualMachineInfoTO
,
String
>>
getColumns
()
{
final
List
<
IColumn
<
VirtualMachineInfoTO
,
String
>>
columns
=
new
ArrayList
<>();
//columns.add(new PropertyColumn<>(new ResourceModel("ipAddress", "IP"), "IP", "ipAddress"));
//columns.add(new PropertyColumn<>(new ResourceModel("hostname", "Hostname"), "Hostname", "hostname"));
columns
.
add
(
new
PropertyColumn
<>(
new
ResourceModel
(
"sysOp"
,
"OS"
),
"OS"
,
"sysOp"
));
//columns.add(new PropertyColumn<>(new ResourceModel("type", "Type"), "Type", "type"));
columns
.
add
(
new
AbstractColumn
<
VirtualMachineInfoTO
,
String
>(
new
ResourceModel
(
""
,
"Type"
))
{
private
static
final
long
serialVersionUID
=
-
5860164518940274921L
;
...
...
@@ -119,7 +114,9 @@ public class ChoreographyVMDirectoryPanel extends DirectoryPanel<
//columns.add(new PropertyColumn<>(new ResourceModel(
// "choreography", "Deployed Choreography"), "Deployed Choreography", "choreography"));
columns
.
add
(
new
PropertyColumn
<>(
new
ResourceModel
(
"sysOp"
,
"OS"
),
"OS"
,
"sysOp"
));
columns
.
add
(
new
PropertyColumn
<>(
new
ResourceModel
(
"ip"
,
"IP Address"
),
"IP Address"
,
"ip"
));
columns
.
add
(
new
PropertyColumn
<>(
new
ResourceModel
(
"hostname"
,
"Hostname"
),
"Hostname"
,
"hostname"
));
columns
.
add
(
new
PropertyColumn
<>(
new
ResourceModel
(
"cpuCount"
,
"CPU"
),
"CPU"
,
"cpuCount"
));
columns
.
add
(
new
PropertyColumn
<>(
new
ResourceModel
(
"cpuUsageRatio"
,
"CPU Utilization (%)"
),
"CPU Utilization (%)"
,
"cpuUsageRatio"
));
...
...
ext/choreography/common-lib/src/main/java/eu/chorevolution/idm/common/to/VirtualMachineInfoTO.java
View file @
f53bb5d0
...
...
@@ -23,7 +23,7 @@ public class VirtualMachineInfoTO extends AbstractBaseBean {
private
String
key
;
private
String
ip
Address
;
private
String
ip
;
private
String
hostname
;
...
...
@@ -55,12 +55,12 @@ public class VirtualMachineInfoTO extends AbstractBaseBean {
this
.
key
=
key
;
}
public
String
getIp
Address
()
{
return
ip
Address
;
public
String
getIp
()
{
return
ip
;
}
public
void
setIp
Address
(
final
String
ip
Address
)
{
this
.
ip
Address
=
ipAddress
;
public
void
setIp
(
final
String
ip
)
{
this
.
ip
=
ip
;
}
public
String
getHostname
()
{
...
...
ext/choreography/rest-api/src/main/java/org/apache/syncope/common/rest/api/service/ChoreographyService.java
View file @
f53bb5d0
...
...
@@ -173,6 +173,7 @@ public interface ChoreographyService extends JAXRSService {
*/
@GET
@Path
(
"{id}/enactmentEngine"
)
@Produces
({
MediaType
.
APPLICATION_JSON
,
MediaType
.
APPLICATION_XML
})
AnyObjectTO
getEnactmentEngine
(
@NotNull
@PathParam
(
"id"
)
String
id
);
}
ext/ee/client-console/src/main/java/org/apache/syncope/client/console/panels/EEVMDirectoryPanel.java
View file @
f53bb5d0
...
...
@@ -103,11 +103,6 @@ public class EEVMDirectoryPanel extends DirectoryPanel<
protected
List
<
IColumn
<
VirtualMachineInfoTO
,
String
>>
getColumns
()
{
final
List
<
IColumn
<
VirtualMachineInfoTO
,
String
>>
columns
=
new
ArrayList
<>();
//columns.add(new PropertyColumn<>(new ResourceModel("ipAddress", "IP"), "IP", "ipAddress"));
//columns.add(new PropertyColumn<>(new ResourceModel("hostname", "Hostname"), "Hostname", "hostname"));
columns
.
add
(
new
PropertyColumn
<>(
new
ResourceModel
(
"sysOp"
,
"OS"
),
"OS"
,
"sysOp"
));
//columns.add(new PropertyColumn<>(new ResourceModel("type", "Type"), "Type", "type"));
columns
.
add
(
new
AbstractColumn
<
VirtualMachineInfoTO
,
String
>(
new
ResourceModel
(
""
,
"Type"
))
{
private
static
final
long
serialVersionUID
=
-
5860164518940274921L
;
...
...
@@ -124,7 +119,9 @@ public class EEVMDirectoryPanel extends DirectoryPanel<
//columns.add(new PropertyColumn<>(new ResourceModel(
// "choreography", "Deployed Choreography"), "Deployed Choreography", "choreography"));
columns
.
add
(
new
PropertyColumn
<>(
new
ResourceModel
(
"sysOp"
,
"OS"
),
"OS"
,
"sysOp"
));
columns
.
add
(
new
PropertyColumn
<>(
new
ResourceModel
(
"ip"
,
"IP Address"
),
"IP Address"
,
"ip"
));
columns
.
add
(
new
PropertyColumn
<>(
new
ResourceModel
(
"hostname"
,
"Hostname"
),
"Hostname"
,
"hostname"
));
columns
.
add
(
new
PropertyColumn
<>(
new
ResourceModel
(
"cpuCount"
,
"CPU"
),
"CPU"
,
"cpuCount"
));
columns
.
add
(
new
PropertyColumn
<>(
new
ResourceModel
(
"cpuUsageRatio"
,
"CPU Utilization (%)"
),
"CPU Utilization (%)"
,
"cpuUsageRatio"
));
...
...
ext/ee/client-console/src/main/java/org/apache/syncope/client/console/rest/EnactmentEngineRestClient.java
View file @
f53bb5d0
...
...
@@ -19,6 +19,7 @@ import eu.chorevolution.idm.common.to.EnactmentEngineStatusTO;
import
eu.chorevolution.idm.common.to.VirtualMachineInfoTO
;
import
java.util.List
;
import
static
org
.
apache
.
syncope
.
client
.
console
.
rest
.
BaseRestClient
.
getService
;
import
org.apache.syncope.common.rest.api.service.EEService
;
import
org.apache.syncope.common.rest.api.service.MonitorInterfaceService
;
public
class
EnactmentEngineRestClient
extends
BaseRestClient
{
...
...
@@ -32,4 +33,8 @@ public class EnactmentEngineRestClient extends BaseRestClient {
public
List
<
VirtualMachineInfoTO
>
getEEVmList
(
final
String
enactmentEngineKey
)
{
return
getService
(
MonitorInterfaceService
.
class
).
getEEVmList
(
enactmentEngineKey
);
}
public
void
create
()
{
getService
(
EEService
.
class
).
create
();
}
}
ext/ee/logic/src/main/java/org/apache/syncope/core/logic/EELogic.java
View file @
f53bb5d0
...
...
@@ -17,11 +17,34 @@ package org.apache.syncope.core.logic;
import
java.lang.reflect.Method
;
import
org.apache.syncope.common.lib.AbstractBaseBean
;
import
org.apache.syncope.common.lib.SyncopeConstants
;
import
org.apache.syncope.common.lib.to.AnyObjectTO
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.stereotype.Component
;
@Component
public
class
EELogic
extends
AbstractTransactionalLogic
<
AbstractBaseBean
>
{
private
static
final
String
ENACTMENT_ENGINE_TYPE
=
"ENACTMENT ENGINE"
;
private
static
final
String
ENACTMENT_ENGINE_BASE_URL
=
"enactmentEngineBaseURL"
;
private
static
final
String
ENACTMENT_ENGINE_USERNAME
=
"enactmentEngineUsername"
;
private
static
final
String
ENACTMENT_ENGINE_PASSWORD
=
"enactmentEnginePassword"
;
@Autowired
private
AnyObjectLogic
anyObjectLogic
;
public
void
create
(
final
String
name
,
final
String
baseURL
,
final
String
username
,
final
String
password
)
{
AnyObjectTO
ee
=
new
AnyObjectTO
();
ee
.
setName
(
"ciao"
);
ee
.
setType
(
ENACTMENT_ENGINE_TYPE
);
ee
.
setRealm
(
SyncopeConstants
.
ROOT_REALM
);
anyObjectLogic
.
create
(
ee
,
true
);
}
@Override
protected
AbstractBaseBean
resolveReference
(
final
Method
method
,
final
Object
...
os
)
throws
UnresolvedReferenceException
{
...
...
ext/ee/rest-api/src/main/java/org/apache/syncope/common/rest/api/service/EEService.java
View file @
f53bb5d0
...
...
@@ -15,6 +15,7 @@
*/
package
org.apache.syncope.common.rest.api.service
;
import
javax.ws.rs.POST
;
import
javax.ws.rs.Path
;
/**
...
...
@@ -23,4 +24,7 @@ import javax.ws.rs.Path;
@Path
(
"enactmentengine"
)
public
interface
EEService
extends
JAXRSService
{
@POST
@Path
(
"/create"
)
void
create
();
}
ext/ee/rest-cxf/src/main/java/org/apache/syncope/core/rest/cxf/service/EEServiceImpl.java
View file @
f53bb5d0
...
...
@@ -25,4 +25,9 @@ public class EEServiceImpl extends AbstractServiceImpl implements EEService {
@Autowired
private
EELogic
logic
;
@Override
public
void
create
()
{
logic
.
create
(
""
,
""
,
""
,
""
);
}
}
Write
Preview
Supports
Markdown
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