Skip to content

Commit 2093aef

Browse files
author
frank
committed
CloudStack CLOUDSTACK-723
Enhanced baremetal servers support on Cisco UCS change UcsXxxDao to Spring xml loading change ListxxxCmd to inherit ListCmd change API response in line with current API architecture adding missing db schema to db upgrade schemaOh
1 parent ad90e20 commit 2093aef

28 files changed

Lines changed: 202 additions & 100 deletions

agent/pom.xml

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -35,8 +35,6 @@
3535
<groupId>org.apache.cloudstack</groupId>
3636
<artifactId>cloud-utils</artifactId>
3737
<version>${project.version}</version>
38-
<classifier>tests</classifier>
39-
<scope>test</scope>
4038
</dependency>
4139
</dependencies>
4240
<build>

client/pom.xml

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -90,6 +90,11 @@
9090
<artifactId>cloud-plugin-hypervisor-baremetal</artifactId>
9191
<version>${project.version}</version>
9292
</dependency>
93+
<dependency>
94+
<groupId>org.apache.cloudstack</groupId>
95+
<artifactId>cloud-plugin-hypervisor-ucs</artifactId>
96+
<version>${project.version}</version>
97+
</dependency>
9398
<dependency>
9499
<groupId>org.apache.cloudstack</groupId>
95100
<artifactId>cloud-plugin-hypervisor-ovm</artifactId>

client/tomcatconf/componentContext.xml.in

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -58,6 +58,9 @@
5858
<bean id="BaremetalKickStartPxeService" class="com.cloud.baremetal.networkservice.BaremetalKickStartServiceImpl"/>
5959
<bean id="BaremetalPingPxeService" class="com.cloud.baremetal.networkservice.BareMetalPingServiceImpl" />
6060
<bean id="BaremetalPxeManager" class="com.cloud.baremetal.networkservice.BaremetalPxeManagerImpl" />
61+
<bean id="UcsManager" class="com.cloud.ucs.manager.UcsManagerImpl" />
62+
<bean id="UcsBladeDao" class="com.cloud.ucs.database.UcsBladeDaoImpl" />
63+
<bean id="UcsManagerDao" class="com.cloud.ucs.database.UcsManagerDaoImpl" />
6164

6265

6366
<!--

plugins/hypervisors/ucs/src/com/cloud/ucs/database/UcsBladeDao.java

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5,15 +5,16 @@
55
// to you under the Apache License, Version 2.0 (the
66
// "License"); you may not use this file except in compliance
77
// with the License. You may obtain a copy of the License at
8-
//
8+
//
99
// http://www.apache.org/licenses/LICENSE-2.0
10-
//
10+
//
1111
// Unless required by applicable law or agreed to in writing,
1212
// software distributed under the License is distributed on an
1313
// "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
1414
// KIND, either express or implied. See the License for the
1515
// specific language governing permissions and limitations
1616
// under the License.
17+
//
1718
package com.cloud.ucs.database;
1819

1920
import com.cloud.utils.db.GenericDao;

plugins/hypervisors/ucs/src/com/cloud/ucs/database/UcsBladeDaoImpl.java

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -5,22 +5,25 @@
55
// to you under the Apache License, Version 2.0 (the
66
// "License"); you may not use this file except in compliance
77
// with the License. You may obtain a copy of the License at
8-
//
8+
//
99
// http://www.apache.org/licenses/LICENSE-2.0
10-
//
10+
//
1111
// Unless required by applicable law or agreed to in writing,
1212
// software distributed under the License is distributed on an
1313
// "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
1414
// KIND, either express or implied. See the License for the
1515
// specific language governing permissions and limitations
1616
// under the License.
17+
//
1718
package com.cloud.ucs.database;
1819

1920
import javax.ejb.Local;
21+
22+
import org.springframework.stereotype.Component;
2023

2124
import com.cloud.utils.db.DB;
2225
import com.cloud.utils.db.GenericDaoBase;
23-
@Local(value = { UcsBladeDao.class })
26+
@Local(value = { UcsBladeDao.class })
2427
@DB(txn = false)
2528
public class UcsBladeDaoImpl extends GenericDaoBase<UcsBladeVO, Long> implements UcsBladeDao {
2629

plugins/hypervisors/ucs/src/com/cloud/ucs/database/UcsBladeVO.java

Lines changed: 18 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -5,15 +5,16 @@
55
// to you under the Apache License, Version 2.0 (the
66
// "License"); you may not use this file except in compliance
77
// with the License. You may obtain a copy of the License at
8-
//
8+
//
99
// http://www.apache.org/licenses/LICENSE-2.0
10-
//
10+
//
1111
// Unless required by applicable law or agreed to in writing,
1212
// software distributed under the License is distributed on an
1313
// "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
1414
// KIND, either express or implied. See the License for the
1515
// specific language governing permissions and limitations
1616
// under the License.
17+
//
1718
package com.cloud.ucs.database;
1819

1920
import javax.persistence.Column;
@@ -22,10 +23,13 @@
2223
import javax.persistence.GenerationType;
2324
import javax.persistence.Id;
2425
import javax.persistence.Table;
26+
27+
import org.apache.cloudstack.api.Identity;
28+
import org.apache.cloudstack.api.InternalIdentity;
2529

2630
@Entity
2731
@Table(name="ucs_blade")
28-
public class UcsBladeVO {
32+
public class UcsBladeVO implements InternalIdentity, Identity {
2933
@Id
3034
@GeneratedValue(strategy=GenerationType.IDENTITY)
3135
@Column(name="id")
@@ -42,6 +46,9 @@ public class UcsBladeVO {
4246

4347
@Column(name="dn")
4448
private String dn;
49+
50+
@Column(name="profile_dn")
51+
private String profileDn;
4552

4653
public long getId() {
4754
return id;
@@ -82,4 +89,12 @@ public String getUuid() {
8289
public void setUuid(String uuid) {
8390
this.uuid = uuid;
8491
}
92+
93+
public String getProfileDn() {
94+
return profileDn;
95+
}
96+
97+
public void setProfileDn(String profileDn) {
98+
this.profileDn = profileDn;
99+
}
85100
}

plugins/hypervisors/ucs/src/com/cloud/ucs/database/UcsManagerDao.java

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5,15 +5,16 @@
55
// to you under the Apache License, Version 2.0 (the
66
// "License"); you may not use this file except in compliance
77
// with the License. You may obtain a copy of the License at
8-
//
8+
//
99
// http://www.apache.org/licenses/LICENSE-2.0
10-
//
10+
//
1111
// Unless required by applicable law or agreed to in writing,
1212
// software distributed under the License is distributed on an
1313
// "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
1414
// KIND, either express or implied. See the License for the
1515
// specific language governing permissions and limitations
1616
// under the License.
17+
//
1718
package com.cloud.ucs.database;
1819

1920
import java.util.List;

plugins/hypervisors/ucs/src/com/cloud/ucs/database/UcsManagerDaoImpl.java

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -5,23 +5,26 @@
55
// to you under the Apache License, Version 2.0 (the
66
// "License"); you may not use this file except in compliance
77
// with the License. You may obtain a copy of the License at
8-
//
8+
//
99
// http://www.apache.org/licenses/LICENSE-2.0
10-
//
10+
//
1111
// Unless required by applicable law or agreed to in writing,
1212
// software distributed under the License is distributed on an
1313
// "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
1414
// KIND, either express or implied. See the License for the
1515
// specific language governing permissions and limitations
1616
// under the License.
17+
//
1718
package com.cloud.ucs.database;
1819

1920
import javax.ejb.Local;
21+
22+
import org.springframework.stereotype.Component;
2023

2124
import com.cloud.utils.db.DB;
2225
import com.cloud.utils.db.GenericDaoBase;
2326

24-
@Local(value = { UcsManagerDao.class })
27+
@Local(value = { UcsManagerDao.class })
2528
@DB(txn = false)
2629
public class UcsManagerDaoImpl extends GenericDaoBase<UcsManagerVO, Long> implements UcsManagerDao {
2730
}

plugins/hypervisors/ucs/src/com/cloud/ucs/database/UcsManagerVO.java

Lines changed: 8 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -5,15 +5,16 @@
55
// to you under the Apache License, Version 2.0 (the
66
// "License"); you may not use this file except in compliance
77
// with the License. You may obtain a copy of the License at
8-
//
8+
//
99
// http://www.apache.org/licenses/LICENSE-2.0
10-
//
10+
//
1111
// Unless required by applicable law or agreed to in writing,
1212
// software distributed under the License is distributed on an
1313
// "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
1414
// KIND, either express or implied. See the License for the
1515
// specific language governing permissions and limitations
1616
// under the License.
17+
//
1718
package com.cloud.ucs.database;
1819

1920
import javax.persistence.Column;
@@ -22,10 +23,13 @@
2223
import javax.persistence.GenerationType;
2324
import javax.persistence.Id;
2425
import javax.persistence.Table;
25-
26+
27+
import org.apache.cloudstack.api.Identity;
28+
import org.apache.cloudstack.api.InternalIdentity;
29+
2630
@Entity
2731
@Table(name="ucs_manager")
28-
public class UcsManagerVO {
32+
public class UcsManagerVO implements InternalIdentity, Identity {
2933
@Id
3034
@GeneratedValue(strategy=GenerationType.IDENTITY)
3135
@Column(name="id")

plugins/hypervisors/ucs/src/com/cloud/ucs/manager/AddUcsManagerCmd.java

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5,15 +5,16 @@
55
// to you under the Apache License, Version 2.0 (the
66
// "License"); you may not use this file except in compliance
77
// with the License. You may obtain a copy of the License at
8-
//
8+
//
99
// http://www.apache.org/licenses/LICENSE-2.0
10-
//
10+
//
1111
// Unless required by applicable law or agreed to in writing,
1212
// software distributed under the License is distributed on an
1313
// "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
1414
// KIND, either express or implied. See the License for the
1515
// specific language governing permissions and limitations
1616
// under the License.
17+
//
1718
package com.cloud.ucs.manager;
1819

1920
import javax.inject.Inject;

0 commit comments

Comments
 (0)