Skip to content

Commit 36f1278

Browse files
feat(graph): update netapp nodes (#26)
1 parent 6f08291 commit 36f1278

11 files changed

Lines changed: 91 additions & 18 deletions

docs/analysis/additional-nodes/netapp-account-ad-domain.md

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,8 +10,11 @@ Represents an Active Directory domain configuration for an Azure NetApp Files ac
1010
- `administrators` - List of administrator accounts
1111
- `aesEncryption` - Whether AES encryption is enabled
1212
- `allowLocalNfsUsersWithLdap` - Whether local NFS users are allowed with LDAP
13+
- `backupOperators` - Backup operator accounts for the AD domain
1314
- `dns` - DNS server configuration
15+
- `domain` - Active Directory domain name
1416
- `encryptDCConnections` - Whether domain controller connections are encrypted
17+
- `kdcIP` - Kerberos KDC IP address
1518
- `ldapOverTLS` - Whether LDAP over TLS is enabled
1619
- `ldapSigning` - LDAP signing configuration
1720
- `organizationalUnit` - Organizational unit for computer accounts

docs/analysis/arm-nodes/netapp/netapp-account.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -15,4 +15,5 @@ Represents an Azure NetApp Files account for managing file storage pools and vol
1515

1616
- **IS_DEPLOYED****NetAppAccountADDomain** - Links to Active Directory domain configurations
1717
- **CONTAINS****NetAppCapacityPool** - Contains capacity pools
18+
- **HAS_BACKUP_VAULT****NetAppBackupVault** - Associated backup vaults
1819
- **HAS_POLICY****NetAppSnapshotPolicy** - Associated snapshot policies
Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
# NetAppBackupVault
2+
3+
Represents a backup vault for Azure NetApp Files account backups.
4+
5+
**Labels:** `:ArmResource`, `:NetAppBackupVault`
6+
7+
**Properties:**
8+
9+
- `id` - Resource identifier (primary key)
10+
- `provisioningState` - Current provisioning state
11+
12+
## Relationships
13+
14+
- **NetAppAccount****HAS_BACKUP_VAULT****NetAppBackupVault** - Associated backup vault for the NetApp account

docs/analysis/arm-nodes/netapp/netapp-volume.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,7 @@ Represents a volume within an Azure NetApp Files capacity pool.
1010
- `baremetalTenantId` - Bare metal tenant identifier
1111
- `coolAccess` - Cool access configuration
1212
- `creationToken` - Unique creation token for the volume
13+
- `enableSubvolumes` - Whether subvolumes are enabled
1314
- `encryptionKeySource` - Source of encryption keys
1415
- `fileSystemId` - File system identifier
1516
- `isDefaultQuotaEnabled` - Whether default quota is enabled
Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,22 @@
1+
# HAS_BACKUP_VAULT
2+
3+
Links NetApp accounts to their associated NetApp backup vault resources.
4+
5+
**Relationship:** `:HAS_BACKUP_VAULT`
6+
7+
**Direction:** `(:NetAppAccount)-[:HAS_BACKUP_VAULT]->(:NetAppBackupVault)`
8+
9+
## Description
10+
11+
This relationship indicates which backup vault belongs to a specific NetApp account.
12+
13+
## Examples
14+
15+
### NetAppAccount → NetAppBackupVault
16+
Connects an Azure NetApp Files account to the backup vault used to store and manage backups for that account.
17+
18+
## Use Cases
19+
20+
- Identifying backup coverage for NetApp accounts
21+
- Mapping backup dependencies for NetApp storage workloads
22+
- Tracing account-to-vault backup topology

src/graph/config/azure/arm/netapp/netapp_accounts.tera.yaml

Lines changed: 22 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -16,22 +16,27 @@ cypher: |
1616
}
1717
1818
// Iterate over Active Directories and create relationships
19-
WITH obj, row, row.properties.activeDirectories AS activeDirectories
20-
UNWIND activeDirectories AS ad
21-
MERGE (adNode:{{ LABELS.NetAppAccountADDomain }} {activeDirectoryId: toLower(ad.activeDirectoryId)})
22-
SET adNode += {
23-
administrators: ad.administrators,
24-
aesEncryption: ad.aesEncryption,
25-
allowLocalNfsUsersWithLdap: ad.allowLocalNfsUsersWithLdap,
26-
dns: ad.dns,
27-
encryptDCConnections: ad.encryptDCConnections,
28-
ldapOverTLS: ad.ldapOverTLS,
29-
ldapSigning: ad.ldapSigning,
30-
organizationalUnit: ad.organizationalUnit,
31-
site: ad.site,
32-
smbServerName: ad.smbServerName,
33-
status: ad.status,
34-
username: ad.username
19+
CALL (obj, row) {
20+
WITH obj, row, row.properties.activeDirectories AS activeDirectories
21+
UNWIND activeDirectories AS ad
22+
MERGE (adNode:{{ LABELS.NetAppAccountADDomain }} {activeDirectoryId: toLower(ad.activeDirectoryId)})
23+
SET adNode += {
24+
administrators: ad.administrators,
25+
aesEncryption: ad.aesEncryption,
26+
allowLocalNfsUsersWithLdap: ad.allowLocalNfsUsersWithLdap,
27+
backupOperators: ad.backupOperators,
28+
dns: ad.dns,
29+
domain: ad.domain,
30+
encryptDCConnections: ad.encryptDCConnections,
31+
kdcIP: ad.kdcIP,
32+
ldapOverTLS: ad.ldapOverTLS,
33+
ldapSigning: ad.ldapSigning,
34+
organizationalUnit: ad.organizationalUnit,
35+
site: ad.site,
36+
smbServerName: ad.smbServerName,
37+
status: ad.status,
38+
username: ad.username
39+
}
40+
MERGE (obj)-[:{{ REL.IS_DEPLOYED }}]->(adNode)
3541
}
36-
MERGE (obj)-[:{{ REL.IS_DEPLOYED }}]->(adNode)
3742
RETURN count(*) AS _
Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,20 @@
1+
name: "NetApp Backup Vaults"
2+
label: "{{ LABELS.NetAppBackupVault }}"
3+
table_name: "resources"
4+
resource_type: "microsoft.netapp/backupvaults"
5+
properties:
6+
- "/id"
7+
- "/properties"
8+
cypher: |
9+
UNWIND $batch AS row
10+
MERGE (obj:{{ LABELS.ArmResource }} {id: toLower(row.id)})
11+
SET obj:{{ LABELS.NetAppBackupVault }}
12+
SET obj += {
13+
provisioningState: row.properties.provisioningState
14+
}
15+
16+
// Create relationship to NetApp Account
17+
WITH obj, row, split(toLower(row.id), '/backupvaults/')[0] AS netappAccountId
18+
MERGE (n:{{ LABELS.ArmResource }} {id: toLower(netappAccountId)})
19+
SET n:{{ LABELS.NetAppAccount }}
20+
MERGE (n)-[:{{ REL.HAS_BACKUP_VAULT }}]->(obj)

src/graph/config/azure/arm/netapp/netapp_capacity_pool_volumes.tera.yaml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,7 @@ cypher: |
1313
baremetalTenantId: row.properties.baremetalTenantId,
1414
coolAccess: row.properties.coolAccess,
1515
creationToken: row.properties.creationToken,
16+
enableSubvolumes: row.properties.enableSubvolumes,
1617
encryptionKeySource: row.properties.encryptionKeySource,
1718
fileSystemId: row.properties.fileSystemId,
1819
isDefaultQuotaEnabled: row.properties.isDefaultQuotaEnabled,

src/graph/config/azure/arm/netapp/netapp_capacity_pools.tera.yaml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,8 @@ resource_type: "microsoft.netapp/netappaccounts/capacitypools"
55
properties:
66
- "/id"
77
- "/properties"
8+
index_properties:
9+
- "{{ LABELS.NetAppCapacityPool }}.poolId"
810
cypher: |
911
UNWIND $batch AS row
1012
MERGE (obj:{{ LABELS.ArmResource }} {id: toLower(row.id)})

src/graph/config/constants.yaml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,7 @@ REL:
1212
HAS_ALERT: "HAS_ALERT"
1313
HAS_APPLICATION: "HAS_APPLICATION"
1414
HAS_APPROLE: "HAS_APPROLE"
15+
HAS_BACKUP_VAULT: "HAS_BACKUP_VAULT"
1516
HAS_BUILDER: "HAS_BUILDER"
1617
HAS_CERTIFICATE: "HAS_CERTIFICATE"
1718
HAS_CONFIG: "HAS_CONFIG"
@@ -148,6 +149,7 @@ LABELS:
148149
ManagedHSM: "ManagedHSM"
149150
MLWorkspace: "MLWorkspace"
150151
NetAppAccount: "NetAppAccount"
152+
NetAppBackupVault: "NetAppBackupVault"
151153
NetAppCapacityPool: "NetAppCapacityPool"
152154
NetAppSnapshotPolicy: "NetAppSnapshotPolicy"
153155
NetAppVolume: "NetAppVolume"

0 commit comments

Comments
 (0)