Skip to content
This repository was archived by the owner on Jan 23, 2025. It is now read-only.

Commit 62acf37

Browse files
author
ykohata
committed
Revert "S-279280"
This reverts commit d9b49cc.
1 parent 1487de2 commit 62acf37

File tree

4 files changed

+0
-82
lines changed

4 files changed

+0
-82
lines changed

services/cloud_vm_service/src/java/main/com/topcoder/direct/cloudvm/service/bean/CloudVMServiceBean.java

Lines changed: 0 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -116,21 +116,6 @@ public class CloudVMServiceBean implements CloudVMServiceRemote, CloudVMServiceL
116116
*/
117117
private static final String EMAIL = "email";
118118

119-
/**
120-
* Represents the UserData key for storing challenge id
121-
*/
122-
private static final String CHALLENGE_ID = "challenge_id";
123-
124-
/**
125-
* Represents the UserData key for storing challenge id
126-
*/
127-
private static final String CHALLENGE_NAME = "challenge_name";
128-
129-
/**
130-
* Represents the UserData key for storing challenge id
131-
*/
132-
private static final String ROLE = "role";
133-
134119
/**
135120
* Represents the String containing the End of Line
136121
*/
@@ -334,10 +319,6 @@ public List<VMInstanceData> launchVMInstance(TCSubject tcSubject, VMInstance vmI
334319
userData.append(populateUserData(BRANCH,vmInstance.getSvnBranch()));
335320
userData.append(populateUserData(HANDLE,tcMemberHandle));
336321
userData.append(populateUserData(USER_EMAIL,userService.getEmailAddress(tcMemberHandle)));
337-
userData.append(populateUserData(CHALLENGE_ID,String.valueOf(vmInstanceMain.getContestId())));
338-
userData.append(populateUserData(CHALLENGE_NAME, vmInstanceMain.getContestName()));
339-
userData.append(populateUserData(ROLE, vmInstanceMain.getUsageName()));
340-
341322
if (vmInstanceMain.getUserData() != null ){
342323
userData.append(vmInstanceMain.getUserData());
343324
}

services/cloud_vm_service/src/java/main/com/topcoder/direct/services/view/dto/cloudvm/VMInstance.java

Lines changed: 0 additions & 26 deletions
Original file line numberDiff line numberDiff line change
@@ -67,11 +67,6 @@ public class VMInstance extends AbstractIdEntity {
6767
* Represents the usage id. It has getter & setter. It can be any value.
6868
*/
6969
private long usageId;
70-
71-
/**
72-
* Represents the usage id. It has getter & setter. It can be any value.
73-
*/
74-
private String usageName;
7570

7671
/**
7772
* Represents VM public IP address.
@@ -328,27 +323,6 @@ public void setPublicIP(String publicIP) {
328323
this.publicIP = publicIP;
329324
}
330325

331-
/**
332-
* Setter for the namesake instance variable. Simply set the value to the namesake instance variable.
333-
*
334-
* @param usageName
335-
*/
336-
public void setUsageName(String usageName) {
337-
this.usageName = usageName;
338-
}
339-
340-
/**
341-
* Getter for the namesake instance variable. Simply return the namesake instance variable.
342-
*
343-
* @return field value
344-
* @since BUGR-3932
345-
*/
346-
public String getUsageName() {
347-
return usageName;
348-
}
349-
350-
351-
352326
/**
353327
* Getter for the namesake instance variable. Simply return the namesake instance variable.
354328
*

services/cloud_vm_service/src/java/main/com/topcoder/direct/services/view/dto/cloudvm/VMUsage.java

Lines changed: 0 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -45,26 +45,5 @@ public String getName() {
4545
public void setName(String name) {
4646
this.name = name;
4747
}
48-
49-
50-
public static String getName(long id) {
51-
if (id == 1) {
52-
return "VM for competitors";
53-
}
54-
55-
if (id == 2) {
56-
return "VM for reviewers";
57-
}
58-
59-
if (id == 3) {
60-
return "VM for manager/copilots";
61-
}
62-
63-
if (id == 4) {
64-
return "VM for Bug race";
65-
}
66-
67-
return "VM for competitors";
68-
}
6948
}
7049

src/java/main/com/topcoder/direct/services/view/action/cloudvm/LaunchVMInstanceAction.java

Lines changed: 0 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -7,17 +7,13 @@
77
import com.topcoder.direct.services.view.action.contest.launch.ValidationErrorRecord;
88
import com.topcoder.direct.services.view.action.contest.launch.ValidationErrors;
99
import com.topcoder.direct.services.view.dto.cloudvm.VMInstance;
10-
import com.topcoder.direct.services.view.dto.cloudvm.VMUsage;
1110
import com.topcoder.direct.services.view.util.DirectUtils;
12-
import com.topcoder.management.project.ProjectPropertyType;
1311
import com.topcoder.service.facade.contest.ContestServiceFacade;
14-
import com.topcoder.service.project.SoftwareCompetition;
1512
import com.topcoder.service.user.UserService;
1613
import com.topcoder.service.user.UserServiceException;
1714
import com.topcoder.security.TCSubject;
1815
import com.topcoder.shared.security.AuthorizationException;
1916

20-
2117
import javax.servlet.http.HttpServletRequest;
2218
import java.util.HashMap;
2319
import java.util.Map;
@@ -109,18 +105,6 @@ protected void executeAction() throws Exception {
109105
errors.put("contestId",
110106
"No contest with such id. Contest type may be wrong or you may have no permission to access contest data.");
111107
}
112-
113-
String challengeName = "Bug Race";
114-
if (instance.getContestTypeId() != bugRaceContestTypeId) {
115-
challengeName = ((SoftwareCompetition) result).getProjectHeader().getProperty(
116-
ProjectPropertyType.PROJECT_NAME_PROJECT_PROPERTY_KEY);
117-
118-
}
119-
120-
instance.setContestName(challengeName);
121-
122-
instance.setUsageName(VMUsage.getName(instance.getUsageId()));
123-
124108
}
125109

126110
// check member handle

0 commit comments

Comments
 (0)