Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

Add modifiedBy to MaintenanceEvent to improve data validation

  • Loading branch information...
commit 4440ed8ec21f999ccbb9e6280cc9dfe72e898eea 1 parent de4e5d6
pnguyen authored
View
3  hqu/hqapi1/app/MaintenanceController.groovy
@@ -9,7 +9,8 @@ class MaintenanceController extends ApiController {
MaintenanceEvent(state: m.state,
groupId: m.groupId,
startTime: m.startTime,
- endTime: m.endTime) {
+ endTime: m.endTime,
+ modifiedBy: m.modifiedBy) {
State(m.state)
}
}
View
4 src/org/hyperic/hq/hqapi1/test/MaintenanceTestBase.java
@@ -165,6 +165,8 @@ Group createGroup(List<Resource> resources) throws Exception {
void valididateMaintenanceEvent(MaintenanceEvent e, Group g, long start, long end) {
assertEquals(e.getGroupId(), g.getId().intValue());
assertEquals(e.getStartTime(), start);
- assertEquals(e.getEndTime(), end);
+ assertEquals(e.getEndTime(), end);
+ assertNotNull(e.getModifiedBy());
+ assertTrue(e.getModifiedBy().trim().length() > 0);
}
}
View
3  xsd/HQApi1.xsd
@@ -863,7 +863,8 @@
</xs:sequence>
<xs:attribute name="endTime" type="xs:long" use="required"/>
<xs:attribute name="startTime" type="xs:long" use="required"/>
- <xs:attribute name="groupId" type="xs:int" use="required"/>
+ <xs:attribute name="groupId" type="xs:int" use="required"/>
+ <xs:attribute name="modifiedBy" type="xs:string" use="optional" />
</xs:complexType>
<!-- Maintenance response objects -->
Please sign in to comment.
Something went wrong with that request. Please try again.