[GitHub] brooklyn-server issue #999: Constraints - serialization and {forbidden,requi...

2018-09-24 Thread ahgittin
Github user ahgittin commented on the issue:

https://github.com/apache/brooklyn-server/pull/999
  
have added docs now too, so after merging this please look at:

* https://github.com/apache/brooklyn-ui/pull/72
* https://github.com/apache/brooklyn-docs/pull/268


---


[GitHub] brooklyn-server issue #999: Constraints - serialization and {forbidden,requi...

2018-09-24 Thread aledsage
Github user aledsage commented on the issue:

https://github.com/apache/brooklyn-server/pull/999
  
Looks good - happy to merge, after I've build + run tests locally.

The jenkins PR build is still failing with the error below (I suspect it's 
a network connection problem while it's trying to download lots from github; I 
wonder if we can use `--depth=1` for PR builds, or if that would mess up 
because it wants to check if the PR is mergeable etc):
```
Caused by: hudson.plugins.git.GitException: Command "git fetch --tags 
--progress git://github.com/apache/brooklyn-server.git 
+refs/pull/*:refs/remotes/origin/pr/*" returned status code 128:
```

It would be good to also expand out the tests in 
`ConfigParametersYamlTest`, so that we regression-test it is always calling 
`ConstraintSerialization` (currently it just does `required`). I'll look at 
adding that, along with some more unit tests I was playing around with in 
`ConstraintSerializationTest`.


---


[GitHub] brooklyn-server issue #999: Constraints - serialization and {forbidden,requi...

2018-09-24 Thread ahgittin
Github user ahgittin commented on the issue:

https://github.com/apache/brooklyn-server/pull/999
  
retest this please


---


[GitHub] brooklyn-server issue #999: Constraints - serialization and {forbidden,requi...

2018-09-24 Thread ahgittin
Github user ahgittin commented on the issue:

https://github.com/apache/brooklyn-server/pull/999
  
build failure was due to being unable to checkout; have wiped workspace


---


[GitHub] brooklyn-server issue #999: Constraints - serialization and {forbidden,requi...

2018-09-24 Thread ahgittin
Github user ahgittin commented on the issue:

https://github.com/apache/brooklyn-server/pull/999
  
here's a blueprint to help test, showing all the supported constraints:

```
brooklyn.catalog:
  bundle: constraints-test1
  version: "0.0.1-SNAPSHOT"
  itemType: entity

  items:
- id: constraint1
  name: "More constraints"
  iconUrl: 
https://upload.wikimedia.org/wikipedia/commons/c/cb/Foo_was_here.jpg
  tags:
  - ui-composer-hints:
config-widgets:
  - key: sample-dropdown
widget: suggestion-dropdown  
suggestion-values:
- value: hello
- value: hi
- value: bonjour
  item:
type: org.apache.brooklyn.entity.stock.BasicEntity
brooklyn.parameters:
 - name: sample-required
   constraints:
   - required
 - name: sample-dropdown
 - name: sample-regex
   constraints:
   - regex("h.*")
 - name: sample-regex2
   constraints:
   - regex: h.*
 - name: needs-another
   constraints:
   - forbiddenUnless: another
 - name: another
   constraints:
   - forbiddenIf: not-with-another
   - requiredIf: needs-yet-another
 - name: needs-yet-another 
 - name: not-if-needed-another
   constraints:
   - requiredUnless: needs-another
```




---


[GitHub] brooklyn-server issue #999: Constraints - serialization and {forbidden,requi...

2018-09-24 Thread ahgittin
Github user ahgittin commented on the issue:

https://github.com/apache/brooklyn-server/pull/999
  
retest this please


---


[GitHub] brooklyn-server issue #999: Constraints - serialization and {forbidden,requi...

2018-09-21 Thread ahgittin
Github user ahgittin commented on the issue:

https://github.com/apache/brooklyn-server/pull/999
  
BTW you're both right, i forgot to apply the serialization to catalog 
input; i've fixed that also


---


[GitHub] brooklyn-server issue #999: Constraints - serialization and {forbidden,requi...

2018-09-21 Thread ahgittin
Github user ahgittin commented on the issue:

https://github.com/apache/brooklyn-server/pull/999
  
all PR comments addressed.  more exciting, it has been tested against 
https://github.com/apache/brooklyn-ui/pull/72.

![screen shot 2018-09-22 at 01 48 
12](https://user-images.githubusercontent.com/496540/45911322-9cd52e80-be09-11e8-88b4-204ff1cb2e65.png)



---


[GitHub] brooklyn-server issue #999: Constraints - serialization and {forbidden,requi...

2018-09-21 Thread aledsage
Github user aledsage commented on the issue:

https://github.com/apache/brooklyn-server/pull/999
  
retest this please

Build failure was environmental:
```
ERROR: Error fetching remote repo 'origin'
hudson.plugins.git.GitException: Failed to fetch from 
git://github.com/apache/brooklyn-server.git
```


---