Skip to content

Commit 4222ceb

Browse files
committed
Update wskadmin
1 parent fea609c commit 4222ceb

File tree

1 file changed

+47
-2
lines changed

1 file changed

+47
-2
lines changed

tools/admin/wskadmin

Lines changed: 47 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -148,6 +148,17 @@ def parseArgs():
148148
subcmd.add_argument('--concurrentInvocations', help='concurrent invocations allowed for this namespace', type=int)
149149
subcmd.add_argument('--allowedKinds', help='list of runtime kinds allowed in this namespace', nargs='+', type=str)
150150
subcmd.add_argument('--storeActivations', help='enable or disable storing of activations to datastore for this namespace', default=None, type=str_to_bool)
151+
subcmd.add_argument('--minActionMemory', help='minimum action memory size for this namespace', default=None, type=int)
152+
subcmd.add_argument('--maxActionMemory', help='maximum action memory size for this namespace', default=None, type=int)
153+
subcmd.add_argument('--minActionLogs', help='minimum activation log size for this namespace', default=None, type=int)
154+
subcmd.add_argument('--maxActionLogs', help='maximum activation log size for this namespace', default=None, type=int)
155+
subcmd.add_argument('--minActionTimeout', help='minimum action time limit for this namespace', default=None, type=int)
156+
subcmd.add_argument('--maxActionTimeout', help='maximum action time limit for this namespace', default=None, type=int)
157+
subcmd.add_argument('--minActionConcurrency', help='minimum action concurrency limit for this namespace', default=None, type=int)
158+
subcmd.add_argument('--maxActionConcurrency', help='maximum action concurrency limit for this namespace', default=None, type=int)
159+
subcmd.add_argument('--maxParameterSize', help='maximum parameter size for this namespace', default=None, type=str)
160+
subcmd.add_argument('--maxPayloadSize', help='maximum payload size for this namespace', default=None, type=str)
161+
subcmd.add_argument('--truncationSize', help='activation truncation size for this namespace', default=None, type=str)
151162

152163
subcmd = subparser.add_parser('get', help='get limits for a given namespace (if none exist, system defaults apply)')
153164
subcmd.add_argument('namespace', help='the namespace to get limits for')
@@ -549,7 +560,24 @@ def setLimitsCmd(args, props):
549560
(dbDoc, res) = getDocumentFromDb(props, quote_plus(docId), args.verbose)
550561
doc = dbDoc or {'_id': docId}
551562

552-
limits = ['invocationsPerMinute', 'firesPerMinute', 'concurrentInvocations', 'allowedKinds', 'storeActivations']
563+
limits = [
564+
'invocationsPerMinute',
565+
'firesPerMinute',
566+
'concurrentInvocations',
567+
'allowedKinds',
568+
'storeActivations',
569+
'minActionMemory',
570+
'maxActionMemory',
571+
'minActionLogs',
572+
'maxActionLogs',
573+
'minActionTimeout',
574+
'maxActionTimeout',
575+
'minActionConcurrency',
576+
'maxActionConcurrency',
577+
'maxParameterSize',
578+
'maxPayloadSize',
579+
'truncationSize'
580+
]
553581
for limit in limits:
554582
givenLimit = argsDict.get(limit)
555583
toSet = givenLimit if givenLimit != None else doc.get(limit)
@@ -568,7 +596,24 @@ def getLimitsCmd(args, props):
568596
(dbDoc, res) = getDocumentFromDb(props, quote_plus(docId), args.verbose)
569597

570598
if dbDoc is not None:
571-
limits = ['invocationsPerMinute', 'firesPerMinute', 'concurrentInvocations', 'allowedKinds', 'storeActivations']
599+
limits = [
600+
'invocationsPerMinute',
601+
'firesPerMinute',
602+
'concurrentInvocations',
603+
'allowedKinds',
604+
'storeActivations',
605+
'minActionMemory',
606+
'maxActionMemory',
607+
'minActionLogs',
608+
'maxActionLogs',
609+
'minActionTimeout',
610+
'maxActionTimeout',
611+
'minActionConcurrency',
612+
'maxActionConcurrency',
613+
'maxParameterSize',
614+
'maxPayloadSize',
615+
'truncationSize'
616+
]
572617
for limit in limits:
573618
givenLimit = dbDoc.get(limit)
574619
if givenLimit != None:

0 commit comments

Comments
 (0)