@@ -57,7 +57,7 @@ type ganesha_v2_export_FSAL = {
57
57
# "FSAL" ? ganesha_v2_export_FSAL
58
58
# FSAL_VFS
59
59
" pnfs" ? boolean = false
60
- " fsid_type" ? string with match (SELF , ' ^(None| One64| Major64| Two64| uuid| Two32| Dev| Device)$ ' )
60
+ " fsid_type" ? choice( ' None ' , ' One64' , ' Major64' , ' Two64' , ' uuid' , ' Two32' , ' Dev' , ' Device' )
61
61
# FSAL_GLUSTER
62
62
" glfs_log" ? string = " /tmp/gfapi.log"
63
63
" hostname" ? string # Mandatory
@@ -71,26 +71,40 @@ type ganesha_v2_export_FSAL = {
71
71
" PNFS" ? ganesha_v2_export_FSAL_PNFS
72
72
};
73
73
74
- type ganesha_v2_protocol = string with match (SELF, ' ^((NFS)?[vV]?[34]|9P)$' );
75
- type ganesha_v2_SecType = string with match (SELF, ' ^(none|sys|krb5[ip]?)$' );
76
- type ganesha_v2_Transports = string with match (SELF, ' ^(UDP|TCP)$' );
74
+ type ganesha_v2_protocol = choice(' 3' , ' 4' , ' NFS3' , ' NFS4' , ' V3' , ' V4' , ' NFSv3' , ' NFSv4' , ' 9P' );
75
+ type ganesha_v2_SecType = choice(' none' , ' sys' , ' krb5' , ' krb5i' , ' krb5p' );
76
+ type ganesha_v2_Transports = choice(' UDP' , ' TCP' );
77
+ type ganesha_v2_delegations = choice(' None' , ' read' , ' write' , ' readwrite' , ' r' , ' w' , ' rw' );
77
78
78
79
@{ Ganesha Export Permissions for EXPORT_DEFAULLTS, EXPORT and CLIENT sections @}
79
80
type ganesha_v2_export_permissions = {
80
- " Access_Type" ? string = ' None' with match (SELF , ' ^(None|RW|RO| MDONLY| MDONLY_RO)$ ' )
81
+ " Access_Type" ? choice( ' None' , ' RW ' , ' RO ' , ' MDONLY' , ' MDONLY_RO' ) = ' None '
81
82
" Anonymous_gid" ? long = -2
82
83
" Anonymous_uid" ? long = -2
83
- " Delegations" ? string with match (SELF, ' ^(None|read|write|readwrite|r|w|rw)$ ' )
84
+ " Delegations" ? ganesha_v2_delegations
84
85
" Disable_ACL" ? boolean = false
85
86
" DisableReaddirPlus" ? boolean = false
86
87
" Manage_Gids" ? boolean = false
87
88
" NFS_Commit" ? boolean = false
88
89
" PrivilegedPort" ? boolean = false
89
90
" Protocols" ? ganesha_v2_protocol[] = list (' 3' , ' 4' , ' 9P' )
90
91
" SecType" ? ganesha_v2_SecType[] = list (' none' , ' sys' )
91
- " Squash" ? string = " root_squash" with match (SELF,
92
- ' ^((root|all)(_?squash)?|no_root_squash|none|noidsquash)$'
93
- )
92
+ " Squash" ? choice(
93
+ ' root' ,
94
+ ' root_squash' ,
95
+ ' rootsquash' ,
96
+ ' rootid' ,
97
+ ' root_id_squash' ,
98
+ ' rootidsquash' ,
99
+ ' all' ,
100
+ ' all_squash' ,
101
+ ' allsquash' ,
102
+ ' all_anomnymous' ,
103
+ ' allanonymous' ,
104
+ ' no_root_squash' ,
105
+ ' none' ,
106
+ ' noidsquash'
107
+ ) = " root_squash"
94
108
" Transports" ? ganesha_v2_Transports[] = list (' UDP' , ' TCP' )
95
109
" Trust_Readdir_Negative_Cache" ? boolean = false
96
110
};
@@ -130,8 +144,19 @@ type ganesha_v2_exports = {
130
144
" UseCookieVerifier" ? boolean = true
131
145
};
132
146
133
- type ganesha_v2_log_level = string with match (SELF,
134
- ' ^(NULL|FATAL|MAJ|CRIT|WARN|EVENT|INFO|DEBUG|MID_DEBUG|M_DBG|FULL_DEBUG|F_DBG)$'
147
+ type ganesha_v2_log_level = choice(
148
+ ' NULL' ,
149
+ ' FATAL' ,
150
+ ' MAJ' ,
151
+ ' CRIT' ,
152
+ ' WARN' ,
153
+ ' EVENT' ,
154
+ ' INFO' ,
155
+ ' DEBUG' ,
156
+ ' MID_DEBUG' ,
157
+ ' M_DBG' ,
158
+ ' FULL_DEBUG' ,
159
+ ' F_DBG'
135
160
);
136
161
137
162
@{ Check for valid Ganesha Log Component names @}
@@ -146,8 +171,19 @@ function is_ganesha_v2_log_Components = {
146
171
};
147
172
type ganesha_v2_log_Components = ganesha_v2_log_level{} with is_ganesha_v2_log_Components(SELF);
148
173
149
- type ganesha_v2_log_time_format = string with match (SELF,
150
- ' ^(ganesha|true|local|8601|ISO-8601|ISO 8601|ISO|syslog|syslog_usec|false|none|user_defined)$'
174
+ type ganesha_v2_log_time_format = choice(
175
+ ' ganesha' ,
176
+ ' true' ,
177
+ ' local' ,
178
+ ' 8601' ,
179
+ ' ISO-8601' ,
180
+ ' ISO 8601' ,
181
+ ' ISO' ,
182
+ ' syslog' ,
183
+ ' syslog_usec' ,
184
+ ' false' ,
185
+ ' none' ,
186
+ ' user_defined'
151
187
);
152
188
153
189
@{ Ganesha Log Format subsection @}
@@ -173,8 +209,8 @@ type ganesha_v2_log_Format = {
173
209
@{ Ganesha Log Facility subsection @}
174
210
type ganesha_v2_log_Facility = {
175
211
" destination" : string
176
- " enable" ? string = ' idle' with match (SELF , ' ^(idle| active| default)$ ' )
177
- " headers" ? string = ' all' with match (SELF, ' ^(none|component| all)$ ' )
212
+ " enable" ? choice( ' idle' , ' active' , ' default' ) = ' idle '
213
+ " headers" ? choice( ' none ' , ' component ' , ' all' ) = ' all'
178
214
" max_level" ? ganesha_v2_log_level = ' FULL_DEBUG'
179
215
" name" ? string
180
216
};
@@ -283,7 +319,7 @@ type ganesha_v2_proxy_remote_server = {
283
319
" RPC_Client_Timeout" ? long(0..) = 60
284
320
" Remote_PrincipalName" ? string
285
321
" Retry_SleepTime" ? long(0..) = 10
286
- " Sec_Type" ? string = ' krb5' with match (SELF , ' ^krb5[ip]?$ ' )
322
+ " Sec_Type" ? choice( ' none ' , ' krb5' , ' krb5i ' , ' krb5p ' ) = ' krb5 '
287
323
" Srv_Addr" ? type_ip = " 127.0.0.1"
288
324
" Use_Privileged_Client_Port" ? boolean = false
289
325
};
@@ -314,7 +350,7 @@ type ganesha_v2_proxy = {
314
350
@{ Ganesha GPFS section @}
315
351
type ganesha_v2_GPFS = {
316
352
include ganesha_v2_fsalsettings_all
317
- " Delegations" ? string with match (SELF, ' ^(None|read|write|readwrite|r|w|rw)$ ' )
353
+ " Delegations" ? ganesha_v2_delegations
318
354
" fsal_grace" ? boolean = false
319
355
" fsal_trace" ? boolean = true
320
356
" pnfs_file" ? boolean = false
0 commit comments