Deviation question

Hi,

Can some one help in the following segment. I import a module and do deviation and deviate as shown below, but for some reason the deviate does not work. I tried, other variation, not sure what I am doing wrong. Thanks in advance.

module test-module {

namespace "http://mytypes.com/test";
prefix test;

container ab{
	leaf a {
		type boolean;
		default false;
	}
	leaf b {
		type int32;
		default 25;

	}
}
}

in another module

import test-module {
	   prefix test;
}



deviation "/test:ab/test:b" {
	   deviate delete {      
  		default 25;
	   }
}

That will work if you make sure you compile your “test-module” with the deviation flag and compile and load the deviation module too.

confdc --deviation my-deviation-module.yang -o test-module.fxs -c test-module.yang
confdc -o my-deviation-module.fxs -c my-deviation-module.yang

Thanks Cohult.
I am using a Makefile that generates the the .fxs files for multiple modules. If we assume the module that imports the deviation one is called main-module.yang,
How would I include these options for just the deviation module in the Makefile?

I think you need to do it in your Makefile. We do not know your Makefile targets, but generally you may create target just for the deviation related module(s) which would override other FXS target(s).

Like Conny suggested:

test-module.fxs:
         confdc --deviation my-deviation-module.yang -o test-module.fxs -c test-module.yang

my-deviation-module.fxs:
          confdc -o my-deviation-module.fxs -c my-deviation-module.yang

Thank you for your help