Skip to content

Commit b8e5cd6

Browse files
Locharla, SandeepLocharla, Sandeep
authored andcommitted
Create & Delete, Enable & Disable, Enter & Cancel maintenance of Primary StoragePool with ONTAP storage
Co-authored-by: Rajiv Jain <Rajiv.Jain@netapp.com> Create & Delete, Enable & Disable, Enter & Cancel maintenance of Primary StoragePool with ONTAP storage Co-authored-by: Rajiv Jain<rajiv1@netapp.com> Edited readme file Fixed license check issue Removed dependency that's not conforming with ACF guidelines
1 parent 7b94ccc commit b8e5cd6

Some content is hidden

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

60 files changed

+7122
-0
lines changed

client/pom.xml

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -121,6 +121,11 @@
121121
<artifactId>cloud-plugin-storage-volume-adaptive</artifactId>
122122
<version>${project.version}</version>
123123
</dependency>
124+
<dependency>
125+
<groupId>org.apache.cloudstack</groupId>
126+
<artifactId>cloud-plugin-storage-volume-ontap</artifactId>
127+
<version>${project.version}</version>
128+
</dependency>
124129
<dependency>
125130
<groupId>org.apache.cloudstack</groupId>
126131
<artifactId>cloud-plugin-storage-volume-solidfire</artifactId>

plugins/pom.xml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -129,6 +129,7 @@
129129
<module>storage/volume/default</module>
130130
<module>storage/volume/nexenta</module>
131131
<module>storage/volume/sample</module>
132+
<module>storage/volume/ontap</module>
132133
<module>storage/volume/solidfire</module>
133134
<module>storage/volume/scaleio</module>
134135
<module>storage/volume/linstor</module>
Lines changed: 123 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,123 @@
1+
<!--
2+
Licensed to the Apache Software Foundation (ASF) under one
3+
or more contributor license agreements. See the NOTICE file
4+
distributed with this work for additional information
5+
regarding copyright ownership. The ASF licenses this file
6+
to you under the Apache License, Version 2.0 (the
7+
"License"); you may not use this file except in compliance
8+
with the License. You may obtain a copy of the License at
9+
10+
http://www.apache.org/licenses/LICENSE-2.0
11+
12+
Unless required by applicable law or agreed to in writing,
13+
software distributed under the License is distributed on an
14+
"AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
15+
KIND, either express or implied. See the License for the
16+
specific language governing permissions and limitations
17+
under the License.
18+
-->
19+
20+
# Apache CloudStack - NetApp ONTAP Storage Plugin
21+
22+
## Overview
23+
24+
The NetApp ONTAP Storage Plugin provides integration between Apache CloudStack and NetApp ONTAP storage systems. This plugin enables CloudStack to provision and manage primary storage on ONTAP clusters, supporting both NAS (NFS) and SAN (iSCSI) protocols.
25+
26+
## Features
27+
28+
- **Primary Storage Support**: Provision and manage primary storage pools on NetApp ONTAP
29+
- **Multiple Protocols**: Support for NFS 3.0 and iSCSI protocols
30+
- **Unified Storage**: Integration with traditional ONTAP unified storage architecture
31+
- **KVM Hypervisor Support**: Supports KVM hypervisor environments
32+
- **Managed Storage**: Operates as managed storage with full lifecycle management
33+
- **Flexible Scoping**: Support for Zone-wide and Cluster-scoped storage pools
34+
35+
## Architecture
36+
37+
### Component Structure
38+
39+
| Package | Description |
40+
|---------|-------------------------------------------------------|
41+
| `driver` | Primary datastore driver implementation |
42+
| `feign` | REST API clients and data models for ONTAP operations |
43+
| `lifecycle` | Storage pool lifecycle management |
44+
| `listener` | Host connection event handlers |
45+
| `provider` | Main provider and strategy factory |
46+
| `service` | ONTAP Storage strategy implementations (NAS/SAN) |
47+
| `utils` | Constants and helper utilities |
48+
49+
## Requirements
50+
51+
### ONTAP Requirements
52+
53+
- NetApp ONTAP 9.15.1 or higher
54+
- Storage Virtual Machine (SVM) configured with appropriate protocols enabled
55+
- Management LIF accessible from CloudStack management server
56+
- Data LIF(s) accessible from hypervisor hosts and are of IPv4 type
57+
- Aggregates assigned to the SVM with sufficient capacity
58+
59+
### CloudStack Requirements
60+
61+
- Apache CloudStack current version or higher
62+
- KVM hypervisor hosts
63+
- For iSCSI: Hosts must have iSCSI initiator configured with valid IQN
64+
- For NFS: Hosts must have NFS client packages installed
65+
66+
### Minimum Volume Size
67+
68+
ONTAP requires a minimum volume size of **1.56 GB** (1,677,721,600 bytes). The plugin will automatically adjust requested sizes below this threshold.
69+
70+
## Configuration
71+
72+
### Storage Pool Creation Parameters
73+
74+
When creating an ONTAP primary storage pool, provide the following details in the URL field (semicolon-separated key=value pairs):
75+
76+
| Parameter | Required | Description |
77+
|-----------|----------|-------------|
78+
| `username` | Yes | ONTAP cluster admin username |
79+
| `password` | Yes | ONTAP cluster admin password |
80+
| `svmName` | Yes | Storage Virtual Machine name |
81+
| `protocol` | Yes | Storage protocol (`NFS3` or `ISCSI`) |
82+
| `managementLIF` | Yes | ONTAP cluster management LIF IP address |
83+
84+
### Example URL Format
85+
86+
```
87+
username=admin;password=secretpass;svmName=svm1;protocol=ISCSI;managementLIF=192.168.1.100
88+
```
89+
90+
## Port Configuration
91+
92+
| Protocol | Default Port |
93+
|----------|--------------|
94+
| NFS | 2049 |
95+
| iSCSI | 3260 |
96+
| ONTAP Management API | 443 (HTTPS) |
97+
98+
## Limitations
99+
100+
- Supports only **KVM** hypervisor
101+
- Supports only **Unified ONTAP** storage (disaggregated not supported)
102+
- Supports only **NFS3** and **iSCSI** protocols
103+
- IPv6 type and FQDN LIFs are not supported
104+
105+
## Troubleshooting
106+
107+
### Common Issues
108+
109+
1. **Connection Failures**
110+
- Verify management LIF is reachable from CloudStack management server
111+
- Check firewall rules for port 443
112+
113+
2. **Protocol Errors**
114+
- Ensure the protocol (NFS/iSCSI) is enabled on the SVM
115+
- Verify Data LIFs are configured for the protocol
116+
117+
3. **Capacity Errors**
118+
- Check aggregate space availability
119+
- Ensure requested volume size meets minimum requirements (1.56 GB)
120+
121+
4. **Host Connection Issues**
122+
- For iSCSI: Verify host IQN is properly configured in host's storage URL
123+
- For NFS: Ensure NFS client is installed and running
Lines changed: 169 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,169 @@
1+
<!--
2+
Licensed to the Apache Software Foundation (ASF) under one
3+
or more contributor license agreements. See the NOTICE file
4+
distributed with this work for additional information
5+
regarding copyright ownership. The ASF licenses this file
6+
to you under the Apache License, Version 2.0 (the
7+
"License"); you may not use this file except in compliance
8+
with the License. You may obtain a copy of the License at
9+
10+
http://www.apache.org/licenses/LICENSE-2.0
11+
12+
Unless required by applicable law or agreed to in writing,
13+
software distributed under the License is distributed on an
14+
"AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
15+
KIND, either express or implied. See the License for the
16+
specific language governing permissions and limitations
17+
under the License.
18+
-->
19+
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
20+
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
21+
<modelVersion>4.0.0</modelVersion>
22+
<artifactId>cloud-plugin-storage-volume-ontap</artifactId>
23+
<name>Apache CloudStack Plugin - Storage Volume ONTAP Provider</name>
24+
<parent>
25+
<groupId>org.apache.cloudstack</groupId>
26+
<artifactId>cloudstack-plugins</artifactId>
27+
<version>4.23.0.0-SNAPSHOT</version>
28+
<relativePath>../../../pom.xml</relativePath>
29+
</parent>
30+
<properties>
31+
<spring-cloud.version>2021.0.7</spring-cloud.version>
32+
<openfeign.version>11.0</openfeign.version>
33+
<httpclient.version>4.5.14</httpclient.version>
34+
<swagger-annotations.version>1.6.2</swagger-annotations.version>
35+
<maven-compiler-plugin.version>3.8.1</maven-compiler-plugin.version>
36+
<maven-surefire-plugin.version>2.22.2</maven-surefire-plugin.version>
37+
<jackson-databind.version>2.13.4</jackson-databind.version>
38+
<assertj.version>3.24.2</assertj.version>
39+
<junit-jupiter.version>5.8.1</junit-jupiter.version>
40+
<mockito.version>3.12.4</mockito.version>
41+
<mockito-junit-jupiter.version>5.2.0</mockito-junit-jupiter.version>
42+
</properties>
43+
<dependencyManagement>
44+
<dependencies>
45+
<dependency>
46+
<groupId>org.springframework.cloud</groupId>
47+
<artifactId>spring-cloud-dependencies</artifactId>
48+
<version>${spring-cloud.version}</version>
49+
<type>pom</type>
50+
<scope>import</scope>
51+
</dependency>
52+
</dependencies>
53+
</dependencyManagement>
54+
<dependencies>
55+
<dependency>
56+
<groupId>org.apache.cloudstack</groupId>
57+
<artifactId>cloud-plugin-storage-volume-default</artifactId>
58+
<version>${project.version}</version>
59+
</dependency>
60+
<dependency>
61+
<groupId>io.github.openfeign</groupId>
62+
<artifactId>feign-core</artifactId>
63+
<version>${openfeign.version}</version>
64+
</dependency>
65+
<dependency>
66+
<groupId>io.github.openfeign</groupId>
67+
<artifactId>feign-httpclient</artifactId>
68+
<version>${openfeign.version}</version>
69+
</dependency>
70+
<dependency>
71+
<groupId>io.github.openfeign</groupId>
72+
<artifactId>feign-jackson</artifactId>
73+
<version>${openfeign.version}</version>
74+
</dependency>
75+
<dependency>
76+
<groupId>com.fasterxml.jackson.core</groupId>
77+
<artifactId>jackson-databind</artifactId>
78+
<version>${jackson-databind.version}</version>
79+
</dependency>
80+
<dependency>
81+
<groupId>org.apache.httpcomponents</groupId>
82+
<artifactId>httpclient</artifactId>
83+
<version>${httpclient.version}</version>
84+
</dependency>
85+
<dependency>
86+
<groupId>org.apache.cloudstack</groupId>
87+
<artifactId>cloud-engine-storage-volume</artifactId>
88+
<version>${project.version}</version>
89+
</dependency>
90+
<dependency>
91+
<groupId>io.swagger</groupId>
92+
<artifactId>swagger-annotations</artifactId>
93+
<version>${swagger-annotations.version}</version>
94+
</dependency>
95+
<!-- JUnit 5 -->
96+
<dependency>
97+
<groupId>org.junit.jupiter</groupId>
98+
<artifactId>junit-jupiter-engine</artifactId>
99+
<version>${junit-jupiter.version}</version>
100+
<scope>test</scope>
101+
</dependency>
102+
103+
<!-- Mockito -->
104+
<dependency>
105+
<groupId>org.mockito</groupId>
106+
<artifactId>mockito-core</artifactId>
107+
<version>${mockito.version}</version>
108+
<scope>test</scope>
109+
</dependency>
110+
<dependency>
111+
<groupId>org.mockito</groupId>
112+
<artifactId>mockito-junit-jupiter</artifactId>
113+
<version>${mockito-junit-jupiter.version}</version>
114+
<scope>test</scope>
115+
</dependency>
116+
117+
<!-- Mockito Inline (for static method mocking) -->
118+
<dependency>
119+
<groupId>org.mockito</groupId>
120+
<artifactId>mockito-inline</artifactId>
121+
<version>${mockito.version}</version>
122+
<scope>test</scope>
123+
</dependency>
124+
<dependency>
125+
<groupId>org.assertj</groupId>
126+
<artifactId>assertj-core</artifactId>
127+
<version>${assertj.version}</version>
128+
<scope>test</scope>
129+
</dependency>
130+
</dependencies>
131+
<repositories>
132+
<repository>
133+
<id>central</id>
134+
<name>Maven Central</name>
135+
<url>https://repo.maven.apache.org/maven2</url>
136+
</repository>
137+
</repositories>
138+
<build>
139+
<plugins>
140+
<plugin>
141+
<groupId>org.apache.maven.plugins</groupId>
142+
<artifactId>maven-compiler-plugin</artifactId>
143+
<version>${maven-compiler-plugin.version}</version>
144+
<configuration>
145+
<source>11</source>
146+
<target>11</target>
147+
</configuration>
148+
</plugin>
149+
<plugin>
150+
<artifactId>maven-surefire-plugin</artifactId>
151+
<version>${maven-surefire-plugin.version}</version>
152+
<configuration>
153+
<skipTests>false</skipTests>
154+
<includes>
155+
<include>**/*Test.java</include>
156+
</includes>
157+
</configuration>
158+
<executions>
159+
<execution>
160+
<phase>integration-test</phase>
161+
<goals>
162+
<goal>test</goal>
163+
</goals>
164+
</execution>
165+
</executions>
166+
</plugin>
167+
</plugins>
168+
</build>
169+
</project>

0 commit comments

Comments
 (0)