Validation problems. [message #593191] |
Wed, 25 August 2010 18:16 |
|
Hello!!
First to all, thanks you for your time.
I'm using EVL for validate my model and it's working perfect when I create the model. The problem is when I change some object from a container to other.
I have a meta-class called "Zone"
class Zone extends Element, Set{
}
class Set {
val Host[*] hosts;
val Server[*] servers;
}
class Element extends Traficable {
attr IpType[1] ip;
}
and other meta-class called "Host"
class Host extends Element {
}
Well, I have a restriccion, An IP from a Host must to be a valid IP in his Zone.
When I create for example the next model:
+------------------------+
| ZONE1 : 192.168.1.0/24 |
+------------------------+
| |
| +----------------+ |
| |HOST:192.168.1.1| |
| | | |
| +----------------+ |
+------------------------+
+------------------------+
| ZONE2 : 10.10.0.0/18 |
+------------------------+
| |
| |
| |
| |
| |
+------------------------+
The validation works ok. The last model is correct, but, When I change HOST from ZONE1 to ZONE2 (the next situation)
+------------------------+
| ZONE1 : 192.168.1.0/24 |
+------------------------+
| |
| |
| |
| |
| |
+------------------------+
+------------------------+
| ZONE2 : 10.10.0.0/18 |
+------------------------+
| |
| +----------------+ |
| |HOST:192.168.1.1| |
| | | |
| +----------------+ |
+------------------------+
I can check that the model have changed, however, the validation don't give any error and the last situation is not correct.
The problem is only when I change elements, if I remove the host in ZONE1 and I create other in ZONE2 whit the IP 192.168.1.1 the validation gives the error.
Somebody can help me? Why is this happening?
Thanks you.
Jose Miguel.
|
|
|
Re: Validation problems. [message #593205 is a reply to message #593191] |
Thu, 26 August 2010 07:12 |
Hallvard Traetteberg Messages: 673 Registered: July 2009 Location: Trondheim, Norway |
Senior Member |
|
|
Jose,
How do you navigate from the host to the zone? Perhaps the code still
navigates to the previous one?
Seeing the evl code could help in solving the problem.
Hallvard
On 25.08.10 20.16, Jose Miguel wrote:
> Hello!!
> First to all, thanks you for your time.
>
> I'm using EVL for validate my model and it's working perfect when I
> create the model. The problem is when I change some object from a
> container to other.
>
> I have a meta-class called "Zone"
>
> class Zone extends Element, Set{
> }
>
> class Set {
> val Host[*] hosts;
> val Server[*] servers;
> }
>
> class Element extends Traficable {
> attr IpType[1] ip;
> }
>
>
> and other meta-class called "Host"
>
> class Host extends Element {
>
> }
>
> Well, I have a restriccion, An IP from a Host must to be a valid IP in
> his Zone.
>
> When I create for example the next model:
>
> +------------------------+
> | ZONE1 : 192.168.1.0/24 |
> +------------------------+
> | |
> | +----------------+ |
> | |HOST:192.168.1.1| |
> | | | |
> | +----------------+ |
> +------------------------+
>
> +------------------------+
> | ZONE2 : 10.10.0.0/18 |
> +------------------------+
> | |
> | |
> | |
> | |
> | |
> +------------------------+
>
> The validation works ok. The last model is correct, but, When I change
> HOST from ZONE1 to ZONE2 (the next situation)
>
>
> +------------------------+
> | ZONE1 : 192.168.1.0/24 |
> +------------------------+
> | |
> | |
> | |
> | |
> | |
> +------------------------+
>
> +------------------------+
> | ZONE2 : 10.10.0.0/18 |
> +------------------------+
> | |
> | +----------------+ |
> | |HOST:192.168.1.1| |
> | | | |
> | +----------------+ |
> +------------------------+
>
> I can check that the model have changed, however, the validation don't
> give any error and the last situation is not correct.
>
>
> The problem is only when I change elements, if I remove the host in
> ZONE1 and I create other in ZONE2 whit the IP 192.168.1.1 the validation
> gives the error.
>
> Somebody can help me? Why is this happening?
> Thanks you.
>
> Jose Miguel.
|
|
|
Powered by
FUDForum. Page generated in 0.01974 seconds