# Deviation question

**URL:** <https://dmap-community.ductus.global/t/deviation-question/2694>\
**Category:** YANG\
**Created:** [October 1, 2019, 12:57am UTC](https://dmap-community.ductus.global/t/deviation-question/2694 "2019-10-01T00:57:14Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![sunny](https://avatars.discourse-cdn.com/v4/letter/s/7c8e57/32.png) [@sunny](https://dmap-community.ductus.global/u/sunny)\
**Post date:** [October 1, 2019, 12:57am UTC](https://dmap-community.ductus.global/t/deviation-question/2694/1 "2019-10-01T00:57:14Z")

</div>

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;
	   }
}
```

---

<div class="post-metadata">

**Author:** ![cohult](https://yyz2.discourse-cdn.com/flex010/user_avatar/dmap-community.ductus.global/cohult/32/221_2.png) [@cohult](https://dmap-community.ductus.global/u/cohult)\
**Post date:** [October 1, 2019, 6:23am UTC](https://dmap-community.ductus.global/t/deviation-question/2694/2 "2019-10-01T06:23:08Z")

</div>

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

---

<div class="post-metadata">

**Author:** ![sunny](https://avatars.discourse-cdn.com/v4/letter/s/7c8e57/32.png) [@sunny](https://dmap-community.ductus.global/u/sunny)\
**Post date:** [October 1, 2019, 1:20pm UTC](https://dmap-community.ductus.global/t/deviation-question/2694/3 "2019-10-01T13:20:36Z")

</div>

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?

---

<div class="post-metadata">

**Author:** ![mnovak](https://yyz2.discourse-cdn.com/flex010/user_avatar/dmap-community.ductus.global/mnovak/32/183_2.png) [@mnovak](https://dmap-community.ductus.global/u/mnovak)\
**Post date:** [October 3, 2019, 11:57am UTC](https://dmap-community.ductus.global/t/deviation-question/2694/4 "2019-10-03T11:57:01Z")

</div>

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:

```auto
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

```

---

<div class="post-metadata">

**Author:** ![sunny](https://avatars.discourse-cdn.com/v4/letter/s/7c8e57/32.png) [@sunny](https://dmap-community.ductus.global/u/sunny)\
**Post date:** [October 3, 2019, 7:43pm UTC](https://dmap-community.ductus.global/t/deviation-question/2694/5 "2019-10-03T19:43:12Z")

</div>

Thank you for your help
