Skip to content

Commit fbfc5c6

Browse files
committed
Merge from master and fix conflicts
2 parents a433a29 + c30da35 commit fbfc5c6

827 files changed

Lines changed: 27521 additions & 17958 deletions

File tree

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

LICENSE

Lines changed: 141 additions & 69 deletions
Large diffs are not rendered by default.

NOTICE

Lines changed: 24 additions & 25 deletions
Original file line numberDiff line numberDiff line change
@@ -6,30 +6,7 @@
66

77

88

9-
Source code distribution if this software contains third party resources requiring
10-
the following notices:
11-
12-
13-
For
14-
jquery.md5.js
15-
16-
17-
jQuery MD5 Plugin 1.2.1
18-
https://github.com/blueimp/jQuery-MD5
19-
20-
Copyright 2010, Sebastian Tschan
21-
https://blueimp.net
22-
23-
Licensed under the MIT license:
24-
http://creativecommons.org/licenses/MIT/
25-
26-
Based on
27-
A JavaScript implementation of the RSA Data Security, Inc. MD5 Message
28-
Digest Algorithm, as defined in RFC 1321.
29-
Version 2.2 Copyright (C) Paul Johnston 1999 - 2009
30-
Other contributors: Greg Holt, Andrew Kepert, Ydnar, Lostinet
31-
Distributed under the BSD License
32-
See http://pajhome.org.uk/crypt/md5 for more info.
9+
This distribution contains third party resources requiring the following notices:
3310

3411

3512
For
@@ -66,6 +43,28 @@
6643
Date: Thu May 12 15:04:36 2011 -0400
6744

6845

46+
For
47+
jquery.md5.js
48+
49+
50+
jQuery MD5 Plugin 1.2.1
51+
https://github.com/blueimp/jQuery-MD5
52+
53+
Copyright 2010, Sebastian Tschan
54+
https://blueimp.net
55+
56+
Licensed under the MIT license:
57+
http://creativecommons.org/licenses/MIT/
58+
59+
Based on
60+
A JavaScript implementation of the RSA Data Security, Inc. MD5 Message
61+
Digest Algorithm, as defined in RFC 1321.
62+
Version 2.2 Copyright (C) Paul Johnston 1999 - 2009
63+
Other contributors: Greg Holt, Andrew Kepert, Ydnar, Lostinet
64+
Distributed under the BSD License
65+
See http://pajhome.org.uk/crypt/md5 for more info.
66+
67+
6968
For
7069
jquery.colorhelpers.js
7170

@@ -76,4 +75,4 @@
7675

7776
Inspiration from jQuery color animation plugin by John Resig.
7877

79-
Released under the MIT license by Ole Laursen, October 2009.
78+
Released under the MIT license by Ole Laursen, October 2009.

agent/pom.xml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@
2323
<parent>
2424
<groupId>org.apache.cloudstack</groupId>
2525
<artifactId>cloudstack</artifactId>
26-
<version>4.1.0-SNAPSHOT</version>
26+
<version>4.2.0-SNAPSHOT</version>
2727
</parent>
2828
<dependencies>
2929
<dependency>

api/pom.xml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@
2323
<parent>
2424
<groupId>org.apache.cloudstack</groupId>
2525
<artifactId>cloudstack</artifactId>
26-
<version>4.1.0-SNAPSHOT</version>
26+
<version>4.2.0-SNAPSHOT</version>
2727
</parent>
2828
<dependencies>
2929
<dependency>
Lines changed: 62 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,62 @@
1+
// Licensed to the Apache Software Foundation (ASF) under one
2+
// or more contributor license agreements. See the NOTICE file
3+
// distributed with this work for additional information
4+
// regarding copyright ownership. The ASF licenses this file
5+
// to you under the Apache License, Version 2.0 (the
6+
// "License"); you may not use this file except in compliance
7+
// with the License. You may obtain a copy of the License at
8+
//
9+
// http://www.apache.org/licenses/LICENSE-2.0
10+
//
11+
// Unless required by applicable law or agreed to in writing,
12+
// software distributed under the License is distributed on an
13+
// "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
14+
// KIND, either express or implied. See the License for the
15+
// specific language governing permissions and limitations
16+
// under the License.
17+
18+
package com.cloud.agent.api;
19+
20+
import java.util.List;
21+
22+
import com.cloud.agent.api.to.VolumeTO;
23+
24+
public class CreateVMSnapshotAnswer extends Answer {
25+
26+
private List<VolumeTO> volumeTOs;
27+
private VMSnapshotTO vmSnapshotTo;
28+
29+
30+
public List<VolumeTO> getVolumeTOs() {
31+
return volumeTOs;
32+
}
33+
34+
public void setVolumeTOs(List<VolumeTO> volumeTOs) {
35+
this.volumeTOs = volumeTOs;
36+
}
37+
38+
public VMSnapshotTO getVmSnapshotTo() {
39+
return vmSnapshotTo;
40+
}
41+
42+
public void setVmSnapshotTo(VMSnapshotTO vmSnapshotTo) {
43+
this.vmSnapshotTo = vmSnapshotTo;
44+
}
45+
46+
public CreateVMSnapshotAnswer() {
47+
48+
}
49+
50+
public CreateVMSnapshotAnswer(CreateVMSnapshotCommand cmd, boolean success,
51+
String result) {
52+
super(cmd, success, result);
53+
}
54+
55+
public CreateVMSnapshotAnswer(CreateVMSnapshotCommand cmd,
56+
VMSnapshotTO vmSnapshotTo, List<VolumeTO> volumeTOs) {
57+
super(cmd, true, "");
58+
this.vmSnapshotTo = vmSnapshotTo;
59+
this.volumeTOs = volumeTOs;
60+
}
61+
62+
}

core/src/com/cloud/vm/VirtualEnvironment.java renamed to api/src/com/cloud/agent/api/CreateVMSnapshotCommand.java

Lines changed: 21 additions & 25 deletions
Original file line numberDiff line numberDiff line change
@@ -14,33 +14,29 @@
1414
// KIND, either express or implied. See the License for the
1515
// specific language governing permissions and limitations
1616
// under the License.
17-
package com.cloud.vm;
17+
package com.cloud.agent.api;
1818

1919
import java.util.List;
2020

21-
/**
22-
*
23-
* be an information carrier within one thread only.
24-
*
25-
*/
26-
public class VirtualEnvironment {
27-
/**
28-
* The actual machine
29-
*/
30-
public VirtualMachine machine;
31-
32-
/**
33-
* Disks to assign to the machine in order.
34-
*/
35-
public List<VirtualDisk> disks;
36-
37-
/**
38-
* Networks to assign to the machine.
39-
*/
40-
public List<VirtualNetwork> networks;
21+
import com.cloud.agent.api.to.VolumeTO;
22+
import com.cloud.vm.VirtualMachine;
23+
24+
public class CreateVMSnapshotCommand extends VMSnapshotBaseCommand {
25+
26+
public CreateVMSnapshotCommand(String vmName, VMSnapshotTO snapshot, List<VolumeTO> volumeTOs, String guestOSType, VirtualMachine.State vmState) {
27+
super(vmName, snapshot, volumeTOs, guestOSType);
28+
this.vmState = vmState;
29+
}
30+
31+
private VirtualMachine.State vmState;
32+
33+
34+
public VirtualMachine.State getVmState() {
35+
return vmState;
36+
}
37+
38+
public void setVmState(VirtualMachine.State vmState) {
39+
this.vmState = vmState;
40+
}
4141

42-
/**
43-
* Boot options to assign to the machine.
44-
*/
45-
public String bootOptions;
4642
}

api/src/com/cloud/agent/api/CreateVolumeFromSnapshotCommand.java

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,7 @@
1818

1919
import com.cloud.storage.StoragePool;
2020

21+
2122
/**
2223
* This currently assumes that both primary and secondary storage are mounted on the XenServer.
2324
*/
Lines changed: 54 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,54 @@
1+
// Licensed to the Apache Software Foundation (ASF) under one
2+
// or more contributor license agreements. See the NOTICE file
3+
// distributed with this work for additional information
4+
// regarding copyright ownership. The ASF licenses this file
5+
// to you under the Apache License, Version 2.0 (the
6+
// "License"); you may not use this file except in compliance
7+
// with the License. You may obtain a copy of the License at
8+
//
9+
// http://www.apache.org/licenses/LICENSE-2.0
10+
//
11+
// Unless required by applicable law or agreed to in writing,
12+
// software distributed under the License is distributed on an
13+
// "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
14+
// KIND, either express or implied. See the License for the
15+
// specific language governing permissions and limitations
16+
// under the License.
17+
18+
package com.cloud.agent.api;
19+
20+
import com.cloud.agent.api.to.VolumeTO;
21+
22+
public class CreateVolumeFromVMSnapshotAnswer extends Answer {
23+
private String path;
24+
private VolumeTO volumeTo;
25+
26+
public VolumeTO getVolumeTo() {
27+
return volumeTo;
28+
}
29+
30+
public CreateVolumeFromVMSnapshotAnswer(
31+
CreateVolumeFromVMSnapshotCommand cmd, VolumeTO volumeTo) {
32+
super(cmd, true, "");
33+
this.volumeTo = volumeTo;
34+
}
35+
36+
public String getPath() {
37+
return path;
38+
}
39+
40+
protected CreateVolumeFromVMSnapshotAnswer() {
41+
42+
}
43+
44+
public CreateVolumeFromVMSnapshotAnswer(
45+
CreateVolumeFromVMSnapshotCommand cmd, String path) {
46+
super(cmd, true, "");
47+
this.path = path;
48+
}
49+
50+
public CreateVolumeFromVMSnapshotAnswer(
51+
CreateVolumeFromVMSnapshotCommand cmd, boolean result, String string) {
52+
super(cmd, result, string);
53+
}
54+
}
Lines changed: 88 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,88 @@
1+
// Licensed to the Apache Software Foundation (ASF) under one
2+
// or more contributor license agreements. See the NOTICE file
3+
// distributed with this work for additional information
4+
// regarding copyright ownership. The ASF licenses this file
5+
// to you under the Apache License, Version 2.0 (the
6+
// "License"); you may not use this file except in compliance
7+
// with the License. You may obtain a copy of the License at
8+
//
9+
// http://www.apache.org/licenses/LICENSE-2.0
10+
//
11+
// Unless required by applicable law or agreed to in writing,
12+
// software distributed under the License is distributed on an
13+
// "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
14+
// KIND, either express or implied. See the License for the
15+
// specific language governing permissions and limitations
16+
// under the License.
17+
package com.cloud.agent.api;
18+
19+
import com.cloud.agent.api.to.StorageFilerTO;
20+
import com.cloud.vm.DiskProfile;
21+
22+
public class CreateVolumeFromVMSnapshotCommand extends Command {
23+
24+
protected String path;
25+
protected String name;
26+
protected Boolean fullClone;
27+
protected String storagePoolUuid;
28+
private StorageFilerTO pool;
29+
private DiskProfile diskProfile;
30+
private Long volumeId;
31+
32+
public DiskProfile getDskch() {
33+
return diskProfile;
34+
}
35+
36+
public String getPath() {
37+
return path;
38+
}
39+
40+
public Long getVolumeId() {
41+
return volumeId;
42+
}
43+
44+
protected CreateVolumeFromVMSnapshotCommand() {
45+
46+
}
47+
48+
public CreateVolumeFromVMSnapshotCommand(String path, String name,
49+
Boolean fullClone, String storagePoolUuid) {
50+
this.path = path;
51+
this.name = name;
52+
this.fullClone = fullClone;
53+
this.storagePoolUuid = storagePoolUuid;
54+
}
55+
56+
public CreateVolumeFromVMSnapshotCommand(String path, String name,
57+
Boolean fullClone, String storagePoolUuid, StorageFilerTO pool,
58+
DiskProfile diskProfile, Long volumeId) {
59+
this.path = path;
60+
this.name = name;
61+
this.fullClone = fullClone;
62+
this.storagePoolUuid = storagePoolUuid;
63+
this.pool = pool;
64+
this.diskProfile = diskProfile;
65+
this.volumeId = volumeId;
66+
}
67+
68+
@Override
69+
public boolean executeInSequence() {
70+
return false;
71+
}
72+
73+
public String getName() {
74+
return name;
75+
}
76+
77+
public Boolean getFullClone() {
78+
return fullClone;
79+
}
80+
81+
public String getStoragePoolUuid() {
82+
return storagePoolUuid;
83+
}
84+
85+
public StorageFilerTO getPool() {
86+
return pool;
87+
}
88+
}

0 commit comments

Comments
 (0)