reverted internal-rpc nacm rule

This commit is contained in:
Olof Hagsand 2019-03-26 16:26:07 +01:00
parent 3f3f70dfd6
commit 5fd092b785
5 changed files with 7 additions and 24 deletions

View file

@ -51,7 +51,6 @@
### Minor changes ### Minor changes
* Added synatctic check for yang status: current, deprectated or obsolete. * Added synatctic check for yang status: current, deprectated or obsolete.
* Added CLICON_NACM_MODE "internal-rpc" which is for RPC functionality only, ie no module or data-node read-write functionality. This is for backward compatibility with Clixon 3. (A reduced-functionality "internal")
* Made Makefile concurrent so that it can be compiled with -jN * Made Makefile concurrent so that it can be compiled with -jN
* Added flags to example backend to control its behaviour: * Added flags to example backend to control its behaviour:
* Start with `-- -r` to run the reset plugin * Start with `-- -r` to run the reset plugin

View file

@ -409,16 +409,16 @@ Step have the following mandatory arguments:
* when - A boolean XPath determining if the step should be evaluated for that (target) node. * when - A boolean XPath determining if the step should be evaluated for that (target) node.
Extended arguments: Extended arguments:
* string - XPath string argument (rename) * tag - XPath string argument (rename)
* xml - XML expression for a new or transformed node (replace, insert) * new - XML expression for a new or transformed node (replace, insert)
* node - XPath node expression (move) * dst - XPath node expression (move)
Step summary: Step summary:
* rename(where:targets, when:bool, tag:string) * rename(where:targets, when:bool, tag:string)
* replace(where:targets, when:bool, new:xml) * replace(where:targets, when:bool, new:xml)
* insert(where:parents, when:bool, new:xml) * insert(where:parents, when:bool, new:xml)
* delete(where:parents, when:bool) * delete(where:parents, when:bool)
* move(where:parents, when:bool, to:node) * move(where:parents, when:bool, dst:node)
## Flowcharts ## Flowcharts

View file

@ -808,7 +808,7 @@ nacm_access(char *mode,
goto permit; goto permit;
/* 0. If nacm-mode is external, get NACM defintion from separet tree, /* 0. If nacm-mode is external, get NACM defintion from separet tree,
otherwise get it from internal configuration */ otherwise get it from internal configuration */
if (strcmp(mode, "external") && strcmp(mode, "internal") && strcmp(mode, "internal-rpc")){ if (strcmp(mode, "external") && strcmp(mode, "internal")){
clicon_err(OE_XML, 0, "Invalid NACM mode: %s", mode); clicon_err(OE_XML, 0, "Invalid NACM mode: %s", mode);
goto done; goto done;
} }
@ -884,15 +884,6 @@ nacm_access_pre(clicon_handle h,
if (xmldb_get(h, "running", "nacm", 0, &xnacm0, NULL) < 0) if (xmldb_get(h, "running", "nacm", 0, &xnacm0, NULL) < 0)
goto done; goto done;
} }
else if (strcmp(mode, "internal-rpc")==0){
/* Special mode only implemet exec rpc access point */
if (point == NACM_RPC){
if (xmldb_get(h, "running", "nacm", 0, &xnacm0, NULL) < 0)
goto done;
}
else
goto permit;
}
} }
/* If config does not exist then the operation is permitted(?) */ /* If config does not exist then the operation is permitted(?) */
if (xnacm0 == NULL) if (xnacm0 == NULL)

View file

@ -216,8 +216,8 @@ xml_cmp(const void* arg1,
char *keyname; char *keyname;
cg_var *cv1; cg_var *cv1;
cg_var *cv2; cg_var *cv2;
int nr1; int nr1 = 0;
int nr2; int nr2 = 0;
cxobj *x1b; cxobj *x1b;
cxobj *x2b; cxobj *x2b;
int e; int e;

View file

@ -121,13 +121,6 @@ module clixon-config {
enum internal{ enum internal{
description "NACM is enabled and available in the regular config"; description "NACM is enabled and available in the regular config";
} }
enum internal-rpc{
description
"NACM is enabled and available in the regular config.
But only for RPC functionality, ie no module or data-node
read-write functionality.
This is for backward compatibility with Clixon 3.8.";
}
enum external{ enum external{
description "NACM is enabled and available in a separate config"; description "NACM is enabled and available in a separate config";
} }