Re: [Freeipa-devel] [PATCH] 869 topology: restrict direction changes

2015-06-15 Thread Petr Vobornik

On 06/12/2015 06:34 PM, Martin Babinsky wrote:

On 06/11/2015 01:41 PM, Petr Vobornik wrote:

On 06/11/2015 01:11 PM, Ludwig Krispenz wrote:


On 06/11/2015 12:53 PM, Petr Vobornik wrote:

On 06/11/2015 12:35 PM, Ludwig Krispenz wrote:


On 06/11/2015 12:19 PM, Petr Vobornik wrote:

On 06/11/2015 10:22 AM, Martin Babinsky wrote:

On 06/10/2015 03:13 PM, Petr Vobornik wrote:

topology plugin doesn't properly handle:
- creation of segment with direction 'none' and then upgrade to
other
   direction
- downgrade of direction

These situations are now forbidden in API.

part of: https://fedorahosted.org/freeipa/ticket/4302



ACK



Looking at Ludwig's path 12, the patch completely forbids mod of
ipaReplTopoSegmentDirection?

that's what I thought we agreed on,


I thought, that we will only complain loudly on downgrade of
connection.


so you would have to add a segment
in the opposite direction an they would be merged to both,
but maybe this is a bit strict.


This could work as well, but:

I just tried (without patch 12) to create:
1. A to B, left-right: success
2. B to A, right-left: Server is unwilling to perform: Segment
already exists in topology or is self referential. Add rejected.

yes, B to  A, right-left is the same as A-B, left right


Sorry, you are right, I wrote it badly. I'm not sure if the servers are
broken from testing and previous bugs. Maybe I should reinstalled, but
I'm experiencing following weird behavior:

A-B segment, doesn't exist.

1. A to B, left-right: success
2. A to B, right-left: Server is unwilling to perform: Segment already
exists in topology or is self referential. Add rejected.

If I try different direction (started with 4 segments):
1. A to B, right-left: success, 5 segments exist
2. A to B, left-right: success, 4 segments exist - the new ones are gone

Martin, can you reproduce it?



I.e., the upgrade didn't happen.


I could allow for
ipaReplTopoSegmentDirection replace: both

So that upgrade from right-left and left-right to both is not
allowed?  If so then this patch needs to be updated.

depends a bit on what you prefer and what we can get in for alpha.


Depends what's better, I already have adjusted patch for ^^ so it's
not about the work.

so lets take the changes to your patch and we could still extend
functionality a bit for beta or later



OK, attaching rebased patch.

ACK



Pushed to master: 6b153ba876edf1ed9249ed29420a4af2b2e1830d
--
Petr Vobornik

--
Manage your subscription for the Freeipa-devel mailing list:
https://www.redhat.com/mailman/listinfo/freeipa-devel
Contribute to FreeIPA: http://www.freeipa.org/page/Contribute/Code


Re: [Freeipa-devel] [PATCH] 869 topology: restrict direction changes

2015-06-12 Thread Martin Babinsky

On 06/11/2015 01:41 PM, Petr Vobornik wrote:

On 06/11/2015 01:11 PM, Ludwig Krispenz wrote:


On 06/11/2015 12:53 PM, Petr Vobornik wrote:

On 06/11/2015 12:35 PM, Ludwig Krispenz wrote:


On 06/11/2015 12:19 PM, Petr Vobornik wrote:

On 06/11/2015 10:22 AM, Martin Babinsky wrote:

On 06/10/2015 03:13 PM, Petr Vobornik wrote:

topology plugin doesn't properly handle:
- creation of segment with direction 'none' and then upgrade to
other
   direction
- downgrade of direction

These situations are now forbidden in API.

part of: https://fedorahosted.org/freeipa/ticket/4302



ACK



Looking at Ludwig's path 12, the patch completely forbids mod of
ipaReplTopoSegmentDirection?

that's what I thought we agreed on,


I thought, that we will only complain loudly on downgrade of connection.


so you would have to add a segment
in the opposite direction an they would be merged to both,
but maybe this is a bit strict.


This could work as well, but:

I just tried (without patch 12) to create:
1. A to B, left-right: success
2. B to A, right-left: Server is unwilling to perform: Segment
already exists in topology or is self referential. Add rejected.

yes, B to  A, right-left is the same as A-B, left right


Sorry, you are right, I wrote it badly. I'm not sure if the servers are
broken from testing and previous bugs. Maybe I should reinstalled, but
I'm experiencing following weird behavior:

A-B segment, doesn't exist.

1. A to B, left-right: success
2. A to B, right-left: Server is unwilling to perform: Segment already
exists in topology or is self referential. Add rejected.

If I try different direction (started with 4 segments):
1. A to B, right-left: success, 5 segments exist
2. A to B, left-right: success, 4 segments exist - the new ones are gone

Martin, can you reproduce it?



I.e., the upgrade didn't happen.


I could allow for
ipaReplTopoSegmentDirection replace: both

So that upgrade from right-left and left-right to both is not
allowed?  If so then this patch needs to be updated.

depends a bit on what you prefer and what we can get in for alpha.


Depends what's better, I already have adjusted patch for ^^ so it's
not about the work.

so lets take the changes to your patch and we could still extend
functionality a bit for beta or later



OK, attaching rebased patch.

ACK

--
Martin^3 Babinsky

--
Manage your subscription for the Freeipa-devel mailing list:
https://www.redhat.com/mailman/listinfo/freeipa-devel
Contribute to FreeIPA: http://www.freeipa.org/page/Contribute/Code


Re: [Freeipa-devel] [PATCH] 869 topology: restrict direction changes

2015-06-11 Thread Ludwig Krispenz


On 06/11/2015 01:41 PM, Petr Vobornik wrote:

On 06/11/2015 01:11 PM, Ludwig Krispenz wrote:


On 06/11/2015 12:53 PM, Petr Vobornik wrote:

On 06/11/2015 12:35 PM, Ludwig Krispenz wrote:


On 06/11/2015 12:19 PM, Petr Vobornik wrote:

On 06/11/2015 10:22 AM, Martin Babinsky wrote:

On 06/10/2015 03:13 PM, Petr Vobornik wrote:

topology plugin doesn't properly handle:
- creation of segment with direction 'none' and then upgrade to 
other

   direction
- downgrade of direction

These situations are now forbidden in API.

part of: https://fedorahosted.org/freeipa/ticket/4302



ACK



Looking at Ludwig's path 12, the patch completely forbids mod of
ipaReplTopoSegmentDirection?

that's what I thought we agreed on,


I thought, that we will only complain loudly on downgrade of 
connection.



so you would have to add a segment
in the opposite direction an they would be merged to both,
but maybe this is a bit strict.


This could work as well, but:

I just tried (without patch 12) to create:
1. A to B, left-right: success
2. B to A, right-left: Server is unwilling to perform: Segment
already exists in topology or is self referential. Add rejected.

yes, B to  A, right-left is the same as A-B, left right


Sorry, you are right, I wrote it badly. I'm not sure if the servers 
are broken from testing and previous bugs. Maybe I should reinstalled, 
but I'm experiencing following weird behavior:


A-B segment, doesn't exist.

1. A to B, left-right: success
2. A to B, right-left: Server is unwilling to perform: Segment 
already exists in topology or is self referential. Add rejected.

that is probably a bug, will work on it


If I try different direction (started with 4 segments):
1. A to B, right-left: success, 5 segments exist
2. A to B, left-right: success, 4 segments exist - the new ones are gone

that seems weird, would need to reproduce to investigate.


Martin, can you reproduce it?



I.e., the upgrade didn't happen.


I could allow for
ipaReplTopoSegmentDirection replace: both

So that upgrade from right-left and left-right to both is not
allowed?  If so then this patch needs to be updated.

depends a bit on what you prefer and what we can get in for alpha.


Depends what's better, I already have adjusted patch for ^^ so it's
not about the work.

so lets take the changes to your patch and we could still extend
functionality a bit for beta or later



OK, attaching rebased patch.


--
Manage your subscription for the Freeipa-devel mailing list:
https://www.redhat.com/mailman/listinfo/freeipa-devel
Contribute to FreeIPA: http://www.freeipa.org/page/Contribute/Code


Re: [Freeipa-devel] [PATCH] 869 topology: restrict direction changes

2015-06-11 Thread Petr Vobornik

On 06/11/2015 01:11 PM, Ludwig Krispenz wrote:


On 06/11/2015 12:53 PM, Petr Vobornik wrote:

On 06/11/2015 12:35 PM, Ludwig Krispenz wrote:


On 06/11/2015 12:19 PM, Petr Vobornik wrote:

On 06/11/2015 10:22 AM, Martin Babinsky wrote:

On 06/10/2015 03:13 PM, Petr Vobornik wrote:

topology plugin doesn't properly handle:
- creation of segment with direction 'none' and then upgrade to other
   direction
- downgrade of direction

These situations are now forbidden in API.

part of: https://fedorahosted.org/freeipa/ticket/4302



ACK



Looking at Ludwig's path 12, the patch completely forbids mod of
ipaReplTopoSegmentDirection?

that's what I thought we agreed on,


I thought, that we will only complain loudly on downgrade of connection.


so you would have to add a segment
in the opposite direction an they would be merged to both,
but maybe this is a bit strict.


This could work as well, but:

I just tried (without patch 12) to create:
1. A to B, left-right: success
2. B to A, right-left: Server is unwilling to perform: Segment
already exists in topology or is self referential. Add rejected.

yes, B to  A, right-left is the same as A-B, left right


Sorry, you are right, I wrote it badly. I'm not sure if the servers are 
broken from testing and previous bugs. Maybe I should reinstalled, but 
I'm experiencing following weird behavior:


A-B segment, doesn't exist.

1. A to B, left-right: success
2. A to B, right-left: Server is unwilling to perform: Segment already 
exists in topology or is self referential. Add rejected.


If I try different direction (started with 4 segments):
1. A to B, right-left: success, 5 segments exist
2. A to B, left-right: success, 4 segments exist - the new ones are gone

Martin, can you reproduce it?



I.e., the upgrade didn't happen.


I could allow for
ipaReplTopoSegmentDirection replace: both

So that upgrade from right-left and left-right to both is not
allowed?  If so then this patch needs to be updated.

depends a bit on what you prefer and what we can get in for alpha.


Depends what's better, I already have adjusted patch for ^^ so it's
not about the work.

so lets take the changes to your patch and we could still extend
functionality a bit for beta or later



OK, attaching rebased patch.
--
Petr Vobornik
From 58284c506035906e3609bbf6f153936e49d2a21a Mon Sep 17 00:00:00 2001
From: Petr Vobornik pvobo...@redhat.com
Date: Wed, 10 Jun 2015 14:44:09 +0200
Subject: [PATCH] topology: restrict direction changes

topology plugin doesn't properly handle:
- creation of segment with direction 'none' and then upgrade to other
  direction
- downgrade of direction

These situations are now forbidden in API.

part of: https://fedorahosted.org/freeipa/ticket/4302
---
 API.txt|  7 +++
 VERSION|  4 ++--
 install/ui/src/freeipa/topology.js | 11 ++-
 ipalib/plugins/topology.py |  3 ++-
 4 files changed, 9 insertions(+), 16 deletions(-)

diff --git a/API.txt b/API.txt
index 15356f7ee6330de0822e7582580d2d4f48ad261d..853d26a59bb5bb1ebff698924a36a30b7757c398 100644
--- a/API.txt
+++ b/API.txt
@@ -4757,7 +4757,7 @@ arg: Str('topologysuffixcn', cli_name='topologysuffix', multivalue=False, primar
 arg: Str('cn', attribute=True, cli_name='name', maxlength=255, multivalue=False, primary_key=True, required=True)
 option: Str('addattr*', cli_name='addattr', exclude='webui')
 option: Flag('all', autofill=True, cli_name='all', default=False, exclude='webui')
-option: StrEnum('iparepltoposegmentdirection', attribute=True, cli_name='direction', default=u'both', multivalue=False, required=True, values=(u'both', u'left-right', u'right-left', u'none'))
+option: StrEnum('iparepltoposegmentdirection', attribute=True, cli_name='direction', default=u'both', multivalue=False, required=True, values=(u'both', u'left-right', u'right-left'))
 option: Str('iparepltoposegmentleftnode', attribute=True, cli_name='leftnode', maxlength=255, multivalue=False, pattern='^[a-zA-Z0-9.][a-zA-Z0-9.-]{0,252}[a-zA-Z0-9.$-]?$', required=True)
 option: Str('iparepltoposegmentrightnode', attribute=True, cli_name='rightnode', maxlength=255, multivalue=False, pattern='^[a-zA-Z0-9.][a-zA-Z0-9.-]{0,252}[a-zA-Z0-9.$-]?$', required=True)
 option: StrEnum('nsds5replicaenabled', attribute=True, cli_name='enabled', multivalue=False, required=False, values=(u'on', u'off'))
@@ -4786,7 +4786,7 @@ arg: Str('topologysuffixcn', cli_name='topologysuffix', multivalue=False, primar
 arg: Str('criteria?', noextrawhitespace=False)
 option: Flag('all', autofill=True, cli_name='all', default=False, exclude='webui')
 option: Str('cn', attribute=True, autofill=False, cli_name='name', maxlength=255, multivalue=False, primary_key=True, query=True, required=False)
-option: StrEnum('iparepltoposegmentdirection', attribute=True, autofill=False, cli_name='direction', default=u'both', multivalue=False, query=True, required=False, values=(u'both', u'left-right', u'right-left', 

Re: [Freeipa-devel] [PATCH] 869 topology: restrict direction changes

2015-06-11 Thread Petr Vobornik

On 06/11/2015 12:35 PM, Ludwig Krispenz wrote:


On 06/11/2015 12:19 PM, Petr Vobornik wrote:

On 06/11/2015 10:22 AM, Martin Babinsky wrote:

On 06/10/2015 03:13 PM, Petr Vobornik wrote:

topology plugin doesn't properly handle:
- creation of segment with direction 'none' and then upgrade to other
   direction
- downgrade of direction

These situations are now forbidden in API.

part of: https://fedorahosted.org/freeipa/ticket/4302



ACK



Looking at Ludwig's path 12, the patch completely forbids mod of
ipaReplTopoSegmentDirection?

that's what I thought we agreed on,


I thought, that we will only complain loudly on downgrade of connection.


so you would have to add a segment
in the opposite direction an they would be merged to both,
but maybe this is a bit strict.


This could work as well, but:

I just tried (without patch 12) to create:
1. A to B, left-right: success
2. B to A, right-left: Server is unwilling to perform: Segment already 
exists in topology or is self referential. Add rejected.


I.e., the upgrade didn't happen.


I could allow for
ipaReplTopoSegmentDirection replace: both

So that upgrade from right-left and left-right to both is not
allowed?  If so then this patch needs to be updated.

depends a bit on what you prefer and what we can get in for alpha.


Depends what's better, I already have adjusted patch for ^^ so it's not 
about the work.

--
Petr Vobornik
From 75905481b892efef7d0e5ca92ceb88ff3ab073f3 Mon Sep 17 00:00:00 2001
From: Petr Vobornik pvobo...@redhat.com
Date: Wed, 10 Jun 2015 14:44:09 +0200
Subject: [PATCH] topology: restrict direction changes

topology plugin doesn't properly handle:
- creation of segment with direction 'none' and then upgrade to other
  direction
- downgrade of direction

These situations are now forbidden in API.

part of: https://fedorahosted.org/freeipa/ticket/4302
---
 API.txt|  7 +++
 VERSION|  5 ++---
 install/ui/src/freeipa/topology.js | 11 ++-
 ipalib/plugins/topology.py |  3 ++-
 4 files changed, 9 insertions(+), 17 deletions(-)

diff --git a/API.txt b/API.txt
index 87029947aecaadcefb7fe09c7143db5a44ef2484..21845a75c1b9aecc597827a8c2af92314666b8d3 100644
--- a/API.txt
+++ b/API.txt
@@ -4573,7 +4573,7 @@ arg: Str('topologysuffixcn', cli_name='topologysuffix', multivalue=False, primar
 arg: Str('cn', attribute=True, cli_name='name', maxlength=255, multivalue=False, primary_key=True, required=True)
 option: Str('addattr*', cli_name='addattr', exclude='webui')
 option: Flag('all', autofill=True, cli_name='all', default=False, exclude='webui')
-option: StrEnum('iparepltoposegmentdirection', attribute=True, cli_name='direction', default=u'both', multivalue=False, required=True, values=(u'both', u'left-right', u'right-left', u'none'))
+option: StrEnum('iparepltoposegmentdirection', attribute=True, cli_name='direction', default=u'both', multivalue=False, required=True, values=(u'both', u'left-right', u'right-left'))
 option: Str('iparepltoposegmentleftnode', attribute=True, cli_name='leftnode', maxlength=255, multivalue=False, pattern='^[a-zA-Z0-9.][a-zA-Z0-9.-]{0,252}[a-zA-Z0-9.$-]?$', required=True)
 option: Str('iparepltoposegmentrightnode', attribute=True, cli_name='rightnode', maxlength=255, multivalue=False, pattern='^[a-zA-Z0-9.][a-zA-Z0-9.-]{0,252}[a-zA-Z0-9.$-]?$', required=True)
 option: StrEnum('nsds5replicaenabled', attribute=True, cli_name='enabled', multivalue=False, required=False, values=(u'on', u'off'))
@@ -4602,7 +4602,7 @@ arg: Str('topologysuffixcn', cli_name='topologysuffix', multivalue=False, primar
 arg: Str('criteria?', noextrawhitespace=False)
 option: Flag('all', autofill=True, cli_name='all', default=False, exclude='webui')
 option: Str('cn', attribute=True, autofill=False, cli_name='name', maxlength=255, multivalue=False, primary_key=True, query=True, required=False)
-option: StrEnum('iparepltoposegmentdirection', attribute=True, autofill=False, cli_name='direction', default=u'both', multivalue=False, query=True, required=False, values=(u'both', u'left-right', u'right-left', u'none'))
+option: StrEnum('iparepltoposegmentdirection', attribute=True, autofill=False, cli_name='direction', default=u'both', multivalue=False, query=True, required=False, values=(u'both', u'left-right', u'right-left'))
 option: Str('iparepltoposegmentleftnode', attribute=True, autofill=False, cli_name='leftnode', maxlength=255, multivalue=False, pattern='^[a-zA-Z0-9.][a-zA-Z0-9.-]{0,252}[a-zA-Z0-9.$-]?$', query=True, required=False)
 option: Str('iparepltoposegmentrightnode', attribute=True, autofill=False, cli_name='rightnode', maxlength=255, multivalue=False, pattern='^[a-zA-Z0-9.][a-zA-Z0-9.-]{0,252}[a-zA-Z0-9.$-]?$', query=True, required=False)
 option: StrEnum('nsds5replicaenabled', attribute=True, autofill=False, cli_name='enabled', multivalue=False, query=True, required=False, values=(u'on', u'off'))
@@ -4620,13 +4620,12 @@ output: ListOfEntries('result', (type 

Re: [Freeipa-devel] [PATCH] 869 topology: restrict direction changes

2015-06-11 Thread Ludwig Krispenz


On 06/11/2015 12:19 PM, Petr Vobornik wrote:

On 06/11/2015 10:22 AM, Martin Babinsky wrote:

On 06/10/2015 03:13 PM, Petr Vobornik wrote:

topology plugin doesn't properly handle:
- creation of segment with direction 'none' and then upgrade to other
   direction
- downgrade of direction

These situations are now forbidden in API.

part of: https://fedorahosted.org/freeipa/ticket/4302



ACK



Looking at Ludwig's path 12, the patch completely forbids mod of 
ipaReplTopoSegmentDirection? 
that's what I thought we agreed on, so you would have to add a segment 
in the opposite direction an they would be merged to both,
but maybe this is a bit strict. I could allow for 
ipaReplTopoSegmentDirection replace: both
So that upgrade from right-left and left-right to both is not 
allowed?  If so then this patch needs to be updated.

depends a bit on what you prefer and what we can get in for alpha.

--
Manage your subscription for the Freeipa-devel mailing list:
https://www.redhat.com/mailman/listinfo/freeipa-devel
Contribute to FreeIPA: http://www.freeipa.org/page/Contribute/Code


Re: [Freeipa-devel] [PATCH] 869 topology: restrict direction changes

2015-06-11 Thread Petr Vobornik

On 06/11/2015 10:22 AM, Martin Babinsky wrote:

On 06/10/2015 03:13 PM, Petr Vobornik wrote:

topology plugin doesn't properly handle:
- creation of segment with direction 'none' and then upgrade to other
   direction
- downgrade of direction

These situations are now forbidden in API.

part of: https://fedorahosted.org/freeipa/ticket/4302



ACK



Looking at Ludwig's path 12, the patch completely forbids mod of 
ipaReplTopoSegmentDirection? So that upgrade from right-left and 
left-right to both is not allowed?  If so then this patch needs to be 
updated.

--
Petr Vobornik

--
Manage your subscription for the Freeipa-devel mailing list:
https://www.redhat.com/mailman/listinfo/freeipa-devel
Contribute to FreeIPA: http://www.freeipa.org/page/Contribute/Code


Re: [Freeipa-devel] [PATCH] 869 topology: restrict direction changes

2015-06-11 Thread Ludwig Krispenz


On 06/11/2015 12:53 PM, Petr Vobornik wrote:

On 06/11/2015 12:35 PM, Ludwig Krispenz wrote:


On 06/11/2015 12:19 PM, Petr Vobornik wrote:

On 06/11/2015 10:22 AM, Martin Babinsky wrote:

On 06/10/2015 03:13 PM, Petr Vobornik wrote:

topology plugin doesn't properly handle:
- creation of segment with direction 'none' and then upgrade to other
   direction
- downgrade of direction

These situations are now forbidden in API.

part of: https://fedorahosted.org/freeipa/ticket/4302



ACK



Looking at Ludwig's path 12, the patch completely forbids mod of
ipaReplTopoSegmentDirection?

that's what I thought we agreed on,


I thought, that we will only complain loudly on downgrade of connection.


so you would have to add a segment
in the opposite direction an they would be merged to both,
but maybe this is a bit strict.


This could work as well, but:

I just tried (without patch 12) to create:
1. A to B, left-right: success
2. B to A, right-left: Server is unwilling to perform: Segment 
already exists in topology or is self referential. Add rejected.

yes, B to  A, right-left is the same as A-B, left right


I.e., the upgrade didn't happen.


I could allow for
ipaReplTopoSegmentDirection replace: both

So that upgrade from right-left and left-right to both is not
allowed?  If so then this patch needs to be updated.

depends a bit on what you prefer and what we can get in for alpha.


Depends what's better, I already have adjusted patch for ^^ so it's 
not about the work.
so lets take the changes to your patch and we could still extend 
functionality a bit for beta or later


--
Manage your subscription for the Freeipa-devel mailing list:
https://www.redhat.com/mailman/listinfo/freeipa-devel
Contribute to FreeIPA: http://www.freeipa.org/page/Contribute/Code


Re: [Freeipa-devel] [PATCH] 869 topology: restrict direction changes

2015-06-11 Thread Martin Babinsky

On 06/11/2015 01:41 PM, Petr Vobornik wrote:

On 06/11/2015 01:11 PM, Ludwig Krispenz wrote:


On 06/11/2015 12:53 PM, Petr Vobornik wrote:

On 06/11/2015 12:35 PM, Ludwig Krispenz wrote:


On 06/11/2015 12:19 PM, Petr Vobornik wrote:

On 06/11/2015 10:22 AM, Martin Babinsky wrote:

On 06/10/2015 03:13 PM, Petr Vobornik wrote:

topology plugin doesn't properly handle:
- creation of segment with direction 'none' and then upgrade to
other
   direction
- downgrade of direction

These situations are now forbidden in API.

part of: https://fedorahosted.org/freeipa/ticket/4302



ACK



Looking at Ludwig's path 12, the patch completely forbids mod of
ipaReplTopoSegmentDirection?

that's what I thought we agreed on,


I thought, that we will only complain loudly on downgrade of connection.


so you would have to add a segment
in the opposite direction an they would be merged to both,
but maybe this is a bit strict.


This could work as well, but:

I just tried (without patch 12) to create:
1. A to B, left-right: success
2. B to A, right-left: Server is unwilling to perform: Segment
already exists in topology or is self referential. Add rejected.

yes, B to  A, right-left is the same as A-B, left right


Sorry, you are right, I wrote it badly. I'm not sure if the servers are
broken from testing and previous bugs. Maybe I should reinstalled, but
I'm experiencing following weird behavior:

A-B segment, doesn't exist.

1. A to B, left-right: success
2. A to B, right-left: Server is unwilling to perform: Segment already
exists in topology or is self referential. Add rejected.

If I try different direction (started with 4 segments):
1. A to B, right-left: success, 5 segments exist
2. A to B, left-right: success, 4 segments exist - the new ones are gone

Martin, can you reproduce it?

I'm currently working on something else, but will fetch some fresh VMs 
and try to reproduce this glitch ASAP.


I.e., the upgrade didn't happen.


I could allow for
ipaReplTopoSegmentDirection replace: both

So that upgrade from right-left and left-right to both is not
allowed?  If so then this patch needs to be updated.

depends a bit on what you prefer and what we can get in for alpha.


Depends what's better, I already have adjusted patch for ^^ so it's
not about the work.

so lets take the changes to your patch and we could still extend
functionality a bit for beta or later



OK, attaching rebased patch.



--
Martin^3 Babinsky

--
Manage your subscription for the Freeipa-devel mailing list:
https://www.redhat.com/mailman/listinfo/freeipa-devel
Contribute to FreeIPA: http://www.freeipa.org/page/Contribute/Code


Re: [Freeipa-devel] [PATCH] 869 topology: restrict direction changes

2015-06-11 Thread Martin Babinsky

On 06/10/2015 03:13 PM, Petr Vobornik wrote:

topology plugin doesn't properly handle:
- creation of segment with direction 'none' and then upgrade to other
   direction
- downgrade of direction

These situations are now forbidden in API.

part of: https://fedorahosted.org/freeipa/ticket/4302



ACK

--
Martin^3 Babinsky

--
Manage your subscription for the Freeipa-devel mailing list:
https://www.redhat.com/mailman/listinfo/freeipa-devel
Contribute to FreeIPA: http://www.freeipa.org/page/Contribute/Code


[Freeipa-devel] [PATCH] 869 topology: restrict direction changes

2015-06-10 Thread Petr Vobornik

topology plugin doesn't properly handle:
- creation of segment with direction 'none' and then upgrade to other
  direction
- downgrade of direction

These situations are now forbidden in API.

part of: https://fedorahosted.org/freeipa/ticket/4302
--
Petr Vobornik
From 89703bf789885ef4919e5ca4d647537752f3f5c3 Mon Sep 17 00:00:00 2001
From: Petr Vobornik pvobo...@redhat.com
Date: Wed, 10 Jun 2015 14:44:09 +0200
Subject: [PATCH] topology: restrict direction changes

topology plugin doesn't properly handle:
- creation of segment with direction 'none' and then upgrade to other
  direction
- downgrade of direction

These situations are now forbidden in API.

part of: https://fedorahosted.org/freeipa/ticket/4302
---
 API.txt|  6 +++---
 VERSION|  5 ++---
 install/ui/src/freeipa/topology.js |  4 ++--
 ipalib/plugins/topology.py | 10 +-
 4 files changed, 16 insertions(+), 9 deletions(-)

diff --git a/API.txt b/API.txt
index beb3891eff5de0eab72878a87435a02187ee36af..08abdc3494c5b4c037a168cf4fe952fb374862ff 100644
--- a/API.txt
+++ b/API.txt
@@ -4567,7 +4567,7 @@ arg: Str('topologysuffixcn', cli_name='topologysuffix', multivalue=False, primar
 arg: Str('cn', attribute=True, cli_name='name', maxlength=255, multivalue=False, primary_key=True, required=True)
 option: Str('addattr*', cli_name='addattr', exclude='webui')
 option: Flag('all', autofill=True, cli_name='all', default=False, exclude='webui')
-option: StrEnum('iparepltoposegmentdirection', attribute=True, cli_name='direction', default=u'both', multivalue=False, required=True, values=(u'both', u'left-right', u'right-left', u'none'))
+option: StrEnum('iparepltoposegmentdirection', attribute=True, cli_name='direction', default=u'both', multivalue=False, required=True, values=(u'both', u'left-right', u'right-left'))
 option: Str('iparepltoposegmentleftnode', attribute=True, cli_name='leftnode', maxlength=255, multivalue=False, pattern='^[a-zA-Z0-9.][a-zA-Z0-9.-]{0,252}[a-zA-Z0-9.$-]?$', required=True)
 option: Str('iparepltoposegmentrightnode', attribute=True, cli_name='rightnode', maxlength=255, multivalue=False, pattern='^[a-zA-Z0-9.][a-zA-Z0-9.-]{0,252}[a-zA-Z0-9.$-]?$', required=True)
 option: StrEnum('nsds5replicaenabled', attribute=True, cli_name='enabled', multivalue=False, required=False, values=(u'on', u'off'))
@@ -4596,7 +4596,7 @@ arg: Str('topologysuffixcn', cli_name='topologysuffix', multivalue=False, primar
 arg: Str('criteria?', noextrawhitespace=False)
 option: Flag('all', autofill=True, cli_name='all', default=False, exclude='webui')
 option: Str('cn', attribute=True, autofill=False, cli_name='name', maxlength=255, multivalue=False, primary_key=True, query=True, required=False)
-option: StrEnum('iparepltoposegmentdirection', attribute=True, autofill=False, cli_name='direction', default=u'both', multivalue=False, query=True, required=False, values=(u'both', u'left-right', u'right-left', u'none'))
+option: StrEnum('iparepltoposegmentdirection', attribute=True, autofill=False, cli_name='direction', default=u'both', multivalue=False, query=True, required=False, values=(u'both', u'left-right', u'right-left'))
 option: Str('iparepltoposegmentleftnode', attribute=True, autofill=False, cli_name='leftnode', maxlength=255, multivalue=False, pattern='^[a-zA-Z0-9.][a-zA-Z0-9.-]{0,252}[a-zA-Z0-9.$-]?$', query=True, required=False)
 option: Str('iparepltoposegmentrightnode', attribute=True, autofill=False, cli_name='rightnode', maxlength=255, multivalue=False, pattern='^[a-zA-Z0-9.][a-zA-Z0-9.-]{0,252}[a-zA-Z0-9.$-]?$', query=True, required=False)
 option: StrEnum('nsds5replicaenabled', attribute=True, autofill=False, cli_name='enabled', multivalue=False, query=True, required=False, values=(u'on', u'off'))
@@ -4620,7 +4620,7 @@ arg: Str('cn', attribute=True, cli_name='name', maxlength=255, multivalue=False,
 option: Str('addattr*', cli_name='addattr', exclude='webui')
 option: Flag('all', autofill=True, cli_name='all', default=False, exclude='webui')
 option: Str('delattr*', cli_name='delattr', exclude='webui')
-option: StrEnum('iparepltoposegmentdirection', attribute=True, autofill=False, cli_name='direction', default=u'both', multivalue=False, required=False, values=(u'both', u'left-right', u'right-left', u'none'))
+option: StrEnum('iparepltoposegmentdirection', attribute=True, autofill=False, cli_name='direction', default=u'both', multivalue=False, required=False, values=(u'both', u'left-right', u'right-left'))
 option: Str('iparepltoposegmentleftnode', attribute=True, autofill=False, cli_name='leftnode', maxlength=255, multivalue=False, pattern='^[a-zA-Z0-9.][a-zA-Z0-9.-]{0,252}[a-zA-Z0-9.$-]?$', required=False)
 option: Str('iparepltoposegmentrightnode', attribute=True, autofill=False, cli_name='rightnode', maxlength=255, multivalue=False, pattern='^[a-zA-Z0-9.][a-zA-Z0-9.-]{0,252}[a-zA-Z0-9.$-]?$', required=False)
 option: StrEnum('nsds5replicaenabled', attribute=True,